Closed SonjaNueAmperias closed 8 months ago
Hey, thanks for the detailed bug report! I admit that I did not properly test this out on older devices. I'm sure permissions need to be handled differently in that case, I'll look into it and try to address the issue soon.
@SonjaNueAmperias I just released v0.4.3
. Please try that out and let me know if that works.
@YoussefHenna, thank you so much for your fast response and the fast solution. For the Android 10 device the new version is working perfectly fine 🎉.
Unfortunately, it still does not work on the Android 6 device. However, the behavior has changed. The app no longer crashes. Instead, the In-App-Browser opens showing a blanc screen (see screenshot). When I copy the URL from the In-App-Browser and paste it into the chrome app, I can go through the linking flow. Then after I get redirected to the app I get the following errorMessage and code.
code: unknownError
errorMessage: null
Do you have any idea where the problem is coming from? As the error only occurs on the very old device, I don't know how important it is to investigate this error any further. I will test other old Android versions with the help of the emulator and will let you know if I notice anything.
Thank you so much for you help!
Hmm. This package only launches the Enode link SDK, so this issue might be an underlying issue with the Enode SDK itself rather than something going on with this expo implementation of it. It's possible that it does not support older android versions, I'd say you can contact them through here: https://developers.enode.com/support, they're a supportive team and tend to help out when asked.
Testing out other devices is also a good idea, please let me know how that goes!
Hey, I have issues with older Android devices. I am currently testing on two devices:
This expo module works fine with new Android devices and all iOS devices, but with the two devices I listed above, I have problems with the bluetooth permissions. I believe that the problem comes from the fact that new permission handling for bluetooth was introduced with Android API level 31.
How the error happens:
Android 6 I open the app and get the URL to link the electric car from our BE. When I try to open the URL with
ExpoEnodeLinkSDK.show(...)
the app first requests the permission for the location and afterwards crashes. The terminal prints the following error:Android 10 I open the app and get the URL to link the electric car from our BE. When I try to open the URL with
ExpoEnodeLinkSDK.show(...)
the app first requests the permission for the location and afterwards doesn't show the link UI flow, but I get the following code and errorMessage in the result listenerExpoEnodeLinkSDK.listenToResult((code, errorMessage) => {...}
.For this device / Android version the app doesn't crash.
Other observations
Differences I noticed for newer and older Android versions: When I go to app permissions in the system preferences for newer devices I see "Nearby devices" listed as permission. For older devices this permission does not appear (see screenshots)
Device with Android API level 33
Device with Android API level 23
Any ideas? I've been stuck with this for a week. I tried to add the permissions to app.json and app.config.ts and also tried to request the permission with
PermissionsAndroid.request(...)
before the linking process, but I couldn't get it to work.Does anyone have the same problems? It would be great if someone could help me. Thank you very much :)