Native applications - Error trapping/ debugging

0
Hi All,  I have a native application that uses the ‘GetCurrentLocation’ Java action from the NanoFlowCommons module. When I build the apk and run it on my device i get a generic system error. I’ve built a microflow to try and trap the error and find out what is going on I’ve attached it below. however I don’t seem to be able to get passed the java action ‘GetCurrentLocation’ It just pops a message up with a generic error, also attached below.   My question is where would this error be reported if it happened in the native application on my device? 
asked
6 answers
1

Just to update this thread, If anyone is having the same issue

If i set the timeout to empty and maximum age to empty it seems to have worked.

 

answered
0

https://docs.mendix.com/howto/mobile/native-debug

Please see the above link for native app debugging and also the OS Logs sections to see detailed information from the logs about any error. Hopefully it will help you to understand the issue. 

answered
0

You can add custom error handling on the activity in your nanoflow. You then have the latestError variable with the exception. Whenever I call some device function or server interaction, like calling a microflow or running synchronize, I always add custom error handling. You can just show the error and ask the user to copy/paste it. Or create some errorlog entity that you write to and synchronize to the backend. When I handle an exception I also log an error, useful during development but of no use in distributed apps

answered
0

Hi Thanks four your responses.

I’ve added error handling and also tried to debug using chrome outlined in the documentation.

I seem to get  a null exception because the object is unidentified. This happened on the first try. Now I just recieve ‘Get location timed out’

If is any specific settings on the java actions I should use? 

answered
0

Maybe your app is not allowed to access the device location? Did you include the location permission in AndroidManifest.xml? Also check the device settings for the app permissions

 

Edit: Does it work in the Make It Native app? If so, there is an issue with your build. Double check permission settings in AndroidManifest.xml

answered
0

Yes, it worked when I gave those two fields as empty

answered