Из уведомления: AlertDialog без пользовательского интерфейса

Я создаю уведомление, которое запускает намерение. Вот действительно сокращенный отрывок из моего кода ...

Notification notification = new Notification(R.drawable.icon, "notification", System.currentTimeMillis());
NotificationManager nm = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);
Intent notificationIntent = new Intent(BackgroundService.this, ConnectionHandler.class);
notificationIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
notificationIntent.addFlags(Intent.FLAG_FROM_BACKGROUND);

PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, notificationIntent, 0);
notification.setLatestEventInfo(context, getString(R.string.notification_title), getString(R.string.notification_body), pendingIntent);
notification.flags |= notification.FLAG_AUTO_CANCEL;
nm.notify(1, notification);

В моем намерении ( ConnectionHandler.class ) я хотел бы показать AlertDialog, который работает. Но я бы хотел, чтобы AlertDialog отображался без открытия нового UI-Window. Лучшим для меня было, если AlertDialog просто появлялся без чего-либо еще при нажатии на запись уведомления.

Любая идея приветствуется.

С уважением, Тоби

7
задан Henrik P. Hessel 16 May 2011 в 22:01
поделиться