Block incoming and outgoing phone calls programmatically
Block incoming and outgoing phone calls programmatically
View ArticleTurn off screen orientation sensor
A simple trick to avoid user change screen orientation in certain activities.
View ArticleHow to record a phone call on Android
This is how to use the MediaRecorder SDK class to record phone calls happening on the device, be aware that MediaRecorder.AudioSource.VOICE_CALL is not always supported by vendor since recording phone...
View ArticleHow to use Animations to animate a custom View
This is how to use Animations to animate a custom View. The following example uses the class TranslateAnimation which is the most basic one.
View ArticleHow to prevent finishing the Activity from Back button
Understand how to avoid the end of the activity through the back button using a alert dialog.
View ArticleHow create a Splash Screen
Wait 3 seconds before it goes to next activity. You can insert other programming features in run() (onCreate) and then removing the time in "nextScreen()", so the time of Splash Screen is determined by...
View ArticleProgrammatically install an APK to the user device
Programmatically installing an Android APK to the user device could be a useful trick to auto update your application, or installing dependencies to make it correctly work. The following snippet will...
View ArticleBlock incoming and outgoing phone calls programmatically.
This is how to programmatically block incoming and outgoing phone calls registering a broadcast receiver and a phone state listener.
View ArticleHow to start a phone call with the Android SDK
How to start a phone call with the Android SDK using the ACTION_CALL intent and a "tel:" parsable uri.
View ArticleParse json to JSONObject example
How to parse a json string to a JSONObject with the Android SDK.
View ArticleReflect device movements using SensorManager.
Registering as a SensorEventListener your Activity will receive in the onSensorChanged method on every event one of the device sensors trigger. This way you could remap the coordinate system of your...
View ArticleInteraction between Activity and Service example.
An example interaction between an Activity and a Service with the Android SDK.
View ArticleHandle screen orientation change with state persistance example.
An example of screen orientation change handling with some state persistance using the Bundle class.
View ArticleAndroid SDK - See if Google Services apk is installed
Check if the client's device has the Google Services apk installed
View ArticleAndroid SDK - List folder content with Dropbox API
The following snippet will log the content of a Dropbox folder using its API package.
View ArticleAndroid SDK - Send a SMS message with Android.
A snippet to send SMS text messages with Android SDK.
View ArticleAndroid SDK - Check if a service is already running.
Check if an Android service is already running given its name.
View ArticleAndroid SDK - Check device CPU architecture.
Detect the CPU architecture of the device the application is running on, this method could be useful if your application depends on native code such as elf executables or JNI libraries with different...
View ArticleAndroid SDK - Utility implementation for loading data which is pre-packages...
If you have raw data packaged with your application apk, this class could help you to access to those resources programmatically.
View ArticleAndroid SDK - Get the application version programmatically
PackageInfo pInfo = getPackageManager().getPackageInfo(getPackageName(), 0); version = pInfo.versionName ...
View Article