How can I display a warning information "missed call" in notification bar when I hang up a call programmatically in android? -
Now I can call a call program in android using the document
Generally , A warning notice "missed call ..." and when a call misses a system icon will be displayed in the notification bar.
But alert information "missed call ..." and a system icon will not be displayed when I kill And more, I hope that after using the records of Miss Call, how can I do this to display alert information and programmatically display system icons? When I click on the system icon can be displayed Add this code only after the call is canceled: Where Hope this helps :) killCall (reference reference)
killCall (reference reference) ?
Notification Manager nManager = (NotificationManager) getSystemService (context.NOTIFICATION_SERVICE); Intention = Intentional Intent (this, TheClassYouWantToOpenOnNotificationClick.class); Pending print-pIntent = pending content. Gate activity (this, 0, intent, pending provider. FLAG_UPDATE_CURRENT); Notification Notification = New Notification. Builder (idleService) This .setContentTitle ("Missed Call!") .setContentText ("Missed Call From Phone Number) .setSmallIcon (R.drawable.your_icon) .setContentIntent (pIntent) .setAutoCancel (True) .build (); NManager.notify (0, Notification);
phone number number can be a string with the number of missed calls.
Comments
Post a Comment