getSerialNumberSync api error?
See original GitHub issueBug report
when android SDK < 26, getSerialNumberSync() always return “unknown”?
public String getSerialNumberSync() {
try {
if (Build.VERSION.SDK_INT >= 26) {
if (getReactApplicationContext().checkCallingOrSelfPermission(Manifest.permission.READ_PHONE_STATE) == PackageManager.PERMISSION_GRANTED) {
return Build.getSerial();
}
}
} catch (Exception e) {
// This is almost always a PermissionException. We will log it but return unknown
System.err.println("getSerialNumber failed, it probably should not be used: " + e.getMessage());
}
return "unknown";
}
Environment info
react-native info
output:
# "react-native": "0.62.2",
# "react-native-device-info": "^5.5.7",
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (4 by maintainers)
Top Results From Across the Web
API Error Codes - React chat - GetStream.io
Below you can find the complete list of errors that are returned by the API together with the description, API code, and corresponding...
Read more >Example to Get Device Information in React Native
You will see how to access the device information using different ways (Sync, Async, Constant, Hook) in React Native using React Native Device...
Read more >INNOVATIVE TECHNOLOGY LTD SSP. Communications ...
Command Reset Host Protocol Version Get Serial Number Sync Disable Enable Get ... SOFTWARE ERROR 0xF6 Reported for errors in the execution of...
Read more >2021年07月_weixin_39778214的博客_CSDN博客
Error message when i am wanting to create a new user. 2021-01-12 ... getSerialNumberSync api error? 2021-01-12 ... getSerialNumberSync api error? 2021-01-12 ...
Read more >Fix Steam API Error | Simple Guide | Updated - YouTube
Trying to play Steam games, but can't? Getting a Steam API error ? This video shows you some simple steps to get back...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
In case someone stumbles across this from Google and is in the same very specific sitation:
Add this to
patches/react-native-device-info+7.0.2.patch
:Grab these two packages:
Then add a postinstall script:
this is better?