Tore
Tore

Reputation: 1264

Android access file system nexus 7

Background

I am developing an android application that will only be used on Nexus 7 tablets (my team is also providing and has access to the hardware).

Problem

The app needs to be flexible to allow content to be added (by non-tech savvy users) to the app and accessed without an internet connection.

Our Idea

Android devices have a file system. We want to design a file system layout such that the people adding content to the application can drag and drop into the correct folder.

e.g.

AppName
    Images
    Videos

If the user adds a video to the videos folder of the device under our app, it will show up in the app.

We understand that this could easily go wrong (accidentally delete a folder, etc.) but this is out best attempt to solve this without having to update the app ourselves whenever new content comes up (and remember, no internet connection!).

The Question

Is it possible to access the android file system contents and insert them into an app as described in the "Our Idea" section? If so, how?

Upvotes: 0

Views: 221

Answers (1)

Libin
Libin

Reputation: 17085

Yes. This is possible if you don't bother about content security. You can copy the content to any of the file system path in sdcard and your app can look for the folder and read the files .

Example , you can create a folder in sdcard as

   sdcard/appname/media/

and create a layout to access the files in the device, and when user selects the files provide option to copy it to your sdcard/appname path.

Check this link

http://developer.android.com/training/basics/data-storage/files.html

Note : the sdcard path can be accessed if you connect to any external system ( PC).

Upvotes: 1

Related Questions