gps - Android: How do I call startResolutionForResult from a Service? -
I'm trying to add GPS tracking function to my app by typing GPS tracking service. I am following this and how to do this by using Google Play services for Android Developer Content, but I'm stuck in the onConnectionFailed
method. I'm trying to call startResolutionForResult
to handle the Google Play services error. Although this method requires that any activity be passed as the first parameter, and since I am telling it to the service, I am not sure exactly what I should do.
I think that I am going to go about all this is wrong and there is a completely different way of handling it from service. The authentication process for Google Play services requires an activity because it displays the UI for the user.
It may be because the services do not have a UI, so you need to send a message in any activity to set up the connection, then the service can continue. There is a good answer showing a way to do this:
Comments
Post a Comment