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
1240
Record Android screen video
Bash
0
13
1394
Show alert dialog from anywhere in your Android app
Java
0
2
1812
Check if device is a tablet or a phone
Java
0
3
1185
Get application context from anywhere
Java
0
3
2397
Generate md5 string hash
Java
0
2
1574
Run code in background thread in Android service
Java
0
6
1375
Phone call state broadcast receiver
Java
0
10
1484
Store data to shared preferences
Java
0
10
1490
Share functionality button on Android
Java
0
5
1312
Stop screen from dimming by enforcing wake lock in Android
Java
0
7
1605
Open an application by Android code
Java
0
8
1311
SharedPreferences example in Android
Java
0
9
1735
Drawing Image using Canvas in Android
Java
0
9
1471
Copying file from assets directory to SDCard in Android
Java
0
12
4978
Countdown timer in Android
Java
0
12
1518
AutocompleteTextView in Android
Java
0
13
1465
Checking if SDCard is mounted on Android
Java
0
8
1153
Setting font to textView in Android
Java
0
10
1311
Checking connectivity and network information in Android
Java
0
5
1236
Understanding Adapters in Android
Other
0
9
1347
Showing a quick message on Android
Java
0
13
1616
Converting DIP / DP to pixels in Android
Java
0
7
1304
Refer to a color programmatically in Android
Java
0
12
1344
AssetFileDescriptor and FileDescriptor on Android
Java
0
12
1342
TextToSpeech Android example
Java
0
3
1299
Send SMS in Android
Java
0
11
1518
Using bluetooth on Android
Java
0
14
1723
Register default user on Firebase
Java
0
9
1247
Big view notification on Android
Java
0
11
1382
Drag and drop on Android
Java
0
8
1815
Request location updates on Android Wear
Java
0
13
1692
Facebook WebView: Displaying web pages
Java
0
10
1345
Parsing JSON documents with JSONObject on Android
Java
0
8
1472
Validate name, last names, phone number and email on Android
Java
0
6
1388
Check Android device charge source
Java
0
5
1288
Get CPU architecture on Android
Java
0
13
2089
Get screen resolution as integer on Android
Java
0
7
1501
Remembering users previous tab selection on Android
Java
0
12
1249
Draw line graph using achart engine in Android
Java
0
12
1379
Circle shape in XML drawable file
XML
0
9
2208
Ask users to rate your app in the Google Play Store
Java
0
6
1427
Saves app crashes logs to any SDCard folder in Android
Java
0
4
1461