내 웹 사이트에서 배포 할 앱을 개발 중입니다. 그래서이 응용 프로그램을 설치하면 바로 가기가 홈 화면에서 만들어 져야하고 나는 다음 코드를 사용했고 설치되었을 때 바로 가기 아이콘을 만들었지 만 축배 메시지가 있습니다. 이 축배 메시지를 억제하고 싶습니다. 바로 가기 아이콘을 만드는 데 사용되는 함수를 추가하고 있습니다.안드로이드에있는 집에서 바로 가기 생성을위한 토스트
private void addShortcut() {
//Adding shortcut for MainActivity
//on Home screen
Intent shortcutIntent = new Intent(getApplicationContext(),
MainActivity.class);
shortcutIntent.setAction(Intent.ACTION_MAIN);
Intent addIntent = new Intent();
addIntent
.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);
addIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, "HelloWorldShortcut");
addIntent.putExtra(Intent.EXTRA_SHORTCUT_ICON_RESOURCE,
Intent.ShortcutIconResource.fromContext(getApplicationContext(),
R.drawable.ic_launcher));
addIntent
.setAction("com.android.launcher.action.INSTALL_SHORTCUT");
getApplicationContext().sendBroadcast(addIntent);
}
나는 문제는 이미하지만 대답을 요구하지 않습니다 알고있다. 그래서 나는 코드와 이미지로 다른 방식으로 질문을했다. google's source이 가능하지 보인다 InstallShortcutReceiver
의를 찾고
어떻게 내 패키지에 대한 바로 가기 제거에 대해? 축배를 예방하거나 취소 할 수있는 방법이 있습니까? – Corey