cordova-plugin-device icon indicating copy to clipboard operation
cordova-plugin-device copied to clipboard

Enable configration for device uuid

Open xuwupeng2000 opened this issue 3 years ago • 3 comments

Feature Request

Motivation Behind Feature

Currently there are rules in China Mainland regarding to how device uuid can be collected and used. Some of the android distribution shops eg: Huawei shop, disallow collecting device uuid. And therefore I wonder if we can support configuration to enable/disable device uuid feature.

Thanks

Feature Description

Support configuration to enable/disable device uuid feature

Alternatives or Workarounds

Alternatively we can comment out #GetUuid() method after the native code is built.

xuwupeng2000 avatar Jul 14 '22 03:07 xuwupeng2000

I comment Device.uuid = getUuid(); public void initialize(CordovaInterface cordova, CordovaWebView webView) { super.initialize(cordova, webView); // Device.uuid = getUuid(); } and add a setDeviceUuid action to set uuid when user agree.

5thgfka avatar Jul 15 '22 16:07 5thgfka

Thank you for feature request.

For privacy concerns, I agree this change is necessary. In addition to your use case, not all users of this plugin needs or requires the UUID. Sometimes they just simply want to know the device android version for compatibility checks. So generating/pulling the UUID when it's not required can raise privacy concerns.

Pull requests are welcome, however keep in mind that this request in particular will be a breaking change as it requires not automatically generating/determining UUID on the platform, which means it would require the application to call on the API to generate/get the UUID when it is deemed acceptable to do so. As a result it may take some time before we can incorporate or merge any pull requests for this feature request.

For the breaking change reasons, I've added to our 3.x milestone, so when we begin preparing for a major release, this won't be forgotten.

breautek avatar Jul 15 '22 17:07 breautek

I comment Device.uuid = getUuid(); public void initialize(CordovaInterface cordova, CordovaWebView webView) { super.initialize(cordova, webView); // Device.uuid = getUuid(); }

Thanks a lot for your message, I confirm it is enough to pass the Huawei app store's validation.

pierresh avatar Sep 14 '22 01:09 pierresh