Denis
Denis

Reputation: 23

Read Android database file from computer

I have database application on Android device. I would like to have a possibility to read data from this database from Windows computer.

I have found here a .NET library for reading SQLite DB files. So now I need to have access from .NET application to private application database file, which is placed on Android device.

Is it possible? It will be beautiful to know also how to repeat and test such situation using android-emulator

Upvotes: 2

Views: 862

Answers (2)

CommonsWare
CommonsWare

Reputation: 1006614

So now I need to have access from .NET application to private application database file, which is placed on Android device.

That is not possible, except on the emulator and perhaps on rooted phones.

Either store your database on external storage (which you would then mount as a Windows drive when your application is not running), or build an export-to-external-storage option into your application, or otherwise make your data available from places other than the application-local file store.

Upvotes: 3

jmpcm
jmpcm

Reputation: 1852

First, I'm not shure you can retrieve the file from the Android device.

You could use the library you found, but it will only allow you to read from a database file directly on your disk. If you want to read the database from an Android device, you have to create an application on it that returns you the results for the querys you want (I doesn't seems like what you want...).

If you want to read a SQLite file on you disk, you can use this add-on for Firefox: https://addons.mozilla.org/en-US/firefox/addon/5817/

Upvotes: 0

Related Questions