Hi all,
My question in short is whether there is a way to access the pictures stored in the phone through NAV using the Camera dotNET variable or any other alternative suggested method.
We have added an action to the location card to be able to capture pictures from the camera directly into it (to a new picture field). For that we use the Camera.RequestPictureAsync function (.NET variable: Microsoft.Dynamics.Nav.Client.Capabilities. CameraProvider.'Microsoft.Dynamics.Nav.ClientExtensions'). This works fine, more or less what described here:
https://community.dynamics.com/nav/b/sauravdhyanimicrosoftdynamicsnav/archive/2016/06/06/microsoft-dynamics-nav-2016-implement-the-camera-in-c-al
However we would like to have another option that allowed the users to select the pictures that are already stored in their phones (instead of taking the picture through the camera). So they take the picture(s) first and later, from the location card, select "Upload Pictures" and browse through the pictures/files in the phone and select them for uploading (ideally several pictures at a time, as we have several "picture" fields).
I have done an experiment using the File Management, openFileDialog function, but it does not work (The operation cannot complete beacuse it uses a feature that is not supported (.NET framework interoperability).
gteFileName := FileMgmt.OpenFileDialog('Select File','',Text50001);
That is expected, it is described in the client limitations:
https://msdn.microsoft.com/en-us/library/hh168959(v=nav.90).aspx#General
Any suggestion would be appreciated.
Thanks,
Tomigs
Answers
Please ignore the query above, I never got to make this work properly, but I have managed to simplify this problem.
So basically my question is, is it possible to make NAV to upload several pictures at the same time from the phone?
I need to allow the users to select several pictures from the phone and then they would be sent straight away to NAV. If they have to do it one by one will take them a lot of time.
I can use the function UPLOAD to browse and select files in my phone, but that allows only to select one picture at a time.
I have seen a development to upload several times from a PC folder, but in this case the files will be in the phone which I suppose can make things more difficult. That would be a good workaround: storing the pictures in the phone in some known folder and then uploading from there to NAV, but I don't know if it would be possible for NAV to access a folder in the Android phone.
Thanks,
Tomas
Our conclusion is that we cannot select several files (pictures) at once and send them to NAV. So will exclude the development from NAV.
Our plan is to make the phone users to save the pictures to some shared drive (like Google Drive or Microsoft OneDrive) that should be synced with a folder in the server.
Alternatively build some Android app for the same purpose: sending the pictures to one folder accessible by the NAV server.
Once the pictures get to the server, we can loop through the files on the drive using the NAV Job Queues and upload them to NAV.
Tomas