Developer Guide
Provides API references for application developers who build applications on the Android* 16 Base BSP Reference Release for Edge Platforms.
Static Location Service
This section provides guidance for application developers to read or write the device's statically configured location.
Location Provider
Use the following location-provider name when calling the LocationManager API to read the location:
"static"
Read Location
Applications can use this provider to determine the device's location.
Required Android Permission
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
Sample Code
LocationManager lm = (LocationManager)getSystemService(LocationManager.class);
Location location = lm.getLastKnownLocation("static");
if (location != null) {
double lat = location.getLatitude();
double lon = location.getLongitude();
Log.d("STATIC_PROVIDER", "Lat=" + lat + " Lon=" + lon);
}
Write / Update Location
Manageability applications use this provider to configure the device's static location during provisioning.
Note: This feature is supported only for privileged/system applications.
Required Permission
<uses-permission android:name="android.permission.LOCATION_HARDWARE" />
Sample Code
IBinder binder = ServiceManager.getService("location_control");
ILocationControlService service = ILocationControlService.Stub.asInterface(binder);
service.setHalLocation(12.9716, 77.5946);
For release details, see Release Notes. For build and flashing instructions, see the Getting Started Guide. Contact your Intel representative or email to premiersupport.intel.com for support.