LocationManager limitation on samsung device

Hello everybody, this is my situation:
I developed an app that has a widget. Tapping on the widget (and thus having the app out of focus in the background) I call a Service or an IntentService to have some GPS-related data (the position). I tried with getLastKnownLocation and requestSingleUpdate. Both works but after a dozen of seconds that the app is in the background they stop working.
The example is, when using getLastKnownLocationI get a value and after few seconds, the same service, return null.

Is there any limitation of the usage of those methods? Can you explain to me how to solve this problem?

Hi,
It may cause because of the GPS power down for saving battery draining of the device. As there is nothing to perform the check operation, getLastKnownLocation() returns null.
In that case you can use requestLocationUpdates() or try to power on the GPS first and then try to check the location.