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
1427
Record Android screen video
Bash
0
13
1551
Show alert dialog from anywhere in your Android app
Java
0
2
2017
Check if device is a tablet or a phone
Java
0
3
1349
Get application context from anywhere
Java
0
3
2649
Generate md5 string hash
Java
0
2
1815
Run code in background thread in Android service
Java
0
6
1578
Phone call state broadcast receiver
Java
0
10
1657
Store data to shared preferences
Java
0
10
1712
Share functionality button on Android
Java
0
5
1488
Stop screen from dimming by enforcing wake lock in Android
Java
0
7
1830
Open an application by Android code
Java
0
8
1466
SharedPreferences example in Android
Java
0
9
1989
Drawing Image using Canvas in Android
Java
0
9
1639
Copying file from assets directory to SDCard in Android
Java
0
12
5583
Countdown timer in Android
Java
0
12
1704
AutocompleteTextView in Android
Java
0
13
1667
Checking if SDCard is mounted on Android
Java
0
8
1345
Setting font to textView in Android
Java
0
10
1487
Checking connectivity and network information in Android
Java
0
5
1417
Understanding Adapters in Android
Other
0
9
1549
Showing a quick message on Android
Java
0
13
1841
Converting DIP / DP to pixels in Android
Java
0
7
1531
Refer to a color programmatically in Android
Java
0
12
1495
AssetFileDescriptor and FileDescriptor on Android
Java
0
12
1555
TextToSpeech Android example
Java
0
3
1496
Send SMS in Android
Java
0
11
1709
Using bluetooth on Android
Java
0
14
1905
Register default user on Firebase
Java
0
9
1407
Big view notification on Android
Java
0
11
1602
Drag and drop on Android
Java
0
8
2068
Request location updates on Android Wear
Java
0
13
1892
Facebook WebView: Displaying web pages
Java
0
10
1550
Parsing JSON documents with JSONObject on Android
Java
0
8
1653
Validate name, last names, phone number and email on Android
Java
0
6
1583
Check Android device charge source
Java
0
5
1464
Get CPU architecture on Android
Java
0
13
2344
Get screen resolution as integer on Android
Java
0
7
1697
Remembering users previous tab selection on Android
Java
0
12
1426
Draw line graph using achart engine in Android
Java
0
12
1570
Circle shape in XML drawable file
XML
0
9
2385
Ask users to rate your app in the Google Play Store
Java
0
6
1618
Saves app crashes logs to any SDCard folder in Android
Java
0
4
1676