Native Mobile Action TakePicture not working on test environment

1
While testing taking a picture locally through the Make It Native app, it works as expected. But when deployed on the test environment, it doesn’t. On a mobile android device, with an apk built with the native builder, pushing the button to take a picture for the first time, the app does ask for permission to use the camera, but although permission is granted, nothing happens after that. When pushing the button to take a picture again, also nothing happens. Anyone experienced this behaviour before and/or can help me into the right direction? Thanks in advance! (Mendix version 8.2.1) Gr, Bart
asked
3 answers
3

For the benefit of the community, here's Mendix support's answer: 

 

It turns out this issue is caused by missing permissions. When the correct permissions are added to your app, the camera will start up.

For iOS this was fixed in the latest commit of the Native Template: https://github.com/mendix/native-template/commit/cddc3109c186591201a73a216afdeae783ea62ca by adding default permission messages. You can fix this in your project by syncing your fork with the Native Template, or by manually changing the ios/nativeTemplate/Info.plist file in the master branch of your repository. You can copy the contents from the latest commit of the Native Template repository and customize where needed. Commit your changes directly to the master branch.

For Android you can fix this by editing the android/app/src/main/AndroidManifest.xml file in the repository for your native app. Add the following to the file, after the existing uses-permission element:
 

<uses-permission android:name="android.permission.CAMERA" />

<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<uses-feature android:name="android.hardware.camera" android:required="false" />
answered
1

Hi Bart, did you check if the user in question is also User of the NativeMobileActions module? 

answered
1

Did you give the picture object a name? 

answered