A앱에서 B앱을 콜 하기 위해서는.
String pkg = "com.sdevice.sdevice"; //콜 하고자 하는 패키지 명 String cls = "com.sdevice.sdevice.MainActivity"; //콜 하고자 하는 패키지+클래스 명 ComponentName comp = new ComponentName(pkg, cls); Intent intent = new Intent(Intent.ACTION_MAIN); //Action을 Custom하면 다른 Activity도 부를 수 있다. intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); intent.addCategory(Intent.CATEGORY_LAUNCHER); intent.setComponent(comp); startActivity(intent);
와 같이 사용하면 된다.
만약에 MAIN이 아닌 엑티비티를 부르고자 한다면
불르고자 하는 엑티비티에 인텐트 필터를 커스텀해서 먹이면 됨
'소프트웨어 > Android/Java/Ndk' 카테고리의 다른 글
Android] Java Generic을 이용한 Custom Log (0) | 2015.05.16 |
---|---|
android] material design guide (0) | 2014.11.03 |
Android] View 컴포넌트끼리의 Touch,Click Event 우선순위 문제 (0) | 2014.10.26 |
Android] android full soucre 다운로드 (1) | 2014.08.20 |
Android] Nexus5에 android pull source가 올라갔는데 부팅안될때 (1) | 2014.08.20 |
Android] Android full source와 eclipse 연결 (1) | 2014.08.20 |
android] USB State Broadcast (0) | 2014.08.19 |