Location of database file in device for alloy titanium application - android

I am new to alloy mvc framework.I was working in projects using SQLite.I kept SQLite file in asset folder and did query works in application.
An instance of SQLite file is created in simulator folder. My question is can we see database file in ios ,android device and where it is stored in device.
Please suggest me ..
Thanks in advance.

In Android, you can find your database at this location
/data/data/your.package.name/databases/your_db_name.db

for iOS simulator, you can find the database at this location :
/Users/USER_NAME/Library/Developer/CoreSimulator/Devices/NOW_SELECT_YOUR_DEVICE/data/Containers/Data/Application/SELECT_YOUR_APPLICATION/Library/Private Documents/
Normally USER_NAME/Library the Library folder is hidden, you have to unhide it first.
You can use the Xcode's Organiser to access the database on the device.
First open the Xcode's organiser, then select your device, then choose your application, now download container from below settings icon, you will get an .xcappdata file.
Now select the downloaded container i.e. .xcappdata file and Show Package Contents. Now go in AppData/Library/Private Documents. Here you will get the database of your application.
Hope this will help you.

Related

Where is the SQLite DB I've created using Phonegap app

I am building my first Android app using Phonegap and the Phonegap app on my android tablet. It uses a SQLite DB. I want to be able to view some of the tables in the DB. I have rooted my tablet and installed several apps like SQLite Debugger, sqlite DB reader, file manager. None of them find the db. It is not listed under the Phonegap app or under the com.mydomain.app notation I set in the config.
Does anyone know where to find it?
Thanks
you can see in eclipse file explorer, com.mydomain.app then database folder.
Note:If you not inserted data,you can not see
I bought and installed SQLite Editor on to my tablet. It has a good search feature and found it. It was in:
/data/data/com.adobe.phonegap.app/app_database/http_192.168.1.117_3000/0000000000000001.db
The IP address is the local IP that phonegap server is running on.

Cannot find my packagename in file explorer?

I am using ADT plugin in Linux os .I am creating an android application which uses Sqlite database. I have viewed my database table many times using SQLite Browser .But now in file explorer when I click the Data it is not listing the data/your package name/databases/yourdatabse.db .How can I get the package name in file explorer?
I want to view my database table.Is there any other way to find it?
If its Real device we can not See Data folder inside data
but if its Emulator
Go to
data>data> Search for your package name>database>yourdatabse.db
Search your package name. Then inside database folder yourdatabse.db will be created.
Go to
data>data> Search for your package name>database>yourdatabse.db
Search your package name. Then inside database folder yourdatabse.db will be created.
If it is non-rooted real device then you can not See Data folder inside data.But all the emulators are rooted device .So in Emulator
Go to
data>data> Search for your package name>database>yourdatabse.db

How can I find my SQLite database file on my computer?

I implemented my first app using Xamarin Studio (Mono for Android). This app stores some data in a SQLite db, which works fine on a Sony Tablet S device.
My question is: is there a way to get db file and see, for example, its size?
I looked up to the following path
/data/data/My-Application-Package-Name/databases/My-database-name
but it doesn't seem to exist.
Thanks for any help!
You can use Eclipse to go right to it using the sqlite manager plug-in (http://www.coderzheaven.com/2011/04/18/sqlitemanager-plugin-for-eclipse/)
Download the *.jar file from the website I reference above to the
"dropins" folder in eclipse (open your eclipse folder and you should
see it)
Then restart eclipse and go to the DDMS. You may have to do
windows->views-ddms if it isn't already being displayed...
Select your device from the left panel then use the file explorer to go to your data
directory/YOURAPP/databases. Hopefully there will be an icon that
shows up when you select your database. If not, rename your database to use the "db" ext.
Click it and it should open in the manager tab.
This is a valid database location (//data/data/My-Application-Package-Name/databases/My-database-name), but you can access it from file managers if you have root access only.
Look how it can be done here. Otherwise, if you want to get some info trough the code, you're doing something wrong, so publish the code and logcat.

Android SQLite path

I am working with SQLite in an App. It writes to the database, etc., with no problem. However, I can not find this new database. I have tried changing the directory with cd /data/data/packageName/databases, but it says "no such file or directory". Also, this database is not found when I click on the File Explorer in eclipse. My logging tells me the database was created and that it is being written to. I think I need to set the path in the shell or something to that effect using adb, but I have no idea how to do that. Can anyone give me some instruction? Also, I am using my phone for development. The database also does not show up when using the emulator.
Thanks very much.
Matt
Matt,
This thread gives a good explanation on why you might not be able to access the data folder on your phone.
Can't access data folder in the File Explorer of DDMS using a Nexus One!
You can still test the Sqlite code though. Just boot up an emulator. The emulator will have no access restrictions. Once it's booted up you can use the ddms tool (located in the tools directory under your android SDK install folder). It has a File Explorer and you can download the files from the /data folder.
Also, I am using my phone for development.
You cannot access the database on a standard Android device except via your own application code.
Your options are:
Do this sort of testing on an emulator, in which case you can access the directory that you are failing to access on the device
Add a database backup feature to your app, that copies the (closed) database to external storage, so you can examine it
Root your phone (leastways, I am under the impression this can help get you to this directory -- haven't done it myself)
The database also does not show up when using the emulator.
Try harder. If you can store data in the database and read data out of it using SQLiteDatabase, then the database file is there.

how to open Iphone's database(created) in Android?

Database is created in Iphone using SQLite.Now I want to use same database file in Android and insert the data into tables.How to do that?
Android Developer
The easiest way is to copy the file in your applications folder say assets folder and copy the database from the local file, first time the app is loading.
this link will give you a solution.

Categories

Resources