getting latitude and longitude using gps every 10 minute in background android

前端 未结 5 1444
猫巷女王i
猫巷女王i 2021-01-01 04:00

I am done getting latitude and longitude using LocationManager and working proper.

Requirement:

get latitude and longitude every

5条回答
  •  挽巷
    挽巷 (楼主)
    2021-01-01 04:26

    I am using this way and solve my problem.

    PendingIntent pi=PendingIntent.getBroadcast(context, 0, i, 0);
        alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, System.currentTimeMillis(), PERIOD , pi);
    

    I am don't know this is right or wrong.but work for me. Thanks @Lucifer,@Maya mAku and @piotrpo for your guidline.

提交回复
热议问题