Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Notification for an ongoing service

Notification for an ongoing service

Put your problem here if it does not fit any of the other categories.

Notification for an ongoing service

Postby michael1221988 » Sun Mar 21, 2010 11:20 pm

I have a notification set up when a service is running (playing some music). However when I click the notification it creates a new activity instead of using the one that is already running in the background. How can I get it to just bring up the original activity that started the service? here is what I have now
Code: Select all
         Intent notifyIntent = new Intent(this, MediaPlayback.class);
         PendingIntent intent = PendingIntent.getActivity(this, 0,
               notifyIntent, android.content.Intent.FLAG_ACTIVITY_NEW_TASK);
         Notification notifyDetails = new Notification(
               R.drawable.stat_notify_musicplayer, Contents.getSong().name,
               System.currentTimeMillis());
         notifyDetails.flags = Notification.FLAG_FOREGROUND_SERVICE
               | Notification.FLAG_ONGOING_EVENT;
         notifyDetails.setLatestEventInfo(context, contentTitle, contentText,
               intent);
         mNotificationManager.notify(1, notifyDetails);
michael1221988
Junior Developer
Junior Developer
 
Posts: 12
Joined: Fri Jan 08, 2010 4:39 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 12 guests