Android Create System Overlay Window like Facebook Chat Heads

For floating overlay window  in Android we need following permission on “AndroidManifest.xml” <uses-permission android:name=”android.permission.SYSTEM_ALERT_WINDOW” /> How to open overlay window/ How get permission to draw overlay screen: public final static int Overlay_REQUEST_CODE = 251; public void checkDrawOverlayPermission() { if (Build.VERSION.SDK_INT >= 23) { if (!Settings.canDrawOverlays(mActivity)) { Intent intent = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION, Uri.parse(“package:” + getPackageName())); startActivityForResult(intent, …

Write your own Background Service in Android

Service: is one of core component of Android. Service have not any user interface, like dialogboxe or buttons etc. Service runs in background. We use service for long process like fetch long (time consuming) data from network, play sound in background or some process where user interaction is not necessary.