From 8124857d8d500a04ddde26fb22fdc5feaab5c98d Mon Sep 17 00:00:00 2001 From: jcesarmobile Date: Wed, 15 May 2024 03:33:59 +0200 Subject: [PATCH] fix(android)!: access Context through webView.getContext() (#201) Co-authored-by: Xiaolei Yu --- src/android/Device.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/android/Device.java b/src/android/Device.java index b1a213d..dc874f7 100644 --- a/src/android/Device.java +++ b/src/android/Device.java @@ -98,7 +98,7 @@ public String getPlatform() { * @return android.provider.Settings.Secure.ANDROID_ID */ public String getUuid() { - return Settings.Secure.getString(this.cordova.getActivity().getContentResolver(), android.provider.Settings.Secure.ANDROID_ID); + return Settings.Secure.getString(this.cordova.getContext().getContentResolver(), android.provider.Settings.Secure.ANDROID_ID); } public String getModel() {