Android

Android Content Providers

android

Content providers store and retrieve data and make it accessible to all applications. If you want to make your own data public, you have two options: You can create your own content provider (a ContentProvider subclass) or you can add the data to an existing provider. All Services must be declared in the manifest file. Content Provider Basics * All ... Read More »

Android Service

android

* A Service is an application which has the ability to run in the background without displaying any user interface. * A Service is a class which derives from android.app.Service. * All Services must be declared in the manifest file. * Services run without a dedicated GUI, but, like Activities and Broadcast Receivers, they still execute in the main thread ... Read More »

Android Intent

android

Intent is the negotiator between two activities or between two applications. It gives the ability to pass messages and data between the two entities. When writing applications for mobile, Intent is very handy, since it gives access to a lot of the OS services like opening the camera, a browser, displaying notifications and so on. Intent Resolution Intents can be ... Read More »

Android View

android

A view is a single user interface element. Its responsibilities include drawing on a canvas and handling user events. Some Views can contain other Views, these are called view groups. A View is a class which derives from android.view.View. There are already many existing views. The developer can use them or create his own customized view by extending any of ... Read More »

Android Activity Lifecycle Concepts

android

Activity is the presenter of a single screen in the application. It is the only one who has certain abilities, like displaying Views, menus, alerts and notifications. It also has the ability to open a new Activity, which means opening a new screen. Activity is a class which derives from android.app.Activity. An application needs to have at least one Activity. ... Read More »

Android Libraries

android

System C library – a BSD-derived implementation of the standard C system library (libc), tuned for embedded Linux-based devices Media Libraries – based on PacketVideo’s OpenCORE; the libraries support playback and recording of many popular audio and video formats, as well as static image files, including MPEG4, H.264, MP3, AAC, AMR, JPG, and PNG LibWebCore – a modern web browser ... Read More »

What Dalvik VM does

android

The Dalvik VM takes the generated Java class files and combines them into one or more Dalvik Executable (.dex) files. It reuses duplicate information from multiple class files, effectively reducing the space requirement by half from a traditional .jar file. Google has fine-tuned the garbage collection in the Dalvik VM, but it has chosen to omit a just-in-time (JIT) compiler, ... Read More »

Introduction of Android Architecture

android

At the core of the Android Platform is Linux kernel version 2.6.29, responsible for device drivers, resource access, power management, and other OS duties. The supplied device drivers include Display, Camera, Keypad, WiFi, Flash Memory, Audio, and IPC (inter process communication). At the next level, on top of the kernel, are a number of C/C++ libraries such as OpenGL, WebKit, ... Read More »

URL shortening using google API

Java

URL shortening using Google API Sometimes we need to share a long URL or we need to tweet them. But because of the length of the URL we are not able to do so. Google provides a service using which we can convert our long URL and squeezes them to fewer character URL. This service of Google is also known ... Read More »

GSON encoding the string like \u003d

Java

This tutorial explains how to handle the encoding issue with using GSON. Below is a sample programme in which GSON was converting string, with some special character, into some encoded character. Map<String, String> dataMap = new HashMap<String, String>(); dataMap.put("userid", "sdswSSEdafsdy2y4=="); Gson gson = new Gson(); String json = gson.toJson(dataMap); System.out.println("Json result - "+json); But when we printed the GSON string ... Read More »