Breaking News
Home / Android (page 4)


How to build simple Hashmap cache in Android?

The following snippet shows how to build a simple Bitmap Cache in Android: import java.util.HashMap;import; // TODO: Auto-generated Javadoc/** * The Class ImageMemoryCache. */public class ImageMemoryCache {     /** The cache. */    private static HashMap<String, Bitmap> cache = new HashMap<String, Bitmap>();     /**     * Gets the image.     *      * @param …

Read More »

How to keep screen from dimming or sleeping in Android?

In order for your application screen  need s to keep the screen from dimming or the processor from sleeping,  you must request this permission. <uses-permission android:name=”android.permission.WAKE_LOCK” /> Specifically if you have a scenario where in Audio is being played using the MediaPlayer and you are invoking the MediaPlayer.setScreenOnWhilePlaying() or MediaPlayer.setWakeMode() …

Read More »

Sending SMS using Android


SMS – Short Message Service is very effective and quick way of communication. Your app may have a use case wherein it needs to send SMS to someone. So lets see how it can done, it is relative simple as you would see below: Step 1: Creating the project This is …

Read More »
Advertisment ad adsense adlogger