Я пытался переключиться с табуляции (для этого потребовалось около 1/3 небольшого экрана) на полноэкранные экраны, выбираемые с помощью уведомлений.
Пока все хорошо, все сделано, следуя инструкциям многих практических рекомендаций, всеработает как шарм.(это на эмуляторе SDK)
Теперь я перенес приложение на свой реальный телефон Android и теперь оно не переключает экраны с помощью уведомлений.он ВСЕГДА открывает MainActivity.
private void DroiDCNotification(int NotificationID, CharSequence tickerText, CharSequence contentTitle, CharSequence contentText) {
//throw new UnsupportedOperationException("Not yet implemented");
String ns = Context.NOTIFICATION_SERVICE;
NotificationManager mNotificationManager = (NotificationManager) getSystemService(ns);
int icon = R.drawable.droidc_icon; // icon from resources
long when = System.currentTimeMillis(); // notification time
Context context = getApplicationContext(); // application Context
Intent notificationIntent = new Intent(this, MainActivity.class);
PendingIntent contentIntent = PendingIntent.getActivity(this, 0, notificationIntent, 0);
// the next two lines initialize the Notification, using the configurations above
Notification notification = new Notification(icon, tickerText, when);
notification.setLatestEventInfo(context, contentTitle, contentText, contentIntent);
mNotificationManager.notify(NotificationID, notification);
}
Так как же я могу сделать уведомление, вызванное определенным действием, открытым для указанного действия?