The Automotive API is built as a pure Java project. The way one gets hold of the API is through the automotive service, that encapsulates all Android specific code in the AGA stack. The API in itself however will remain stable.
The Automotive API classes and functions are part of the com.swedspot.automotiveapi package.
to get hold of the API:
final AutomotiveManager api = AutomotiveFactory.createAutomotiveManagerInstance(certificate, automotiveListener, driverDistractionListener);
or on ROM:
final AutomotiveManager api = (AutomotiveManager) context.getSystemService(Context.AUTOMOTIVE_SERVICE);
to register for vehicle signal updates:
request a one time value:
unregister for vehicle signals:
write vehilce signal:
final AutomotiveSignal speedSignal = new AutomotiveSignal(AutomotiveSignalId.FMS_WHEEL_BASED_SPEED, new Uint16(42), AutomotiveUnit.KILOMETERS_PER_HOUR); api.send(speedSignal);
All code is published in the automotive-api.git repo.