Sunday 15 April 2012

Android Notification doesn't appear -


I have read many posts on the website and I believe there are not many lines to pop up the basic information code Need to write @ Override Protected Zero (Bundle Saved InstantState) {Log.i ("StartupActivity", "OnTech"); Super.onCreate (savedInstanceState); SetContentView (R.layout.activity_start_up); Notification Manager Manager = (Notification Manager) getSystemService (NOTIFICATION_SERVICE); NotificationCompat.Builder mBuilder = New Notification Builder (this) .setContentTitle ("Hello") .setContentText ("Hello") .setSmallIcon (R.drawable.ic_launcher) .setAutoCancel (wrong); NotiManager.notify (0, mbuilder.build ()); Logs. I ("here", "here"); }

I have notified the notification too. The builder who does not work I do not know where the problem is and as is the notification / pending for the pending notification, I did not add the code. (Although I also inform that notification notification is not visible)

I have also added permission vibration in the Manifest, which I do not know how to use it.

I just want to know how to pop up a notification on the status bar.

Permission of the vibration to allow the device to vibrate. You are not using this permission, you can remove it.

You need to call .build () after .setAutoCancel (wrong);

No comments:

Post a Comment