SQLite Database Browser is an open source visual tool which can be used to create, design and edit database files compatible with SQLite. You can use this “SQLite Database Browse” when dealing with android internal databases. In my previous post i gave you the steps to export internal databases which are stored on the Emulator. This browser will simply allow you to view the structure and data stored in a particular database you have exported.
This browser is really helpful when creating internal databases for android applications in which case you need to debug.
“”If there are any errors in the query of creating tables, you’ll have to delete the database from the Emulator using the “File Explorer” view because although we change the query, the changes won’t apply until the existing database (with the same name) is on the Emulator. The reason is onCreate() of SQLiteOpenHelper class is called when the database is created for the first time(or this executed when application is launched for the first time after installation) and this is where the creation of tables and the initial population of the tables happens. Therefore, though you change the CREATE TABLE query it won’t replace the existing erroneous table.
SQLite Database Browser
- First open the database which you have exported. The “Database Structure” view will let you see all the data tables in the database.You can explore each table to view the structure of each table. I exported EmailProvider.db.
- Also you can view the data in each table from “Browse Data” tab.
Thank You! 🙂
When creating internal databases for your Android application, you may be required to test the database structure and the data stored in it. In Eclipse it provides a mechanism to export the files stored in an Emulator. Today I’ll give you the guide to export a particular database from the Emulator.
- First, run the application on the Emulator. If you haven’t run the application this view will be empty.
- Next Go to Windows–> Show view–>Other–>Select ‘File Explorer’ from the show view dialog
- The file explorer view will be added next to the console. Now explore the data folder as follows to find the database you need to export.
data –> data –>Choose the application by the package name –>databases –>Select the database
- After that select “Pull a file from the device” icon on the R.H.S. Then ‘Get Device File’ dialog will appear and you can save your database on your PC.
Thank You! 🙂
When testing a map application which uses GPS functionality on the Emulator you can manually set the current latitude and the longitude using the “Emulator Controller” view provided by the Eclipse IDE. In this post I have given you a full guide to create an emulator with GPS support and how to set the location on Emulator. I hope this guide will helpful for you. 🙂
Emulator with GPS Support
First of all check whether your Emulator supports GPS. If not you can edit your AVD by adding it as a new property to Hardware as follows.
- Select AVD Manager icon–>Select the existing device–> Edit–>
- Check the Hardware properties (If it doesn’t support)–>Select New–>add “GPS Support” from the drop down list
- Now the new property will be displayed as follows. Select Edit AVD.
Steps to set the location on Emulator
- Goto Windows–>Show View–> Other
- Select “Emulator Controller” available under Android
- Now the Emulator Controller will be added as another tab next to the Console.
- You can set the location at “Location Controller” and when you click “Send” the Emulator will detect it as a new location Change and if you have designed to reload the map when location is changed, it will animate your map to the given new location.
Thank You! 🙂
The (Android Virtual Device) AVD Manager downloaded with the SDK can be used to create virtual devices to test the android applications. First, run the AVD Manager icon in the Eclipse IDE. Now you can create an Emulator by giving the following attributes.
- Name : Device-1
- Target : Android 2.3.3(API Level 10)
- SD Card Size : 64 MiB
- Skin : Default(WVGA800)
- You can change the ram size, density and heap or add any new property in Hardware as you wish.
Run an application on the Emulator
Select the application and choose the “Run Configuration” from the menu item “Run”. Now you can select a virtual device which is compatible with the target SDK version, from the list of devices available. The devices you have created using the AVD Manager will be added to this list.