TUM/2015/android/README.md
2015-06-26 09:52:50 +02:00

1.3 KiB

Display a notification on the headunit

In this task you have to create an android application which will use a geofence and the current location data in order to open/close a popup on the headunit.

Receive the current location

Use the android location manager to request location updates. If the location is retrieved correctly, then the following test will pass.

shouldReceiveTheLatestLocation()

Bind to a remote service to be able to display notifications

Use the AIDL to allow interprocess communication between your app and another service which will allow you to display notifications. The AIDL you will use is HeadUnit.aidl. You are on the client side. You will need to bind to the service using a ServiceConnection object (like here).

Intent headUnitServiceIntent = new Intent(HeadUnit.class.getName());
headUnitServiceIntent.setPackage("com.esrlabs.headunitinterface");
bindService(headUnitServiceIntent, serviceConnection_object, BIND_AUTO_CREATE);

Implement a geofence object to tell if the current is inside a designated area or not