Read local text files Android

I am developing an app that will connect to an external GPS receiver and allow the user to navigate to predefined points in the field. I’ve got the communication working with the external receiver but now I need to have a convenient way to read a local file with the coordinate information in it. This can just be a csv file. Do you have any insight into how to do this? I would like to store the point file in the Documents folder.

A web app cannot read a local file created in your Documents folder. There’s a very good reason for this: would you want any random web page to be able to rummage through that folder and upload what it finds?

There are several ways to do what you need in your app, however. For example, if the CSV file were on your server, in the same folder that you deployed your app, your app could read it.

Another option might be to have your app speak to the external GPS receiver and get the data directly.

I’m sure there are other possibilities as well (as well as details to be worked out).

Thanks George. This is actually a native app that I’m building with Voltbuilder.

That makes a difference. When creating a local app, you can use a Cordova plugin to read from the native filesystem.

Here’s one which could work: