Android Periodic GPS location updates with AlarmManager inside a Service

前端 未结 2 1606
迷失自我
迷失自我 2020-12-15 01:38

I read a lot of questions on here but couldn\'t figure out what the problem is.

I\'m writing a field service application for Android. In one of the Activities (MyAct

2条回答
  •  無奈伤痛
    2020-12-15 02:17

    try this:

    AlarmManager.setRepeating(AlarmManager.RTC_WAKEUP,,,);
    

    I am doing for get one's current location with GPS, but my project works every 10 seconds. I have no idea now. And my code :

    AlarmManager.setRepeating(AlarmManager.RTC_WAKEUP,System.currentTimeMillis(),6000000,pi);
    

提交回复
热议问题