Whatsapp Alternatives (Other Options)

Few months before, I bought a new android mobile and started using many apps for free. It is really great experience using android mobile. Whatsapp is really nice app to chat with friends using data line, it supports sharing photos, videos and audio. It have some nice features to broadcast messages, group chat etc.

Some of the available alternates for Whatsapp are as follow. Use which ever you like, Invite your friends and Enjoy free chatting and sharing.

eBuddy XMS:

eBuddy Messenger is even the very popular Social Media Chat application and this eBuddy XMS not only just a chat application but you can even share Photos, video and emoticon. The XMS allows you to stay connected with friends, family and other who are in your contact list.

Download it from Google Play.

ChatPlus:

ChatPlus is an  Android chatting service which allows you to chat with your friends easier and more enjoyably in various way. By fast and correct push notification, you can exchange not only text messages but also photos,videos and voice, locations and handwrites without having to pay for that. And also ChatPlus supports a language translation and posting to Twitter and Facebook. In addition, ChatPlus provides a group chat and mass broadcast.

Download ChatPlus for Android.

GroupMe:

GroupMe allows you to manage Groups and add your contacts from Social Media too.  In Group me you can send and receive messages using your data connection and in case if you have a poor connection, the app can switch you to SMS so you’ll never miss a message. The Location System in GroupMe is unique and it will show you all member’s who resides on Group on Map, Great !

Download GroupMe for Android:

ChatOn:

ChatOn App from Samsung is giving a strong competition to WhatsApp because of it’s Manufacturer and obviously cause of it’s features too. You can chat to your Buddies via personal chat or group chat and can easily share the Pictures, Videos and other Multimedia Formats. You can view all share of multimedia content on ChatOn through one simple option called Trunk.

Download ChatOn for Android:

Viber:

Viber is an application for that lets you make free phone calls to anyone that also has the application installed. When you use Viber, calls and text messages to any other Viber user are free, and the sound quality is much better than a regular call. You can call or text any Viber user, anywhere in the world, for free. All Viber Features are 100% FREE and do not require any additional “in application” purchase.

Download Viber for Android:

Kik Messenger:

Kik Messenger lets you make free messages like Whatsapp. Kik Messenger is not using phone number as identity user has its own identity on Kik messenger. It is fast, better graphics and organization of conversations and contacts, Finds contacts from your existing contact list (just like whatsapp) and completely free.

Download Kik Messenger for Android:

hike:

hike is a new messenger that lets you send free messages to your friends and family! With hike you can message friends that are on hike and also those who aren’t on hike too! You’ll never have to use another messaging app again. Better yet, it’s absolutely free!  It also support photos, Video and Audio sharing. It supports group messages.

Download hike for Android:

So here ends our list of WhatsApp alternatives (Other Options) for Android, if you liked this list, please share it on your social network profiles, If you would like to suggest any app our readers or would like to improve this list, please do let us know in comments section below.

 

Android background processing – AsyncTask

Developing on Android? Need to call the some services or sync with cloud servers or may be you need to do some time consuming task you need to do background processing

there are three ways to do that

AsyncTask

Service

Thread

Today we will see how AsyncTask works, AsyncTask is a wrapper around Threads. It allows to process something in background and post the results and progress on UI Thread in relatively very easy manner.

For implementing AsyncTask you need to extend

android.os.AsyncTask<Params, Progress, Result>

the three Type parameters that you can specify are

Params –  the type of the parameters sent to the task upon execution.

Progress –  the type of the progress units published during the background computation.

Result –  the type of the result of the background computation.

In AsyncTask you must implement the doInBackground (Params… params) method which needs to return the Result type parameter you have defined. You need to do or call the required background processing in this method. Other then that you can implement this following methods.

onPreExecute() – Runs on the UI thread before doInBackground. You can do any UI related update in this i. e. showing progressbar.

onProgressUpdate (Progress… values) – It runs on UI Thread when you call publishProgress (Progress… values) i. e. you can update your preogressbar for the progress being done in this method or may be adding fields to your layout.

OnCancelled() – is called after doInBackground (Params… params) when AsyncTask is cancelled by calling cancel(boolean) we should keep checking weather the task is cancelled using isCancelled() method inside doInBackground (Params… params).

onPostExecute (Result result) – It is executed after doInBackground the parameter Result is needed to be Type of Result you have set in your class header. The reault is what you have returned in doInBackground. onPostExecute runs on UI thread so you can reflect completion of your background processing according to the result you received. i.e. hiding the progressbar and showing the final outcome of processing.

Let us see an example on AsyncTask.

I assume you have already setup android and eclipse with adt and know how to create basic project. If not have a look here

First of all we will declare the AsycTask we want to use with following statement

AsyncTask<String, String, Void> myTask;

To make the UI we will create the following structure within main.xml file

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/mainLayout"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

    <LinearLayout
        android:id="@+id/Buttons"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:onClick="startTask"
        android:orientation="horizontal"
        android:text="@string/startTaskString" >

    <Button
        android:id="@+id/startTaskButton"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:onClick="startTask"
        android:text="@string/startTaskString" />

    <Button
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:onClick="cancelTask"
        android:text="@string/cancelTaskString" />

    <ProgressBar
        android:id="@+id/progress"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:visibility="invisible" />

    </LinearLayout>

    <LinearLayout
        android:id="@+id/ListParent"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_below="@+id/Buttons"
        android:orientation="vertical" />

</RelativeLayout>

For representing this UI component in out Activity we will declare the following Fields

RelativeLayout mainLayout;

ProgressBar mProgressBar;

LinearLayout mListParent;

and here goes onCreate method of activity with helper method to show hide the ProgressBar

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    mProgressBar = (ProgressBar) findViewById(R.id.progress);
    mListParent = (LinearLayout) findViewById(R.id.ListParent);
}

public void showProgressBar(boolean show) {
    if (show) {
        mProgressBar.setVisibility(View.VISIBLE);
    } else {
    mProgressBar.setVisibility(View.INVISIBLE);
    }

}

and to add actions on the two buttons we hace added the tags

android:onClick="startTask"

and

android:onClick="cancelTask"

So when this buttons are clicked the methods startTask and cancelTask will be called . We need to create this methods in our activity.

startTask will create task and run it while cancelTask will cancel the task if it is running.

 

public void startTask(View v) {

    myTask = new AsyncTask() {
        String[] splittedString;

        @Override
        protected Void doInBackground(String... params) {

            splittedString = params[0].split(" ");
            for (String currentString : splittedString) {
                if(isCancelled()){
                    splittedString = null;
                    currentString = null;
                    break;
                }else{
                    publishProgress(currentString);
                    try {
                        Thread.sleep(1000);
                    } catch (InterruptedException e) {
                    e.printStackTrace();
                    }
                }
            }
            return null;
        }

        protected void onCancelled() {

            showProgressBar(false);
        }

        @Override
        protected void onPostExecute(Void result) {

            super.onPostExecute(result);
            showProgressBar(false);
        }

        @Override
        protected void onPreExecute() {

            super.onPreExecute();
            showProgressBar(true);
        };

        @Override
        protected void onProgressUpdate(String... values) {

            super.onProgressUpdate(values);
            TextView mTextView = new TextView(AsyncTaskDemoActivity.this);
            mTextView.setText(values[0]);
            mListParent.addView(mTextView);
        }

    };

    myTask.execute(new String[] { "This is asyncTask Demo." });

}

public void cancelTask(View v) {

    myTask.cancel(true);

}

 

Here inside startTask we create new instance of AsyncTask and assign its handle to myTask while inside cancelTask we just call cancel() method of myTask.

You can download the source code of this tutorial from here and run it for your self.

When you click startTask button it will create new AsyncTask and execute it with parameter String “This is asyncTask Demo.” and split the string in background and display at particular interval demonstrating updating UI with process update. You may do any other background processing here and reflect it to UI through onProgressUpdate method.

Thats it for AsyncTask. We will discuss Background processing with Services in Android in Upcoming Posts.