[A 어플]
Intent intent = new Intent();
intent.setClassName("android.com.test", "android.com.test.TestActivity");
startActivity(intent);
setClassName("패키지이름", "패키지이름.클래스이름");
-----------------------------------------------
[B 어플]
B-1(main App)
B-2(Sub App)
B 어플의 Manifest.xml 내용에
<activity android:name=".TestActiviActivity" android:label="@string/app_name1">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.SAMPLE_CODE" />
</intent-filter>
</activity>
B 어플의 메인 Activity인 B-1은 A어플에서 바로 startActivity로 호출되어 실행되지만, B-2의 어플에 대해서는 manifest.xml 에 위와 같이 intent filter를 적용해야 한다.
댓글 없음:
댓글 쓰기