I recently upgraded to platform 2.9.1. The android build fails to save images from the only on the Kindle Fire tablets. Oddly, the camera functions normally in the Android emulator using Android 5 and 9 and on a Samsung Galaxy 9 phone. However, on an old Kindle Fire running Fire OS 5.x and a new Kindle Fire HD 10 running Fire OS 7 the camera fails to return images to the app (there is no “OK” button present after taking a picture. After taking a picture control returns to the app with no image present)
I see the following errors in the logs:
[ INFO] 03-02 16:17:38.417 14684 14815 D Forge : Native call file.getScriptURL with task.params: {“file”:{“uri”:“file:///storage/emulated/0/Android/data/com.kidreports.app.client/files/Pictures/1614727058117.jpg”,“name”:“Image”,“type”:“image”,“width”:1920,“height”:1440}}
[ INFO] 03-02 16:17:38.419 14684 14815 W Forge : Requested unknown permission: android.permission.READ_EXTERNAL_STORAGE
[ INFO] 03-02 16:17:38.419 14684 14815 W Forge : File object requires property: endpoint
[ INFO] 03-02 16:17:38.437 14684 14684 D Forge : Returned: {“content”:“file:///storage/emulated/0/Android/data/com.kidreports.app.client/files/Pictures/1614727058117.jpg”,“callid”:“3DAF0281-8A3F-4E89-8344-ACF8BBB3FE9F”,“status”:“success”}
[ INFO] 03-02 16:17:38.440 14684 14684 E Forge : [object Object] – From line 7653 of https://localhost:31929/src/scripts/scripts.js
The offending lines of code are as follows:
forge.file.URL(file, function (url) {
url = forge.httpd.normalize(url);
The project is using the latest version of file - version 2.26.
I see a problem with permissions from reading external storage in the error logs. Do you have an suggestions on how to fix this problem?