How to display latitude and longitude for every five seconds using alarm manager in android? -
i creating application in have show reminder every 5 minutes. instead of reminder have show longitude , latitude every 5 minutes. have 2 activities: 1 alarmmanager , other alarmmanagerbroadcastreceiver . how do this? public class alarmmanagerbroadcastreceiver extends broadcastreceiver { string gps; final public static string one_time = "onetime"; @override public void onreceive(context context, intent intent) { powermanager pm = (powermanager) context.getsystemservice(context.power_service); powermanager.wakelock wl = pm.newwakelock(powermanager.partial_wake_lock, "your tag"); wl.acquire(); bundle extras = intent.getextras(); stringbuilder msgstr = new stringbuilder(); if(extras != null && extras.getboolean(one_time, boolean.false)){ msgstr.append("reminder"); } format formatter = new simpledateformat("hh:mm:ss a"); msgstr.append(formatter.format(new date())); ...