설치 후 바로 가기를 자동으로 만드는 방법은 무엇입니까? 아래 코드는 작동하지 않습니다!설치 후 바로 가기를 자동으로 만드는 방법은 무엇입니까?
private void createShortCut() {
Intent intent = new Intent(ACTION_INSTALL_SHORTCUT);
intent.putExtra(Intent.EXTRA_SHORTCUT_NAME, getString(R.string.app_name));
intent.putExtra("duplicate", false);
Parcelable icon = Intent.ShortcutIconResource.fromContext(getApplicationContext(), R.drawable.icon);
intent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE, icon);//icon
intent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, new Intent(getApplicationContext() , MainActivity.class));
setResult(RESULT_OK, intent);
sendBroadcast(intent);
}
[이 하나]를 확인 했습니까? (http://stackoverflow.com/questions/6337431/android-create-shortcuts-on-the-home-screen) –