Last updated:
0 purchases
flutter aaos
flutter_aaos #
Android Automotive OS plugin
How to use #
Run on emulator #
Open Android studio
Tools -> SDK Manager: download Android 13 or any version with Android Automotive
Tools -> Device Manager: Add Device -> Select Hardware Automotive ...
Code Sample #
final _flutterAaosPlugin = FlutterAaos();
getCarData() async {
// list all available properties
carData = await _flutterAaosPlugin.propertyList;
for (var item in carData!) {
int id = item["id"];
// listen to the property value change
Stream s = await _flutterAaosPlugin.listenProperty(id);
s.listen((event) {
setState(() {
item["value"] = event.toString();
});
});
}
}
copied to clipboard
Android Config #
Add permissions you need in android/src/main/AndroidManifest.xml
Example:
<uses-permission android:name="android.car.permission.CAR_POWERTRAIN" />
<uses-permission android:name="android.car.permission.CAR_SPEED" />
<uses-permission android:name="android.car.permission.CAR_ENERGY" />
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.