[solved]Phone Client - Access to files (pictures)

TomigsTomigs Posts: 58Member
edited 2018-03-09 in NAV Three Tier
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:

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:

Any suggestion would be appreciated.



  • TomigsTomigs Posts: 58Member
    Hi all again,

    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.

  • TomigsTomigs Posts: 58Member
    Just to give an update on this.

    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.

Sign In or Register to comment.