1. Download our Official Android App: Forums for Android!

Apps Runtime location permission getting turned off at some point while accessing GPS location in android

Discussion in 'Android Development' started by harishdsm, Oct 10, 2017.

  1. harishdsm

    harishdsm Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    2
    Joined:
    Oct 10, 2017

    Oct 10, 2017
    2
    0
    5
    I am working on an android application that is used for tracking mobiles.
    I have used location listener to get the latitude & longitude values from the GPS at a time interval of 10 secs.
    In case of internet connectivity,the values(lat,longi) are directly sent to my server and if there is internet failure values are stored in phone's local database and then sent to the server.
    The app was working fine while tested internally and right now the problem found is :
    Run-time Location permission which the app asks at the start up()is getting turned off automatically at some point during the real tracking due to some unknown reason.
    I went several trips(outside) for tracking purpose,the same app is working fine and at times it is not working in the same route.
    I have deeply monitored and found that run-time location permission is getting off(by creating a log) ,so the listener is not able to get the location updates thereby app gets hanged and tracking stops.
    Please help me with this so that i can find a solution.

    What I have tried:

    I am working on an android application that is used for tracking mobiles.
    I have used location listener to get the latitude & longitude values from the GPS at a time interval of 10 secs.
    In case of internet connectivity,the values(lat,longi) are directly sent to my server and if there is internet failure values are stored in phone's local database and then sent to the server.
    The app was working fine while tested internally and right now the problem found is :
    Run-time Location permission which the app asks at the start up()is getting turned off automatically at some point during the real tracking due to some unknown reason.
    I went several trips(outside) for tracking purpose,the same app is working fine and at times it is not working in the same route.
    I have deeply monitored and found that run-time location permission is getting off(by creating a log) ,so the listener is not able to get the location updates thereby app gets hanged and tracking stops.
    Please help me with this so that i can find a solution.
     

    Advertisement

Share This Page

Loading...