O'Reilly logo

Android Application Security Essentials by Pragati Ogal Rai

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Database

A database is the best option to store structured data. Android provides support for SQLite using the android.database.sqlite package. This database is a part of the Android stack and the system administers the database. Using SQLite for mobile operating systems is a prudent choice as it is small and requires no setup or administration. And it is free!

Once created, the database files are sandboxed with the application and are stored in the /data/data/<application-path>/databases/ directory. This private database will be accessible to all the components of the application but not outside the application.

The following code snippet shows how to create a database that resides on the internal memory. The class will extend the SQLiteOpenHelper ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required