Code Samples for Android
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
AnalogClockSample
AnimationSample1
AnimationSample2
AnimationSample3
AssetSample1
BroadcastReceiverSample1
CallerSample
ContentObserverSample1
DatabindingSample
DeviceIdSample1
DigitalClockSample
FontSample4
FrescoSample1
GPUImageSample1
GPUImageSample2
Giphy
GlideSample1
GlideSample2
GlideSvgSample1
GmaillApiSample
GsonSampl1
HtmlInTextView
IonSAmple3
IonSample1
IonSample2
JavaMailSample1
JavaMailSample2
JavaOscSample
KryoSample
LineChartSample1
LineChartTimeSample1
LineChartTimeSample2
LineChartTimeSample3
LineChartTimeSample4
LineChartTimeSample5
LineChartTimeSample6
ListViewSample1
ListViewSample2
LivedoorWeather
LogcatSample1
MailShareProviderSample
MailShareRecieverSample
MediaPlayerMidiSample
Menu1
Menu2
MidiKeyboardSample
MidiPlayerSample1
MidiPlayerSample2
MidiSynthSample
NougatSample1
OkHttpSample1
OscRecieverSample
OscRecieverSample2
PackageInfoSample1
PermissionSample1
PicassoSample1
PicassoSample2
RealtimeLineChartSample1
RecycleViewSample1
RecyclerViewHeader
RecyclerViewSample2
RecyclerViewSample3
RetrofitSample1
RssParserSample
RssSample
SensorSample1
SensorSample2
ServiceListSample1
ServiceSample1
ServiceSample2
ShareActionProviderSample
ShareProviderSample
ShareRecieverSample
ShareRecieverSample2
SnackbarSample
StorageAccessSample1
StorageSample1
StorageSample2
StorageSample3
StorageSample4
StreetViewPanoramaViewSample
SvgSample
SystemInfoSample1
TabLayoutSample
UUIDSample1
UncaughtExceptionSample1
VectorImageSample
VolleySample1
WaspdbSample
WebViewSample
YahooNews
data
images
server
tools
Gmail.md
Http_Library.md
Image_Library.md
MIDI.md
OSC.md
README.md
RSS_Parser_Library.md
RecyclerView.md
Share_Intent.md

README.md

Android Samples

sample codes for Android

Image Library

https://github.com/ohwada/Android_Samples/blob/master/Image_Library.md

Picasso Sample 1

display image with Picasso

Picasso Sample 2

retouch image with Picasso

Glide Sample 1

display image with Glide

Glide Sample 2

display animation gif with Glide 3.7.0

Giphy

display animation gif with Giphy API and Glide 4.4.0

Fresco Sample 1

display image with Fresco

GPUImage Sample 1

retouch image with GPUImage

GPUImage Sample 2

retouch image with GPUImage

SVG Sample

display SVG Image with SVG Library 1.2.1

Glide SVG Sample 1

display SVG Image with Glide 3.7.0 and SVG Library 1.2.1

Vector Image Sample

display Vector Image

Http Library

https://github.com/ohwada/Android_Samples/blob/master/Http_Library.md

Volley Sample 1

get text from web server and post data to web server with Volley

OkHttp Sample 1

get text from web server and post data to web server with Volley

Retrofit Sample 1

get text from web server and post data to web server with Volley

Ion Sample 1

get text from web server and post data to web server with Volley

Ion Sample 2

get json and parse

Ion Sample 3

get image and display in ImageView

LivedoorWeather

Weather Report with Livedoor Weather API

RSS Parser Library

RSS-Parser

RSS Reader for Android Authority

RSS

RSS Reader for BBC World News

Yahoo News

RSS Reader for Yahoo News

RecyclerView

https://github.com/ohwada/Android_Samples/blob/master/RecyclerView.md

RecycleView Sample 1

display text in list
with ItemClickListener

RecyclerView Sample 2

display text in list
add item and remove item with animation

RecyclerView Sample 3

display text in SortedList

RecyclerView Header

display text in List and Header Footer

Share Intent

https://github.com/ohwada/Android_Samples/blob/master/Share_Intent.md

ShareProviderSample

send Share Intent with ShareCompat

ShareRecieverSample

recieve Share Intent with ShareCompat

ShareActionProviderSample

send Share Intent with ShareActionProvider

ShareRecieverSample2

recieve Share Intent

MailShareProviderSample

send Share Intent to GMAIL App

MailShareRecieverSample

recieve Share Intent for Mail app

Gmail

https://github.com/ohwada/Android_Samples/blob/master/Gmail.md

JavaMail sample 1

send mail with JavaMail via Gmail SMTP server

JavaMail sample 2

get mail with JavaMail from Gmail IMAP server

GmaillApiSample

get Gmail Label with Gmail API

MIDI

sample codes for Android MIDI API
https://github.com/ohwada/Android_Samples/blob/master/MIDI.md

MIDI Synth Sample


MIDI Keyboard Sample


MIDI Player Sample1

play MIDI File with MIDI Symth

MIDI Player Sample2

play MIDI File with android-midi-lib

##Media Player MIDI Sample
play MIDI File with Media Player

OSC

sample codes for Android OSC
https://github.com/ohwada/Android_Samples/blob/master/OSC.md

Java OSC Sample

send OSC Message with JavaOSC Library

OSC Reciver Sample

recieve OSC Message with JavaOSC Library

OSC Reciver Sample 2

recieve OSC Message with JavaOSC Library
improved version of OSC Reciver Sample

Others

Databinding Sample

bind Application Logic and Layout

Snackbar Sample

Snackbar show a brief message at the bottom of the screen

Wasp DB Sample

key/value data storage library for Android

Kryo Sample

Java binary serialization

Service Sample 1

send Broadcast Message from Service to Activity

Service Sample 2

send and recieve messages between Activity and Service

StreetView PanoramaView Sample

display StreetView with Google Play Services maps:11.0.0

WebView Sample

display HTML in WebView

HTML in TextView

display HTML in TextView

Menu 1

display Menu without Support Libraly

Menu 2

display Menu with Support Libraly

Tab Layout Sample

app has 3 tabs

GSON Sample 1

convert Java Objects into JSON and back with GSON

Asset Sample 1

rearead file in assets fonlder of app

Animation Sample 1

animate view with ViewCompat

Animation Sample 2

animate view with AnimationDrawable

Animation Sample 3

animate view with Animation object

ListView Sample 1

display text in list

ListView Sample 2

display image and text in list

Nougat Sample 1

ScopedDirectoryAccess
call the permission dialog and copy image files


Line Chart Sample 1

Line Chart


Line Chart Time Sample 1

Line Chart of
Time data with Random values


Line Chart Time Sample 2

Line Chart of Sin Wave Data at one hour interval using l using MPChart 3.0.2


Line Chart Time Sample 3

Line Chart of Sin Wave Data at one minute interval using MPChart 2.1.6


Line Chart Time Sample 4

Line Chart of Sin Wave Data at one minute interval using MPChart 3.0.3


Line Chart Time Sample 5

Line Chart of Sin Wave Data at one second interval using MPChart 3.0.3


Line Chart Time Sample 6

Line Chart of Sin Wave Data at one millli second interval using MPChart 3.0.3

Real Time Line Chart Sample 1

Line Chart of Real Time data

Storage Sample 1

write Storage for Android 4.4
wrie to application specific area

Storage Sample 2 and 3

write Storage for Android 4.4
two different applications write to the application sharing area

Storage Sample 4

write Storage in Android4.4 earlier style

Font Sample 4

Japanese fonts
enclose Japanese fonts in Android application

Strorage Access Sample 1

Strorage Access Framework
call the picker specified image files


Permission Sample 1

Android 6.0 runtime permission
call trequest permissions


Logcat Sample 1

view logcat in activity
write logcat to file


Uncaught Exception Sample 1

write to log file when uncaught exception occurs

Device Id Sample 1

get Device Identities
IMEI, IMSI, ICCID, Mac Address, Android ID


System Info Sample 1

get System Informations
BRAND, DEVICE, MANUFACTURER, MODEL, VERSION.SDK_INT


Package Info Sample 1

get Package Informations
firstpackageName, versionCode, InstallTime


UUID Sample 1

genatate UUID
genatate once, save abd reuse



ServiceList Sample 1

get Service List in running

<

Sensor Sample 1

get values of Sensors
Light, Temperature, Humidity, Pressure


###Sensor Sample 2

get values of Enviromental Sensors
Temperature, Humidity, Pressure


Broadcast Receiver Sample 1

receive Broadcast events
ACTION_TIME_TICK, ACTION_TIME_CHANGED, ACTION_TIMEZONE_CHANGED

Content Observer Sample 1

observe events from Content Provider
receive events System Setting changeed

DigitalClock


AnalogClock


Caller Sample

Output the caller's class name and method name to logcat