سؤال

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?

هل كانت مفيدة؟

المحلول

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.

نصائح أخرى

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top