dexapier / android-scripting

Automatically exported from code.google.com/p/android-scripting
0 stars 0 forks source link

Support for get location providers and ask if enabled #592

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I cloned the repository and push my commit in 
https://code.google.com/r/agustinhenze-sl4a/. Added 2 new methods in 
LocationFacade, the first get all availables providers on the phone and the 
second get the providers status.
This patch allow something like this in python:
{{{
if u'gps' in droid.locationProviders().result:
    if not droid.locationProviderEnabled(u'gps').result:
        #You can show a dialog for enable gps
        intent = droid.makeIntent('android.settings.LOCATION_SOURCE_SETTINGS').result
        droid.startActivityIntent(intent)
}}}
Please merge into the project.

Original issue reported on code.google.com by AGUSTINH...@gmail.com on 13 Jan 2012 at 1:21

GoogleCodeExporter commented 9 years ago
Applied to r5x13

Original comment by rjmatthews62 on 9 Apr 2012 at 1:07