-
앱에서 다른 앱 호출하기안드로이드(이클립스)/막 써 2016. 11. 11. 10:58반응형
호출 당할 앱쪽 AndroidManifest.xml 액티비티에 추가
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="customhost"
android:scheme="customscheme" />
</intent-filter>
소스 코드
Intent i = new Intent(Intent.ACTION_VIEW);
Uri u = Uri.parse(customscheme + "://" + customhost);
i.setData(u);
activity.startActivity(i);
반응형'안드로이드(이클립스) > 막 써' 카테고리의 다른 글
AsyncTask 샘플 (0) 2017.01.17 타블랫인지 스마트폰인지 확인하기 (0) 2016.11.15 안드로이드 6.0 권한 설정 관련 (0) 2016.07.17 PreferenceActivity 아이템 layout (2) 2016.06.24 PreferenceActivity background 색상 설정 (0) 2016.06.23