GitHub - IanDarwin/Android-Cookbook-Examples: Contributed code examples from O'Reilly Android Cookbook. See #user-content-table README below!
Ian Darwin
A re-usable About dialog.
-
Ian Darwin
Info about device and screen
-
Ian Darwin
Simple ActionBar demo(s)
-
Ian Darwin
Add a contact
Shows ContactsContract, content provider
Ian Darwin
Using AdMob with interstitial (inter-Activity) ads.
-
Ian Darwin
Ashwini’s Google Analytics for Android Demo, slightly updated.
-
Rachee Singh
Graphing
-
Wagied Davids
RSS Reader
Works under Maven; Eclipse fails w/ Maven Configuration Problem
Ian Darwin
Installs another app
Downloading, package management
Ian Darwin
Shows App Shortcuts, which appear with long-press on app’s launcher icon.
-
Ian Darwin
Compilable example of the Application Singleton pattern recipe.
-
Ian Darwin
Demo of AsyncTask
-
Ian Darwin
Contact picker with autocomplete
-
Ian Darwin
App can update itself
see AppDownloader
Ian Darwin
Use Android Backup scheme.
-
Ian Darwin
Using BlueTooth to connect
-
Ian Darwin
Bluetooth Connection
-
Ian Darwin
Use the now-defunct Browser Bookmarks content provider
-
Ian Darwin
Add appointment to Calendar
Calendar via Content Provider
Ian Darwin
Pretend a call happened, for testing
-
Johan Pelgrim
Intercept an incoming phone call.
-
Johan Pelgrim
Intercept outgoing phone calls.
Compiles and runs, but doesn’t intercept the call.
Ian Darwin
CameraIntent - get the camera to take a picture, using androidx API
-
Ian Darwin
Demonstation of Card widget.
-
Ian Darwin
GUI demo
name says it
Ian Darwin
Attempt at a custom layout manager.
-
Ian Darwin
List of bookmarks from Bookmarks Content Provider
Browser ContentProvider
Ian Darwin
List of ContentProviders
-
Ashwini Shahapurkar
Implement a ContentProvider
-
Ian Darwin
Test it
-
Ian Darwin
Simple Cordova (nee PhoneGap) cross-platform (web-based) toolkit demo.
-
Wagied Davids
Time-based activity
-
Ian Darwin
Cryptography anyone?
-
Ian Darwin
Application Widgets have a live display on the home page, like the standard Clock program.
-
Ian Darwin
How to load data properly using CursorLoader
-
Ian Darwin
Menu
-
Ian Darwin
Submenu, created programmatically
-
Rachee Singh
Toast
-
Ian Darwin
Create a database from an SQLite .db file in 'assets'.
-
Ian Darwin
Fake up a Cursor from a list of files
-
Ian Darwin
Example of various DateFormat usages (the Android one, not java.text nor java.time).
-
Ian Darwin
A pedagogic project that can be used to show off Smali for short functions.
-
Ian Darwin
Dialogs
-
Ian Darwin
A simple Drag-and-drop example.
-
Ian Darwin
Demo of "Dreams" (4.x screensaver)
-
Wagied Davids
Send contents of EditText via email
-
Marco Dinacci
Attach file to email
-
Wagied Davids
Java + JavaScript Epoch Calendar
-
Daniel Fowler
5 Ways to Wire an Event Listener.
-
N/R. Pending check.
Access FB API
-
Wagied Davids
Face locator API in photos
-
Ian Darwin
Demo of FileProvider.
-
Ian Darwin
Internal and external files.
-
Ian Darwin
Find Me X
IllegalArgumentException: Incomplete location object, missing timestamp or accuracy, Progress:334
FloatingActionButtonSnackbarDemo
Ian Darwin
Demo of 'fab' Floating Abstract Button
-
Ian Darwin
Flutter is a new SDK for cross-platform development
-
Ian Darwin
Using a custom font
You need to provide the font file! Example uses Iceberg font…
Ian Darwin
Simple Fragment and List-Detail Fragments in one project
-
Ian Darwin
Simple Photo Gallery example.
Deprecated
Ian Darwin
Google Cloud Messaging - receiver
-
Ian Darwin
Google Cloud Messaging - sender
-
Ian Darwin
A program that shows the Storage Facility to prompt for all files.
-
Ian Darwin
Haptic Feedback recipe.
-
Ian Darwin
HelloWorld
SDK
Ian Darwin
HelloWorld
Eclipse ADT
Ian Darwin
Hello World with Gradle but NOT Studio.
-
Ian Darwin
HelloWorld using Maven with android-maven-plugin.
-
Ian Darwin
HelloWorld of StudioTesting
-
Adrián Santalla
ADT Testing - subject
-
Ian Darwin
ADT Testing - Tests
-
Ian Darwin
A Home Application
Shows running a program
Ian Darwin
List View with Icon
-
Ian Darwin
ImageButtons!
-
Ian Darwin
Intents
-
Ian Darwin
IPC - Inter-Process Communication, simplified demo (2 versions, alas).
-
Rupesh Chavan
IPC - Inter-Process Communication, simplified demo (2 versions, alas).
-
Ian Darwin
Getting data from Java to JavaScript and back.
-
Ian Darwin
Demos of java.time date/time API
Actually JSR-310 API; almost same but different package
Ian Darwin
Simple example of JSON parsing using built-in JSONObject.
-
Ian Darwin
Kotlin version of Volley demo
-
Ian Darwin
Layout Border Demo Project Source for Android
-
Marco Dinacci
ListView
-
Ian Darwin
ListView
-
Rachee Singh
ListView with empty list: don’t show blank screen!
-
Ian Darwin
ListView with section headers
-
Ian Darwin
Local Broadcast Receiver
-
Ian Darwin
This is the Google API Maps V2 Demo.
-
Ian Darwin
Adding a Google Maps V2 MapActivity to a project
You must ask for permission from Google (get and provide your own Google API key).
Ian Darwin
Search the Play Store
-
Ian Darwin
MaterialDesign demos
-
Ian Darwin
Play media
-
Ian Darwin
Media Player demo from Marco Dinacci, thanks.
-
Marco Dinacci
Simple sound recorder
-
Ian Darwin
Menu Action Handling
-
Ian Darwin
Using a Messenger to send requests to a Service
-
Ian Darwin
Try to invoke native code from JavaScript.
-
Ian Darwin
Native Development Kit
C Code
Ian Darwin
Notifications
-
Ian Darwin
UI for picking numbers
-
Ian Darwin
Demo of OAuth2 to Google Tasks.
-
Marco Dinacci
OpenGL graphics
-
Wagied Davids
Rotation
-
Rachee Singh
Basic OSM map app demo.
Builds with Maven, not with Eclipse. Maybe m2e aar support, isn’t, yet.
Ian Darwin
OSM Map with a map marker overlay
Compiles, runs, doesn’t load map tiles; needs upgrading to osmdroid-android 5.5
Ian Darwin
OSM Map with touch event handling.
Builds with Maven, not with Eclipse. Maybe m2e aar support, isn’t, yet.
Ian Darwin
Create and share a PDF
-
Ian Darwin
Shows asking for permissions at runtime, i.e,. "the new way"
-
Shraddha Shravagi
HTML5 app using phonegap/cordova
-
Ian Darwin
Pinch-and-zoom graphics demo
-
Ian Darwin
Preferences
-
Ian Darwin
Demo of a pop-up indefinite progress dialog.
-
Ian Darwin
Using a graphing library
-
Ian Darwin
Show use of 5-star RatingBar as used in rankings, surveys, &c.
-
Ian Darwin
How to reboot, and why you can’t
-
Ian Darwin
= RecipeList - use an AsyncTask to download data over the 'net via HTTP.
-
Ian Darwin
Demo of RecyclerView, the faster ListView.
-
Ian Darwin
This folder is created automatically by Eclipse and can be ignored.
-
Wagied Davids
Using a graphing library
-
Ian Darwin
Demo of Room, the official Android ORM.
-
Ian Darwin
A simpe runtime log facility
-
Ian Darwin
Scan barcode using ZXing app via Intent
-
Ian Darwin
Trivial example of one Activity (screen) starting another.
-
Colin Wilcox
Sends an SMS
-
Thomas Manthey
Use Accellerometer to detect if the user has shaken the device.
-
Rachee Singh
Code for r2051, Checking Whether a Device Is Facing Up or Down
-
Ian Darwin
Demo a couple of kinds of Service.
-
Ian Darwin
ICS "Share" action
-
Ian Darwin
Run a Unix/Linux command via Runtime.exec, capture the output.
-
Ian Darwin
User account on device
-
Ian Darwin
Calendar
-
Ian Darwin
Trivial Dialer - launches Dialer app via Intent
-
Wagied Davids
Common code for flixel-gdx-based gaming demo.
Game starts, can move left-right only, no scenery. Fails on Intel phone/emulator
Wagied Davids
Start of a pool/billiards game using AndEngine.
-
Saketkumar Srivastav
Simple Torchlight/Flashlight example.
(Most devices now have a built-in control for this)
Wagied Davids
The main code is from the "Sliding Drawer - Top Down" recipe
-
Ian Darwin
Receive an incoming SMS.
-
Ian Darwin
Snackbar (bottom message text) demo
-
Ian Darwin
XML SOAP Web Service
-
Jonathan Fuerth
Change the Enter key to "Next" on one-line text fields.
-
Ian Darwin
Sound Recorder
-
Ian Darwin
Text To Speech (TTS)
-
Ian Darwin
Speech Recognizer.
-
Ian Darwin
Drop-down Spinner Demos
-
Marco Dinacci
OpenGL Spinning Cube, from Marco Dinacci
-
Rachee Singh
Splash screen
-
Ian Darwin
SQLite demos
-
Ian Darwin
Use Existing Drawables
-
Ian Darwin
StaticFileRead - read a file from the application
-
Daniel Fowler
Demos for "Nuances of Strings.xml" recipe.
-
Ian Darwin
TabHost Demo: Demo of the TabHost widget, in a Dialog.
-
Ian Darwin
Tabbable and swipeable layout
-
Ian Darwin
Telephone call recorder (in progress!)
-
Pratik Rupwal
Displays phone info
-
Ian Darwin
HelloWorld of EspressoTesting
-
Sunit Katkar
Full app: compute and show restaurant bill with tip
-
Ian Darwin
Find device’s unique ID
-
Rachee Singh
Make the device vibrate
-
Ian Darwin
Swipe among views
-
Ian Darwin
Demo of Volley networking library
-
Wagied Davids
Apple-style Wheel Picker Demo
-
Ian Darwin
Graphical window background
-