Code Samples for Android
sample codes for Android
Face Detection using Vision API
Detect Faces from Camera images using camara2 API and Mobile Vision API
Detect Barcodes from Camera images using camara2 API and Vision API
Detect Texts from Camera images using camara2 API and Vision API
Detect Faces from Camera images using camara2 API and Vision API
Detect Faces from Camera images using camara2 API and Vision API
Detect Faces and Barcodes from Camera images using camara2 API and Vision API
Detect Faces from image files using Vision API
show rectangle aroud the Face
trimming out the Face
Label Detect using CloudVision API
WEB Detect using CloudVision API
Label Detect with Remote Image using CloudVision API
Face Detect using CloudVision API
ScreenCapture using MediaProjection API
mirroring to SutfaceView
ScreenCapture using MediaProjection API
show ScreenShot with Bitmap
save ScreenShot
show Beef Bowl Map
https://github.com/ohwada/Android_Samples/blob/master/camera2.md
Camera Preview using Camera2 API
Take Picture using Camera2 API
Record Video using Camera2 API
Take Picture with RAW format using Camera2 API
overlay on camera preview using Camera2 API
overlay on camera preview
Face Detection using Camera2 API
Take Picture using Camera2 API
and Camera2Source similar to CameraSource of Vision API
Face Detection using Camera2 API
and Camera2Source similar to CameraSource of Vision API
Take Picture with Shutter Sound using Camera2 API
and Camera2Source similar to CameraSource of Vision API
Auto Focus using Camera2 API
explore supported Camera2 Features using Camera2 API
record Video using Camera2 API
Take Picture with Raw format using Camera2 API
zoom Camera using Camera2 API
Take Picture with Location using Camera2 API and LocationManager
take Picture with Manul Exposure using Camera2 API
take Picture with Burst mode using Camera2 API
WebCamera using Camera2 API
record Video using Camera2 API and MediaCodec
streaming H264 using Camera2 API and MediaCodec
RTSP Server using Camera2 API and MediaCodec
convert Camera image to Sepia
Face Detection and overlay image
https://github.com/ohwada/Android_Samples/blob/master/OpenCV.md
build OpenCV Android 4.1.2 with Android Studio 2.2
show message as whether build and load Successfully
display Camera Preview
convert camera images to Sepia
15-puzzle
show Histograms
detect an area of the same color as the color of the touched location
find Camera Calibration Pattern and highlight pattern
detect interest points using native code
and draw small red circle on interest points
detect Faces
and draw Rectangle on Faces
Cat Face Detection
Mobilenet object detection
QRCodeDetector
Camera Preview with GLSurfaceView
convrt image with GLSurfaceView
OpenGL ES 2.0 Sample
fill the background with color
draw Triangle
draw Square and Triangle
draw rotating Cube
draw Rectangle with Texture
draw Rectangle with Image Texture
draw Square and moving Triangle
draw Square and scaling Triangle
draw Images continuously like slot machine
calculate array addition with GPU by OpenCL program
create String "Hello, World!'' with GPU by OpenCL program
show OpenCL Version
convert Image to black and white
Gaussian Filter
detect line from Camera image
Sample code for MediaCodec and MediaMuxer
Encode and Mux Test
CameraToMpegTest
convert YUV420_888 to YUV420Planar
https://github.com/ohwada/Android_Samples/blob/master/MediaPlayer.md
play Audio Files using MediaPlayer
play Video files using MediaPlayer
record Voice using MediaRecorder
https://github.com/ohwada/Android_Samples/blob/master/dialog.md
customize of AlertDialog
Yes No Dialog resembles AlerDialog
show Image in AlertDialog
https://github.com/ohwada/Android_Samples/blob/master/csv.md
read and write CSV file using OpenCSV
read and write CSV file using univocity-parsers
read and write CSV file using Apache Commons CSV
https://github.com/ohwada/Android_Samples/blob/master/osmdroid.md
display OpenStreetMap
display OpenStreetMapwith Markers
display OpenStreetMap with Tiles Overlay and Custom Tile Source
display OpenStreetMap with MinimapItemizedoverlay and custom Icon using Osmdroid
display Offline Map using Osmdroid
Tile Downloader for Offline Map
OpenStreetMap with Marker and window info
bookmark the location of the map using Osmdroid
display Map Tile of Japan GSI using Osmdroid
display OpenStreetMap with loading KML
display OpenStreetMap with loading KML and custom Style
display Map Tile of Japan MILT using Osmdroid
display Map Tile of Japan MILT with WMS capabilities using Osmdroid
https://github.com/ohwada/Android_Samples/blob/master/Image_Library.md
display image with Picasso
retouch image with Picasso
display image with Glide
display animation gif with Glide 3.7.0
display animation gif with Giphy API and Glide 4.4.0
display image with Fresco
retouch image with GPUImage
retouch image with GPUImage
display SVG Image with SVG Library 1.2.1
display SVG Image with Glide 3.7.0 and SVG Library 1.2.1
display Vector Image
https://github.com/ohwada/Android_Samples/blob/master/Http_Library.md
get text from web server and post data to web server with Volley
get text from web server and post data to web server with Volley
get text from web server and post data to web server with Volley
get text from web server and post data to web server with Volley
get json and parse
get image and display in ImageView
Weather Report with Livedoor Weather API
RSS Reader for Android Authority
RSS Reader for BBC World News
RSS Reader for Yahoo News
https://github.com/ohwada/Android_Samples/blob/master/RecyclerView.md
display text in list
with ItemClickListener
display text in list
add item and remove item with animation
display text in SortedList
display text in List and Header Footer
https://github.com/ohwada/Android_Samples/blob/master/Share_Intent.md
send Share Intent with ShareCompat
recieve Share Intent with ShareCompat
send Share Intent with ShareActionProvider
recieve Share Intent
send Share Intent to GMAIL App
recieve Share Intent for Mail app
https://github.com/ohwada/Android_Samples/blob/master/Gmail.md
send mail with JavaMail via Gmail SMTP server
get mail with JavaMail from Gmail IMAP server
get Gmail Label with Gmail API
sample codes for Android MIDI API
https://github.com/ohwada/Android_Samples/blob/master/MIDI.md
play MIDI File with MIDI Symth
play MIDI File with android-midi-lib
##Media Player MIDI Sample
play MIDI File with Media Player
sample codes for Android OSC
https://github.com/ohwada/Android_Samples/blob/master/OSC.md
send OSC Message with JavaOSC Library
recieve OSC Message with JavaOSC Library
recieve OSC Message with JavaOSC Library
improved version of OSC Reciver Sample
sample codes for Android NDK ( Native Development Kit )
https://github.com/ohwada/Android_Samples/blob/master/NDK.md
this sample shows you how to manage 3rd party C/C++ libraries with Android Studio.
hello-jni
this sample use JNI to call C code from a Android Java Activity.
hello-jniCallback
this sample is an Aadd-on to Hello JNI sample to demonstrate calling back to Java from C code
Hello GL2
this sample draws a triangle using GLES 2.0 API.
GL ES 3.0 JNI
fills small rotating squares on on the entire screen
this sample demonstrates how to use OpenGL ES 3.0 from JNI/native code.
Bitmap Plasma
this sample uses JNI to render a plasma effect in an Androide
native-activity
this sample that initializes a GLES 2.0 context
fill background with Color Magenta
classic-teapot
draw Teapot
sample codes for AAR( Android Archive )
show Library Activity
Android Library Sample
show Sample Activity
crop Image using BitmapRegionDecoder
crop Image using CropIntent
Scroller Sample
move the red square by accelerating, when flick the screen
Scroller Sample
scroll and switch Pages , when flick left or right
BasicRenderScript
RenderScriptIntrinsic
read "/proc/cpuinfo"
and show Cpuinfo
show Gpuinfo using Open GL ES
send SSDP Discovery command
show rendered HTML in TextView
remove HTML tags
Share Files
Sample of Preference
play Video files using MediaPlayer
play Audio Files using MediaPlayer
show Rounded image using RoundedImageView
sample code of TextureView
Web Server on Android using NanoHttpd
IP Address of Android phone myself
read and write file with FilePicker
SQLite Sample
JetBoy is Android sample game that demonstrates the use of the android.media.JetPlayer class
bind Application Logic and Layout
Snackbar show a brief message at the bottom of the screen
key/value data storage library for Android
Java binary serialization
send Broadcast Message from Service to Activity
send and recieve messages between Activity and Service
display StreetView with Google Play Services maps:11.0.0
display HTML in WebView
click listener of a tag
display HTML in TextView
display Menu without Support Libraly
display Menu with Support Libraly
app has 3 tabs
convert Java Objects into JSON and back with GSON
rearead file in assets fonlder of app
animate view with ViewCompat
animate view with AnimationDrawable
animate view with Animation object
display text in list
display image and text in list
ScopedDirectoryAccess
call the permission dialog and copy image files
Line Chart
Line Chart of
Time data with Random values
Line Chart of
Sin Wave Data at one hour interval using l using MPChart 3.0.2
Line Chart of
Sin Wave Data at one minute interval using MPChart 2.1.6
Line Chart of
Sin Wave Data at one minute interval using MPChart 3.0.3
Line Chart of
Sin Wave Data at one second interval using MPChart 3.0.3
Line Chart of
Sin Wave Data at one millli second interval using MPChart 3.0.3
Line Chart of Real Time data
write Storage for Android 4.4
wrie to application specific area
write Storage for Android 4.4
two different applications write to the application sharing area
write Storage in Android4.4 earlier style
Japanese fonts
enclose Japanese fonts in Android application
Strorage Access Framework
call the picker specified image files
Android 6.0 runtime permission
call trequest permissions
view logcat in activity
write logcat to file
write to log file when uncaught exception occurs
get Device Identities
IMEI, IMSI, ICCID, Mac Address, Android ID
get System Informations
BRAND, DEVICE, MANUFACTURER, MODEL, VERSION.SDK_INT
get Package Informations
firstpackageName, versionCode, InstallTime
genatate UUID
genatate once, save abd reuse
get Service List in running
<
get values of Sensors
Light, Temperature, Humidity, Pressure
###Sensor Sample 2
get values of Enviromental Sensors
Temperature, Humidity, Pressure
receive Broadcast events
ACTION_TIME_TICK, ACTION_TIME_CHANGED, ACTION_TIMEZONE_CHANGED
observe events from Content Provider
receive events System Setting changeed
Output the caller's class name and method name to logcat