Issue
What is the id parameter in startForground
method in Service class.I found that answer by googling for single Notification.How do the guy find the id ? any list or reference for this.What if i want to show multiple notification like facebook. How do i define the id then ?
notification.flags = Notification.FLAG_NO_CLEAR;
startForeground(1337, notification);
Solution
Simple notification_id needs to be changeable.
Just create random number for notification_id.
Random random = new Random();
int m = random.nextInt(9999 - 1000) + 1000;
or
int m = System.currentTimeMillis()%10000;
and replace this line to add parameter for notification id as to generate random number
startForeground(m, notification);
Answered By - Godslave
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.