getGoogleAdvertisingId static method

  1. @Deprecated("Use `getAdvertisingId` instead")
Future<String> getGoogleAdvertisingId()

Get google advertising id

NOTE: Since late 2021, if the user opted out of Ad personalization this id will be a bunch of zeros

Implementation

@Deprecated("Use `getAdvertisingId` instead")
static Future<String> getGoogleAdvertisingId() async {
  if(!Platform.isAndroid) return "";

  return await _channel.invokeMethod("Pushe.getGoogleAdvertisingId") ?? "";
}