Page 1 of 1

How to work with a database on the mobile device?

Posted: Wed May 22, 2019 2:47 pm
by Aracknid
Hi,

Our mobile app has a database on the mobile device. I've downloaded "DB Browser (SQLite)", and I can manually copy the db from the device to my host machine and manually look at it.

I was wondering if it is possible to write user code in a code module to execute sql queries against the database on the device itself?

If so, can someone point me in the right direction.

If not, how do people typically access the data on the device during a test run?

Thanks,

Aracknid.

Re: How to work with a database on the mobile device?

Posted: Thu May 23, 2019 9:48 am
by McTurtle
Hi Aracknid,

I have never done this myself. But... If I had to, then I would try this approach described here that works via ADB.

Inspecting SQLite databases on Android and iOS

After testing if I can query values via ADB, then I would implement the same approach in C# by reading the ADB stream in the same way as getting the device address in the method GetFirstConnectedDeviceNames() in this forum post:

Adding a endpoint automatically

Were this hints useful? I am interested myself, if this works :)

Regards,
McTurtle