I want to create a notification without canceling/deleting previous notifications from my app. Here is my code for creating a notification:
private void notifica
for long term solutions, you can use a random method to generate integer variable for you and call that in notify.
mNotificationManager.notify(createRandomCode(7), mBuilder.build());
public int createRandomCode(int codeLength) {
char[] chars = "1234567890".toCharArray();
StringBuilder sb = new StringBuilder();
Random random = new SecureRandom();
for (int i = 0; i < codeLength; i++) {
char c = chars[random.nextInt(chars.length)];
sb.append(c);
}
return Integer.parseInt(sb.toString());
}