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 17:49:32 UTC

[GitHub] [cordova-plugin-device] breautek edited a comment on issue #111: In android 9.0 Device serial is unknown

breautek edited a comment on issue #111: In android 9.0 Device serial is unknown
URL: https://github.com/apache/cordova-plugin-device/issues/111#issuecomment-554658236
 
 
   This is probably caused by this change that happened as of android 28 https://developer.android.com/about/versions/pie/android-9.0-changes-28
   
   [READ_PHONE_STATE](https://developer.android.com/reference/android/Manifest.permission.html#READ_PHONE_STATE) permission is now required, then you need to call [getSerial()](https://developer.android.com/reference/android/os/Build.html#getSerial())
   
   Starting soon, google will start forcing SDK 28 on everybody, so I think it is safe to just update `getSerialNumber` so that it returns `getSerial()` instead of using the native `android.os.Build.SERIAL;` which will always return `UNKNOWN` now.
   
   I think we `READ_PHONE_STATE` should be an opt-in permission. Not everybody who needs the device plugin may require reading the serial number. Therefore documentation will need to be modified to explain how to add `READ_PHONE_STATE` permission. This could be done either by the use of `<edit-config>` or we could add a new android only preference. I think I'm in favour of the former to reduce bloat.

----------------------------------------------------------------
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