2
votes

I work on an app for IOS and WPhone. I need to activate the GPS before start an activity or new screen

On Android I use this:

  Intent myIntent = new Intent(
                    Settings.ACTION_LOCATION_SOURCE_SETTINGS);
            startActivity(myIntent);

Which is the proper manner to do it on CN1 both for IOS and WPhone?

1

1 Answers

2
votes

Try to take a look on LocationManager on CodenameOne. It provides all the tools to manage such things as GPS (Maybe LocationManager.isGPSEnabled() ?). By the way, you have to set build hints in codename one to authorize your app to access GPS.