cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements
Do you have an idea for Dropbox Paper? Share it with us here!

default

yes

Highlighted

How can I access an offline file with my app on Samsung tablet

Explorer | Level 3

Is it possible to open a database file that I have made available offline with an app I have developed for a Samsung Tablet ?

I currently save it directly from my Windows Desktop to a folder on the tablet using File Explorer, but I also save a copy of the file to Dropbox and it would be better if I could just pick up the file from the Dropbox offline folder.

Any help is appreciated.

Brad

Tags (1)
4 Replies

Re: How can I access an offline file with my app on Samsung tablet

Star Collaborator | Level 19

Hi @BradHenderson,

I'm not sure what exactly You want to do, but there are different possibilities. One option (may be better) is to access the database using Dropbox API access (Java SDK). In such a way your application can access directly to Dropbox server, without the mobile Dropbox application. Another option is your application to 'catch' the database file through the Dropbox application content provider (Android API), using Intent 'catch', for example. Just some examples. Of course, different implementation variants are possible - here I post only an idea.

Hope this cast some light. winking face

In addition, if You intent using particular application for your private use only (not for production), you can access the 'offlines' using the path (relative to the flash storage): "Android/data/com.dropbox.android/files/u<ID number>/scratch/<the dropbox relative path>". So, You can access any available files - set to offline or temporary available. Be careful while using such way!

Reply
Loading...

Re: How can I access an offline file with my app on Samsung tablet

Explorer | Level 3

Thank you for your suggestions.  I want to access the file as an offline file as I wont always have access to the internet.  I do intend to use my app for private use only so your suggestion to use  "Android/data/com.dropbox.android/files/u<ID number>/scratch/<the dropbox relative path>" would be the best method.  I have changed the file access path in my app to: what you suggested and I get the following error:   open failed: EACCES (Permission denied)

I have searched online but can't find out how to give my app permission to access this file.  

Reply
Loading...

Re: How can I access an offline file with my app on Samsung tablet

Star Collaborator | Level 19

Hmm... It seems strange. You don't need any special access permission (more than usual - <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> or WRITE_EXTERNAL_STORAGE in the manifest). thinking face

Are You sure that everything is organized properly? Again to notice: paths are relative to your emulated external storage. This storage is usually referred as "/sdcard/", which in turn is link to "/storage/emulated/0/" - usually, but you have to check for. In the path - the mark "<ID number>" is specific number for the particular connection and not a constant string. Did you replace it accordingly? The "scratch" directory is equivalent to desktop "Dropbox" directory. Inside file structure should be the same, but note - only for files marked for offline access or such in use recently! Did you check all of this using your mobile device file browser and organize "<the dropbox relative path>" accordingly (again this is not a constant)?

Also this place, according to Android, is external storage although not placed on external media (for historical reasons). You must not try access the internal storage! 😈 Access to space of other application there is impossible without root access (and not need).

Hope this gives some direction. winking face

Reply
Loading...

Re: How can I access an offline file with my app on Samsung tablet

Explorer | Level 3

Здравко

Sorry for the late reply but I couldn't test before having to go away for a week, it is now working you were correct, I just had to provide the correct permissions with:   "android.permission.READ_EXTERNAL_STORAGE"  and it worked.  Thank you for your asistance.

Brad

Reply
Loading...
Syncing and uploads

Have a question? Our Dropbox Community is here to help!

Post your question or search for an answer below.


Learn more about using the Community by reading our Community Guidelines.


Hi anonymous,

If you need more help you can log a ticket with our Support Team here (expected response time 24 hours), or contact us on Twitter or Facebook.

For more info on available support options, see this article.

If you found the answer to your question, please 'like' the post to say thanks to the user!

How can I access an offline file with my app on Samsung tablet
905 Views
4 Replies
0 Likes
Solved! : See solution
Looking for Dropbox Paper users
Do you use Dropbox Paper?

If so, we're starting a design feedback group and we'd love for you to be a part of it. We have paid feedback opportunities - both in person and remotely - for English speaking users based in the US.

Interested? Take the short survey to let us know.

Take the survey
Who's talking
Top contributors to this post