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
1395
Record Android screen video
Bash
0
13
1528
Show alert dialog from anywhere in your Android app
Java
0
2
1983
Check if device is a tablet or a phone
Java
0
3
1321
Get application context from anywhere
Java
0
3
2610
Generate md5 string hash
Java
0
2
1774
Run code in background thread in Android service
Java
0
6
1544
Phone call state broadcast receiver
Java
0
10
1625
Store data to shared preferences
Java
0
10
1668
Share functionality button on Android
Java
0
5
1459
Stop screen from dimming by enforcing wake lock in Android
Java
0
7
1781
Open an application by Android code
Java
0
8
1440
SharedPreferences example in Android
Java
0
9
1931
Drawing Image using Canvas in Android
Java
0
9
1613
Copying file from assets directory to SDCard in Android
Java
0
12
5474
Countdown timer in Android
Java
0
12
1661
AutocompleteTextView in Android
Java
0
13
1639
Checking if SDCard is mounted on Android
Java
0
8
1306
Setting font to textView in Android
Java
0
10
1455
Checking connectivity and network information in Android
Java
0
5
1383
Understanding Adapters in Android
Other
0
9
1512
Showing a quick message on Android
Java
0
13
1799
Converting DIP / DP to pixels in Android
Java
0
7
1493
Refer to a color programmatically in Android
Java
0
12
1468
AssetFileDescriptor and FileDescriptor on Android
Java
0
12
1518
TextToSpeech Android example
Java
0
3
1461
Send SMS in Android
Java
0
11
1678
Using bluetooth on Android
Java
0
14
1874
Register default user on Firebase
Java
0
9
1380
Big view notification on Android
Java
0
11
1571
Drag and drop on Android
Java
0
8
2021
Request location updates on Android Wear
Java
0
13
1860
Facebook WebView: Displaying web pages
Java
0
10
1513
Parsing JSON documents with JSONObject on Android
Java
0
8
1619
Validate name, last names, phone number and email on Android
Java
0
6
1551
Check Android device charge source
Java
0
5
1434
Get CPU architecture on Android
Java
0
13
2296
Get screen resolution as integer on Android
Java
0
7
1668
Remembering users previous tab selection on Android
Java
0
12
1393
Draw line graph using achart engine in Android
Java
0
12
1537
Circle shape in XML drawable file
XML
0
9
2356
Ask users to rate your app in the Google Play Store
Java
0
6
1586
Saves app crashes logs to any SDCard folder in Android
Java
0
4
1626