Skip to content

Commit 8124857

Browse files
fix(android)!: access Context through webView.getContext() (#201)
Co-authored-by: Xiaolei Yu <[email protected]>
1 parent d9fd05e commit 8124857

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/android/Device.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ public String getPlatform() {
9898
* @return android.provider.Settings.Secure.ANDROID_ID
9999
*/
100100
public String getUuid() {
101-
return Settings.Secure.getString(this.cordova.getActivity().getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
101+
return Settings.Secure.getString(this.cordova.getContext().getContentResolver(), android.provider.Settings.Secure.ANDROID_ID);
102102
}
103103

104104
public String getModel() {

0 commit comments

Comments
 (0)