문제

나는 안드로이드 기기에서 완벽하지만 nokia-x

에 적합하지 않은 코드가 있습니다

여기에 샘플 코드가 있습니다 :

Intent shortcutIntent = new Intent(getApplicationContext(), MainActivity.class);
                shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
                shortcutIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);

                Intent addIntent = new Intent();
                addIntent.putExtra(Intent.EXTRA_SHORTCUT_INTENT, shortcutIntent);
                addIntent.putExtra(Intent.EXTRA_SHORTCUT_NAME, "Icon Test");
                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);
.

nokia-x

에서 똑같은 일을 할 때 도와주세요.

도움이 되었습니까?

해결책

이미 Nokia X Application Launcher가 방송을 듣지 않으며 발사기 아이디어는 다른 AOSP 장치와 비트 다르며 바로 가기 아이콘에 매우 적합한 디자인을 볼 수 없습니다.

어쨌든, FastLane은 모든 알림을 보이고 있으므로 작업에 바로 가기를 만들려면 Nokia X를 사용하여 작업에 대한 알림을 사용해야합니다.

다른 팁

실제로 Nokia X에는 홈 화면이 없으며 App Launcher (타일)가있는 것입니다.심지어 통지가 패스트리 란으로 알려져있는 창.코드는 Nova Launcher와 같은 실행 프로그램에서 홈 화면에서 작동합니다.심지어 나의 노키아 x에서 Nova Launcher를 사용하고 있습니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top