I have an app, has a service.. its working normally when screen is on….
but service not working when the screen is locked….
notification not working when screen is locked…
private void _startService() {
Toast.makeText(this, "Mulai service", Toast.LENGTH_SHORT).show();
timer.scheduleAtFixedRate(new TimerTask() {
public void run() { checkAlarm(); }
},0, 60000);
}
You may use the WakeLock. See this link
http://developer.android.com/reference/android/os/PowerManager.html
Android application working with locked screen