registerApp static method
Registers the app at DJI.
Triggers the DJI SDK registration method. This is a required action, everytime we launch our app, and before we attempt to connect to the Drone.
Once connected, the DjiFlutterApi.setStatus()
method is triggered and the status is changed to "Registered".
Example:
Future<void> _registerApp() async {
try {
await Dji.registerApp;
developer.log(
'registerApp succeeded',
name: kLogKindDjiFlutterPlugin,
);
} on PlatformException catch (e) {
developer.log(
'registerApp PlatformException Error',
error: e,
name: kLogKindDjiFlutterPlugin,
);
} catch (e) {
developer.log(
'registerApp Error',
error: e,
name: kLogKindDjiFlutterPlugin,
);
}
}
Implementation
static Future<void> registerApp() async {
await _api?.registerApp();
}