Arcadius Wiki Android App
Description
Arcadius Wiki App fetches batches of random articles from Wikipedia using dictionary of English words. When the articles arrive the user has the choice (in the Settings Menu) to be notified by sound, vibration as well as on the Android Wear Watch. In addition to Wikipedia articles Arcadius Wiki App makes calls to Shutterstock API (with Authentication) to fetch corresponding photos.
App Permissions
Arcadius Wiki App uses the following 4 permissions:
INTERNET to perform network access and three more permissions required by the sync adapter:
READ_SYNC_SETTINGS,
WRITE_SYNC_SETTINGS,
AUTHENTICATE_ACCOUNTS
Content Provider
Arcadius Wiki App’s ContentProvider is called ArcWikiProvider using SQLite database called arcadius.db with one table called arcwiki.
Backend
Arcadius Wiki App talks to two backend APIs:
Wikipedia.org API
Shutterstock.com API
Sync Adapter and talking over network
Arcadius Wiki App uses HttpURLConnection via SyncAdapter called ArcWikiSyncAdapter for all the three calls: 1. to Wikipedia to fetch the article and 2. to Shutterstock twice: first to authenticate and get url for the matching keyword and second to fetch the photo from url obtained in the previous call.
Loader
Arc Wiki App implements WIKIARTICLE_LOADER
User/App State
Below are 4 examples of how Arc Wiki App correctly preserves and restores the app state:
When an activity is displayed, the same activity appears on rotation.
User text input is preserved on rotation.
When the app is resumed after the device wakes from sleep (locked) state, the app returns the user to the exact state in which it was last used.
When the app is relaunched from Home or All Apps, the app restores the app state as closely as possible to the previous state.
Notifications
Arcadius Wiki App uses notifications to indicate a context change when new batch of articles from Wikipedia arrived. User is notified by sound, vibration and on Android Wear Watch with message: “Arcadius Wiki - Check out the new articles
Share Action Provider
Arcadius Wiki Appp implements ShareActionProvider to share articles with an outside application like messenger, email or note taking app.
Broadcast Events implementation
Arcadius Wiki App intercepts broadcast events and responds to them to display article content and photos properly.