An open API service indexing awesome lists of open source software.

https://github.com/codepath/android-sqlite-links-demo

SQLiteOpenHelper and Basic Networking Sample Android App
https://github.com/codepath/android-sqlite-links-demo

Last synced: 6 days ago
JSON representation

SQLiteOpenHelper and Basic Networking Sample Android App

Awesome Lists containing this project

README

        

# Demo app for SQLiteOpenHelper

This is a demo of how to build a basic image loading app that keeps track of the number of times each image is loaded using SQLite. This app is a useful demo of the following topics:

* Perform networking with `HttpURLConnection` to load remote images into `Bitmap` objects
* Create a database using `SQLiteOpenHelper` and create the database schema
* Query and update data from tables within a database using a `Cursor`

You can review the following key files below:

* [ImageLinksCount](https://github.com/codepath/android-sqlite-links-demo/blob/master/app/src/main/java/codepath/com/sqlitelinksdemo/ImageLinkCount.java) - Model representing the table storing links and open counts.
* [ImageLinksCountDatabase](https://github.com/codepath/android-sqlite-links-demo/blob/master/app/src/main/java/codepath/com/sqlitelinksdemo/ImageLinksCountDatabase.java) - The `SQLiteOpenHelper` that enables a database connection.
* [ImageLoaderLibrary](https://github.com/codepath/android-sqlite-links-demo/blob/master/app/src/main/java/codepath/com/sqlitelinksdemo/ImageLoaderLibrary.java) - Simple image loader library built on top of `HttpURLConnection`
* [MainActivity](https://github.com/codepath/android-sqlite-links-demo/blob/master/app/src/main/java/codepath/com/sqlitelinksdemo/MainActivity.java) - The activity which brings this whole app together.

Check the following Android guides for more details:

* [Sending and Managing Network Requests](http://guides.codepath.com/android/Sending-and-Managing-Network-Requests#displaying-remote-images-the-hard-way)
* [Local Databases with SQLiteOpenHelper](http://guides.codepath.com/android/Local-Databases-with-SQLiteOpenHelper)

Walkthrough:

demo