You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/11/16 20:54:24 UTC

[GitHub] [cordova-plugin-device] breautek edited a comment on issue #96: fix(android): Fix Samsung mobile device serial issue

breautek edited a comment on issue #96: fix(android): Fix Samsung mobile device serial issue
URL: https://github.com/apache/cordova-plugin-device/pull/96#issuecomment-554659160
 
 
   ~I don't think this should be merged. This is a solution that I think is awfully specific to samsung devices.~
   
   ~The real solution is to use `getSerial` as described in the android docs. https://developer.android.com/about/versions/pie/android-9.0-changes-28~
   
   EDIT:
   I've looked into this deeper. Starting in android 10, you will require privilege permissions, which normal apps (such as any app in the google play store) cannot obtain. Making retrieving the serial number impossible to obtain. https://developer.android.com/about/versions/10/privacy/changes
   
   SDK >= 28 `Build.SERIAL` will always be set to unknown. `getSerial` with `READ_PHONE_STATE` permission will also always return unknown.
   
   SDK <= 28 `getSerial` without `READ_PHONE_STATE` will raise a `SecurityException` 
   
   SDK >= 29 `getSerial` will always raise a `SecurityException`
   
   While this PR may address the issue for some devices, I don't think working around something that google is trying to block is a good idea. I feel like supporting receiving the serial number should just be deprecated. Something like this could be made into a plugin for those people who still want to receive the serial number at their own risk.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org