Saturday 15 January 2011

android how to create a notification that never closes -


I made a notification using NotificationCompat.builder. But I can set flags through it to make it unreliable.

Can anyone help me to solve my problem, I would be grateful to you. :)

thanks :)

  noti_intent = new intent (this, men class); Noti_pend = Pendingent.get activity (this, noti_id, noticent, 0); Noti_manager = (Notification Manager) getSystemService (reference .NETIFICATION_SERVICE); Noti = New Notification Builder (this) .setSmallIcon (.set.content_ico) .setContentTitle ("Next alarm is set on ring"). Setticker ("Alarm is set in ring") .setContentText (next_date.getText () + "" + Next_time. Get text ()) .set (when system syentime millise ()) .setContentIntent (noti_pend) .setAutoCancel (wrong);    

change setAutoCancel (true) with setOngoing (True) .

No comments:

Post a Comment