Question

Do i have to register my application to Google's console for using location services or can i still use that service without registering while testing my application on AVD or my phone?

Était-ce utile?

La solution

You need not to register anywhere for using location services. Registration will be required if you want to include Google Map Api in your code. But I must mention that you will need to include permissions to use location services and also if you are using an emulator, must know how to send GPS coordinates using DDMS or ADB.

How to emulate GPS location in the Android Emulator?

Above question will show you how to send mock GPS coordinates to Emulator using DDMS or ADB.

Autres conseils

No. You don't have to register to use location services.

You need a locationmanager from which you setup listeners for the GPS.

if (locationManager == null) {
        locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
    }
if (!locationManager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
        buildAlertMessageNoGps();
    }

... http://developer.android.com/reference/android/location/LocationManager.html

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top