getInstance static method
The options are CN (China), DE (Germany), SG (Singapore), and RU (Russia).
The data processing location you set must have the data storage permission. Otherwise, data cannot be reported to it.
Implementation
static Future<HMSAnalytics> getInstance({
String routePolicy = '',
}) async {
const MethodChannel channel =
MethodChannel('com.huawei.hms.flutter.analytics');
final HMSAnalytics instance = HMSAnalytics._getInstance(channel);
await channel.invokeMethod(
'getInstance',
<String, dynamic>{
'routePolicy': routePolicy,
},
);
return instance;
}