I cannot get a notification to appear in the status bar.  And since I
haven't been able to find any posts of others with a similar problem
I'm sure there is some small thing that I am missing...

I more or less followed the example in the Dev Guide.  Below is my
Service class.

public class MultiTaskerNotifierService extends Service
{
        @Override
        public void onCreate()
        {
                Notification notifier = new Notification();

                Intent launchIntent = new Intent();
                launchIntent.setClassName(this,
"com.magouyaware.multitasker.ActivityListView");

                notifier.flags = Notification.DEFAULT_ALL |
Notification.FLAG_NO_CLEAR;
                notifier.tickerText = getText(R.string.app_name);
                notifier.contentIntent = PendingIntent.getActivity(this, 0,
launchIntent, Intent.FLAG_ACTIVITY_NEW_TASK);

                notifier.setLatestEventInfo(getBaseContext(), getText
(R.string.app_name), getText(R.string.notifier_description),
notifier.contentIntent);

                NotificationManager mgr = (NotificationManager)getSystemService
(NOTIFICATION_SERVICE).notify(1234, notifier);
        }

        public IBinder onBind(Intent intent)
        {
                return m_binder;
        }

        /**
     * This is the object that receives interactions from clients.
See RemoteService
     * for a more complete example.
     */
    private final IBinder m_binder = new Binder() {
        @Override
                protected boolean onTransact(int code, Parcel data, Parcel 
reply,
int flags) throws RemoteException {
            return super.onTransact(code, data, reply, flags);
        }
    };
}

I have it set up so that my activity starts this service with
startService() when the user selects to have a persistent
notification.  Using TaskManager 1.10 I have been able to tell that my
service is actually running after that call, but the notification
never gets displayed.

Any ideas?

Thanks in advance for any hel... This is the last hurdle before I put
the first version of my app on the Market!  :)  I'm very excited and
anxious to get this out there!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to