Category Archives: Android

Android Alert Dialog Example sample Tutorial

Alert dialog is used in android whenever we need to notify user about certain events in our android application. Such events include exiting of app,deleting some entry, network usage etc. We will see a simple code snippet showing the implementation of alert dialog in android as below: 1,548 total views, 1 views today

1,548 total views, 1 views today

Android simple Tabs with Swipe Layout(ViewPager) Fragments Tutorial

In this tutorial we will see a simple example of android application having tabs with swiping screens. Previously we saw an example of just swiping views using ViewPager. Now we will use ActionBar Tabs along with ViewPager in this tutorial. Steps required for implementation: 1) Setting navigation mode of ActionBar to actionBar.NAVIGATION_MODE_TABS and adding tabs.… Read More »

3,497 total views, 2 views today

Android ViewPager simple Example Tutorial- Sliding Screens

  ViewPager is used to for implementing the Screen Slides. Screen slides are transitions between one entire screen to another and are common with UIs like setup wizards or slideshows as shown in the above video. Steps for implementing ViewPager: 1) A Layout(that contains ViewPager) for the MainActivity. 2) FragmentPagerAdapter/FragmentStatePagerAdapter class which controls the fragments… Read More »

20,118 total views, 31 views today

Simple Android Foreground Service Example Tutorial

In this tutorial we will see a very simple implementation of android foreground service. A Service is an application component that can perform long-running operations in the background and does not provide a user interface. A Foreground Service in android is a background service which keeps running even after the parent application is closed. Use… Read More »

20,232 total views, 43 views today

Android Advanced Interview Questions And Answers

Q)Explain  Service vs intent service ? When to use? The Service can be used in tasks with no UI, but shouldn’t be too long. If you need to perform long tasks, you must use threads within Service. The IntentService can be used in long tasks usually with no communication to Main Thread. If communication is required, can use Main Thread… Read More »

3,236 total views, 3 views today

Android AsyncTask Example

AysnTask is an inbuilt class in android which can be used for performing background operations like downloading a file, making HTTP Request and then showing the results on the UI. AsyncTask enables proper and easy use of the UI thread. This class allows to perform background operations and publish results on the UI thread without… Read More »

3,871 total views, 3 views today

Android custom notification for music player Example

In this tutorial, you will learn how to create Custom Notifications in your Android music player application. A notification is a message you can display to the user in the status bar outside of your Android application. Notifications can be clicked to perform an action or to open a new activity. We will be creating… Read More »

29,342 total views, 38 views today

Building your own android chat messenger app similar to Whatsapp using XMPP (Smack 4.1 API) from scratch: Part-2

In Part-1 we finished the implementation of chat interface for our android messenger. Now we will focus on implementing the client for XMPP server to send & receive chat messages using Smack API for Android. Adding library files to the project: – Download the library files for Smack API and GSON which is a library for… Read More »

149,920 total views, 98 views today

Building your own android chat messenger app similar to Whatsapp using XMPP (Smack 4.1 API) from scratch: Part-1

Today we will develop a chat application from scratch for android. We will use XMPP (ejabberd) hosted on aws EC2. I will be developing this app using Eclipse IDE with adt plugin. Create a new android application project in eclipse. Choose tabbed activity while creating the project.(see screenshot below) Select “Action bar tabs (with viewpager)”… Read More »

85,565 total views, 77 views today