NotifyMe
NotifyMe copied to clipboard
Little tip
Hi, I checked your code. I worked on project with mandatory notification at any time. Your notification will be not shown while device is sleeping if you not wrap it in this -
PowerManager.WakeLock wakeLock = null;
if (powerManager != null) {
wakeLock = powerManager.newWakeLock(PowerManager.FULL_WAKE_LOCK
| PowerManager.ACQUIRE_CAUSES_WAKEUP
| PowerManager.ON_AFTER_RELEASE, TAG);
}
if (wakeLock != null)
wakeLock.acquire(500);
//SHOW NOTIFICATION CODE
if (wakeLock != null)
wakeLock.release();