I am building a cab booking app, I need current location of the cab every 20 seconds.
I have defined a AlarmManager and need it to repeat itself every 20 seconds. Bu
The above solutions didn't work for me.
Additionally, registering dynamically via code did the trick:
Intent intent = new Intent(); intent.setAction("android.intent.action.NOTIFY"); //Register the receiver context.registerReceiver(new OnAlarmReceiver(),new IntentFilter());