Playgrounds
Snippets
Developers
Compiler
All
ActionScript
Ajax
AngularJS
Apache
AppleScript
ASP.NET
Bash
C
C#
C++
Coffee
CoffeeScript
ColdFusion
Command
CSS
Delphi
Django
ES6
GLSL
Grunt
Gulp
HAML
Haskell
HTML
iOS
Jade
Java
JavaScript
jQuery
JSX
Less
LUA
MDX
MySQL
Objective
Other
Pascal
Perl
PHP
Plain text
PowerShell
Processing
Progress
Prolog
Pseudocode
Python
Rails
RegExr
Ruby
SASS
Scala
Scheme
SCSS
SmallBASIC
Smarty
SQL
Stylus
SVG
Swift
TypeScript
VHDL
X++
XHTML
XML
Xojo
XSLT
New snippet
New playground
Sign up
Login
Upload
Playgrounds
Snippets
Developers
Sign up
Login
Codepad is a place for developers to share code snippets (PHP, Java, Bash, C, C++, Python and more). Create your HTML, CSS and JS Demos.
Sign up
Learn more
Android Snippets
Code snippets relative to Android
43
snippets by
Cesar Augusto Nogueira
Strict Mode on Android
Java
0
7
1150
Record Android screen video
Bash
0
13
1312
Show alert dialog from anywhere in your Android app
Java
0
2
1692
Check if device is a tablet or a phone
Java
0
3
1101
Get application context from anywhere
Java
0
3
2234
Generate md5 string hash
Java
0
2
1469
Run code in background thread in Android service
Java
0
6
1279
Phone call state broadcast receiver
Java
0
10
1381
Store data to shared preferences
Java
0
10
1389
Share functionality button on Android
Java
0
5
1223
Stop screen from dimming by enforcing wake lock in Android
Java
0
7
1494
Open an application by Android code
Java
0
8
1232
SharedPreferences example in Android
Java
0
9
1630
Drawing Image using Canvas in Android
Java
0
9
1389
Copying file from assets directory to SDCard in Android
Java
0
12
4631
Countdown timer in Android
Java
0
12
1437
AutocompleteTextView in Android
Java
0
13
1377
Checking if SDCard is mounted on Android
Java
0
8
1070
Setting font to textView in Android
Java
0
10
1221
Checking connectivity and network information in Android
Java
0
5
1148
Understanding Adapters in Android
Other
0
9
1224
Showing a quick message on Android
Java
0
13
1525
Converting DIP / DP to pixels in Android
Java
0
7
1213
Refer to a color programmatically in Android
Java
0
12
1256
AssetFileDescriptor and FileDescriptor on Android
Java
0
12
1254
TextToSpeech Android example
Java
0
3
1197
Send SMS in Android
Java
0
11
1421
Using bluetooth on Android
Java
0
14
1624
Register default user on Firebase
Java
0
9
1167
Big view notification on Android
Java
0
11
1288
Drag and drop on Android
Java
0
8
1706
Request location updates on Android Wear
Java
0
13
1588
Facebook WebView: Displaying web pages
Java
0
10
1248
Parsing JSON documents with JSONObject on Android
Java
0
8
1381
Validate name, last names, phone number and email on Android
Java
0
6
1297
Check Android device charge source
Java
0
5
1203
Get CPU architecture on Android
Java
0
13
1960
Get screen resolution as integer on Android
Java
0
7
1409
Remembering users previous tab selection on Android
Java
0
12
1165
Draw line graph using achart engine in Android
Java
0
12
1288
Circle shape in XML drawable file
XML
0
9
2108
Ask users to rate your app in the Google Play Store
Java
0
6
1341
Saves app crashes logs to any SDCard folder in Android
Java
0
4
1367