10

Mobile number will be entered in an edittext by user on registration page in my Android application. How can I check that user entered his/her mobile number not other's ?

I've tried this :

TelephonyManager tMgr =(TelephonyManager)mAppContext.getSystemService(Context.TELEPHONY_SERVICE);
  mPhoneNumber = tMgr.getLine1Number();

And compare this variable with edittext's text. But mPhoneNumber returns NULL in my case. Is there any other options? How to solve this ?

Any help would be appreciable.

I have tried this : Check source code :

     public class MainActivity extends Activity{    

    Button submit;
    EditText contact;
    String phNo;
    ProgressDialog progress;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        contact = (EditText)findViewById(R.id.mobileNumber);
        submit = (Button) findViewById(R.id.button1);

        submit.setOnClickListener(new OnClickListener()
        {
                public void onClick(View v)
                {
                    phNo = contact.getText().toString();
                    new CheckOwnMobileNumber().execute();
                    Toast.makeText(getApplicationContext(), phNo, Toast.LENGTH_LONG).show();
                }
        });



    }

    private class CheckOwnMobileNumber extends AsyncTask<String, Void, String>
    {
        @Override
        protected void onPostExecute(String result)
        {
            // TODO Auto-generated method stub
            if(progress.isShowing())
            {
                progress.dismiss();
                // Check SMS Received or not after that open dialog date
                /*if(SMSReceiver.str.equals(phNo))
                {
                    Toast.makeText(getApplicationContext(), "Thanks for providing your number.", Toast.LENGTH_LONG).show();
                }
                else
                {
                    Toast.makeText(getApplicationContext(), "Provide your own mobile number please.", Toast.LENGTH_LONG).show();
                    return;
                }*/

            }
        }

        @Override
        protected String doInBackground(String... params)
        {
            // TODO Auto-generated method stub
            String msg = phNo;
            try
            {
                sendSMS(phNo, msg);
            }
            catch(Exception ex)
            {
                Log.v("Exception :", ""+ex);
            }
            return null;
        }

        @Override
        protected void onPreExecute() {
            // TODO Auto-generated method stub
            progress = ProgressDialog.show(MainActivity.this, "","Checking Mobile Number...");
            progress.setIndeterminate(true);
            progress.getWindow().setLayout(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
            super.onPreExecute();
        }

}

    private void sendSMS(String phoneNumber, String message)
        {        
            //PendingIntent pi = PendingIntent.getActivity(getApplicationContext(), 0, new Intent(getApplicationContext(), MainActivity.class), 0);                
            SmsManager sms = SmsManager.getDefault();
            sms.sendTextMessage(phoneNumber, null, message, null, null);        
        }
}

Receiver to listen SMS received or not ?

public class SMSReceiver extends BroadcastReceiver
{
private static final String ACTION_SMS_RECEIVED = "android.provider.Telephony.SMS_RECEIVED";
Context mContext;
private Intent mIntent;
static String address, str = null;

// Retrieve SMS
public void onReceive(Context context, Intent intent) {
    mContext = context;
    mIntent = intent;

    String action = intent.getAction();

    if(action.equals(ACTION_SMS_RECEIVED))
    {
        SmsMessage[] msgs = getMessagesFromIntent(mIntent);
        if (msgs != null)
        {
            for (int i = 0; i < msgs.length; i++)
            {
                address = msgs[i].getOriginatingAddress();
                str = msgs[i].getMessageBody().toString();
            }
        }   

        // ---send a broadcast intent to update the SMS received in the
        // activity---
        Intent broadcastIntent = new Intent();
        broadcastIntent.setAction("SMS_RECEIVED_ACTION");
        broadcastIntent.putExtra("sms", str);
        context.sendBroadcast(broadcastIntent);
    }

}

public static SmsMessage[] getMessagesFromIntent(Intent intent)
{
    Object[] messages = (Object[]) intent.getSerializableExtra("pdus");
    byte[][] pduObjs = new byte[messages.length][];

    for (int i = 0; i < messages.length; i++)
    {
        pduObjs[i] = (byte[]) messages[i];
    }

    byte[][] pdus = new byte[pduObjs.length][];
    int pduCount = pdus.length;
    SmsMessage[] msgs = new SmsMessage[pduCount];
    for (int i = 0; i < pduCount; i++)
    {
        pdus[i] = pduObjs[i];
        msgs[i] = SmsMessage.createFromPdu(pdus[i]);
    }
    return msgs;
}
}

LOGCAT :

03-13 17:31:02.049: E/ActivityManager(161): ANR in com.example.test
03-13 17:31:02.049: E/ActivityManager(161): Reason: Broadcast of Intent { act=android.provider.Telephony.SMS_RECEIVED cmp=com.example.test/.SMSReceiver (has extras) }
03-13 17:31:02.049: E/ActivityManager(161):   54% 3732/com.example.test: 54% user + 0% kernel / faults: 21 minor
03-13 17:31:02.049: E/ActivityManager(161):   40% 3732/com.example.test: 40% user + 0% kernel / faults: 2 minor
03-13 17:31:30.699: I/ActivityManager(161): Killing com.example.test (pid=3732): user's request
03-13 17:31:30.799: I/ActivityManager(161): Process com.example.test (pid 3732) has died.
03-13 17:31:30.799: I/WindowManager(161): WIN DEATH: Window{40992f50 com.example.test/com.example.test.MainActivity paused=false}
03-13 17:31:30.819: E/InputDispatcher(161): channel '40818670 com.example.test/com.example.test.MainActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x8
03-13 17:31:30.819: E/InputDispatcher(161): channel '40818670 com.example.test/com.example.test.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
03-13 17:34:59.649: I/ActivityManager(161): Start proc com.example.test for broadcast com.example.test/.SMSReceiver: pid=4037 uid=10098 gids={}
Manish Dubey
  • 4,206
  • 8
  • 36
  • 65
  • 3
    whatsapp sends a msg internally to your number, and internally reads that you are trying to login through that number only and verifies it. If you try to use another number, it will send a message to that number and you need to take the verification code from it and paste it here. whatsapp doesn't use the MSISDN number. – Rahul Feb 22 '13 at 08:27
  • 5
    Use [send](http://stackoverflow.com/questions/4967448/send-sms-in-android) to send an sms, to one's number, and use [read](http://stackoverflow.com/questions/848728/how-can-i-read-sms-messages-from-the-inbox-programmatically-in-android) to read the sms and VERIFY, if the msg was sent from your app or not. Tada! – Rahul Feb 22 '13 at 08:34
  • have you tried this: http://stackoverflow.com/questions/4896715/how-to-fetch-own-mobile-number-in-android – Calvin Mar 11 '13 at 11:25
  • 1
    I have tried all of these. By the way its not my problem. Please read my question again. – Manish Dubey Mar 11 '13 at 12:03
  • You need check send a message with a generated key and in the listener you should check if thats the key you have received from your own number... – Nezam Mar 13 '13 at 11:13
  • @Nezam : I have done this, but now I want to tell my asynctask that comparison has been done in receiver class and it was true. How can I do that ? – Manish Dubey Mar 13 '13 at 11:17
  • I have a verry simple answer to your issue.First,you declare the receiver class within the same class in which you declared the `AsynTask`.Now,keep a flag `CheckingDone=false`..make it a class variable.. now add code to stick your code untill the checking is done.. like `while(!CheckingDone){//just some false code to keep it here}`.. now just after this keep your implementation of code to goAhead or not.Keep the `wasSameNumber` variable also class level so that you can check whether the result was true or false.. i know this is a trick but inshallah would solve it.If it solves i will post ans – Nezam Mar 13 '13 at 11:28
  • I thought about that before 2 days but didn't implement successfully. Can you edit my code according your logic and post as an answer please ? – Manish Dubey Mar 13 '13 at 11:30
  • only if you promise that if someone else posts it before me.. i will get the credit lol!! :smile: .. Inshallah trying to do that – Nezam Mar 13 '13 at 11:36
  • Okay. Obviously because you are first to share this idea. – Manish Dubey Mar 13 '13 at 11:52
  • see the `workDone` variable in the `PostExecute` of the AsyncTask and `OnReceive` of the Receiver – Nezam Mar 13 '13 at 11:56

5 Answers5

10

Its not guaranteed that tMgr.getLine1Number(); will always return your SIM card's number. Because it depends on the availability of number in SIM card. Like in my case, my Tre-Sweden SIM card doesn't contain my phone number.

But if you put the SIM card into an old SonyEricsson or Nokia phone, then you would get an option to edit this number (on SIM). Once its done, the android device will recognize the number and will show you.

Besides, if you do get your phone number through the code, then the best way to compare two numbers is:

boolean isSame = PhoneNumberUtils.compare(num1, num2);

Alternatively, you may implement some sort of pin-code verification logic (like Viber, WhatsApp or other application does) in which you ask the user to enter their phone number during registration. Later, that phone number is sent to the server and a pin-code is generated against that number which is sent to the user via SMS. Finally, the user has to enter that pin-code (received in SMS) to complete the registration.

Or

Simply send an SMS from user's device (with a consent) to your server/device and get to know their phone number.

waqaslam
  • 67,549
  • 16
  • 165
  • 178
  • 1
    Why you are getting upvotes ? I don't know. But your answer is not a solution. When I'll upload this app in Play Store, would I notify every user to put thier sim card to old nokia or sony ericson phone to edit phone number in sim card and after that use it on android ? – Manish Dubey Mar 15 '13 at 06:44
  • 1
    Perhaps there's a reason for such up-votes. Like i said, **there's no perfect solution to verify if the user's phone number is always available in sim card or not**. The only way to figure this out is via sms from user's device to your dedicated setup or a pincode type registration from your server to user's device through their phone number. This was an answer to your very first (original) question, now if it still doesn't satisfy you, then please ask a new question with its relative info. Don't simply update your question time-to-time, it may invalidate other people's answers. – waqaslam Mar 15 '13 at 08:41
  • Moreover, the idea of putting your sim card into an old phone was totally meant for you to fix your sim card's number (which might be helpful during development). – waqaslam Mar 15 '13 at 08:44
  • Please edit your answer, I want to upvote your answer because I used your hint. – Manish Dubey Mar 15 '13 at 09:39
5

Getting the phone number using getLine1Number() is not secure nor certain.

It is generally accepted because this whole "getting the phone number" is clash of multiple issues such as user's privacy, carrier's branding, and even the vendor's.

Anyway, unlike ios, android's android.provider.Telephony.SMS_RECEIVED makes the whole process very convenient and seemless to the user: You get to capture the sms and read it without any need of the user's intervention.

What is one way of doing it?

On your server, upon receiving the request to verify a phone number, you should generate a secret code, tokenSent, and send it to the app. Now, your server should send this code by sms to the specified phone number. The app by now should have a registered receiver listening for the android.provider.Telephony.SMS_RECEIVED intent. Once received, the app verifies that the tokenSent is identical to what it received from the server. At this point, phone registration is done and the server can be notified.

What could go wrong?

Generally, such apps are usually paid apps and it is not the user's good to attempt anything. Still, the user might enter a wrong number which he right now has. Then upon receiving the sms, he could forward it to the mobile where the app is registering. The app will then receive the tokenSent and wrongly verify the phone number.

How can we tackle this?

The feasibility of the solution depends on whether the sms provider allows your server to know the sender's phone number. This is probably (AFAIK) not gonna happen but if it does then you're in luck. That way, the app can, upon receiving the tokenSent, send it back to the server along with the sender of the sms. The server then can verify that this is the sms that was originated from your service provider.

Any more feasible solution? (If I am really paranoid)

In this case, the best solution, I believe, would be to request a tokenSent from your server. The server saves a generated tokenSent along with the phone number entered and sends this token to the app. The app notifies the user that registration will cost him 1 sms. Once the user accepts, you can easily send an sms in the background containing this tokenSent to a certain service. The server, once receives this tokenSent verifies the user using the token and the sender of the sms. Of course, this may seem a bit harassing and infringing to the user but it is the most secure way especially for such a paranoid (reading this part).

Formalities :P

Add Permissions in Manifest

<uses-permission android:name="android.permission.RECEIVE_SMS">

Register the receiver (Do this just before you send the sms to the phone)

registerReceiver(new BroadcastReceiver() {

    @Override
    public void onReceive(Context context, Intent intent) {
        if (intent.getExtras() != null)
        {
            Object[] pdus = (Object[]) intent.getExtras().get("pdus");
            SmsMessage[] msgs = new SmsMessage[pdus.length];            
            for (int i=0; i<msgs.length; i++){
                msgs[i] = SmsMessage.createFromPdu((byte[])pdus[i]);                
               String from = msgs[i].getOriginatingAddress();                     
                String body = msgs[i].getMessageBody().toString();
                //here is the body
                //...
                unregisterReceiver(this); //If you are done with verification
            }
        }  
    }
}, new IntentFilter("android.provider.Telephony.SMS_RECEIVED"));
Sherif elKhatib
  • 45,786
  • 16
  • 89
  • 106
3

I solved it my self. Here is my working code. MainActivity Class :

   public class MainActivity extends Activity
{    
    Button submit;
    EditText contact;
    static String phNo;
    ProgressDialog progress;
    static Boolean wasMyOwnNumber;
    static Boolean workDone;
    final static int SMS_ROUNDTRIP_TIMOUT = 30000;

    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        contact = (EditText)findViewById(R.id.mobileNumber);
        submit = (Button) findViewById(R.id.button1);
        wasMyOwnNumber = false;
        workDone = false;
        submit.setOnClickListener(new OnClickListener()
        {
                public void onClick(View v)
                {
                    phNo = contact.getText().toString();
                    new CheckOwnMobileNumber().execute();
                }
        });
    }

    private class CheckOwnMobileNumber extends AsyncTask<String, Void, String>
    {
        @Override
        protected void onPostExecute(String result)
        {
            // TODO Auto-generated method stub
            if(progress.isShowing())
            {
                progress.dismiss();
                if(wasMyOwnNumber)
                {
                    Toast.makeText(getApplicationContext(), "Number matched.", Toast.LENGTH_LONG).show();
                    wasMyOwnNumber = false;
                    workDone = false;
                }
                else
                {
                    Toast.makeText(getApplicationContext(), "Wrong number.", Toast.LENGTH_LONG).show();
                    wasMyOwnNumber = false;
                    workDone = false;
                    return;
                }
            }
            super.onPostExecute(result);
        }

        @Override
        protected String doInBackground(String... params)
        {
            // TODO Auto-generated method stub
            String msg = phNo;
            try
            {
                SmsManager sms = SmsManager.getDefault();
                sms.sendTextMessage(phNo, null, msg, null, null);
                timeout();
            }
            catch(Exception ex)
            {
                Log.v("Exception :", ""+ex);
            }
            return null;
        }

        @Override
        protected void onPreExecute() 
        {
            // TODO Auto-generated method stub
            progress = ProgressDialog.show(MainActivity.this, "","Checking Mobile Number...");
            progress.setIndeterminate(true);
            progress.getWindow().setLayout(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
            super.onPreExecute();
        }
    }

    private boolean timeout()
    {
           int waited = 0;
           while (waited < SMS_ROUNDTRIP_TIMOUT)
           {
              try
              {
                Thread.sleep(100);
              }
              catch (InterruptedException e)
              {
                // TODO Auto-generated catch block
                e.printStackTrace();
              }
              waited += 100;
              if(phoneNumberConfirmationReceived())
              {
                  waited=SMS_ROUNDTRIP_TIMOUT;
                  workDone = true;
              }
           }
           /*Log.v("MainActivity:timeout2: Waited: " , ""+waited);
           Log.v("MainActivity:timeout2:Comparision: ", ""+ phoneNumberConfirmationReceived());
           Log.v("MainActivity:timeout2: WorkDone value after wait complete : ", ""+workDone);*/
        return workDone;
    }

    private boolean phoneNumberConfirmationReceived()
    {
        if(wasMyOwnNumber)
        {
            workDone = true;
        }
        return workDone;
    }
}

SMSReceiver Code :

 public class SMSReceiver extends BroadcastReceiver
{
    private static final String ACTION_SMS_RECEIVED = "android.provider.Telephony.SMS_RECEIVED";
    Context mContext;
    private Intent mIntent;
    static String address, str = null;
    boolean isSame;

    // Retrieve SMS
    public void onReceive(Context context, Intent intent)
    {
        mContext = context;
        mIntent = intent;
        String action = intent.getAction();
        if(action.equals(ACTION_SMS_RECEIVED))
        {
            SmsMessage[] msgs = getMessagesFromIntent(mIntent);
            if (msgs != null)
            {
                for (int i = 0; i < msgs.length; i++)
                {
                    address = msgs[i].getOriginatingAddress();
                    str = msgs[i].getMessageBody().toString();
                }
            }
            Log.v("Originating Address : Sender :", ""+address);
            Log.v("Message from sender :", ""+str);
            isSame = PhoneNumberUtils.compare(str, MainActivity.phNo);
            Log.v("Comparison :", "Yes this true. "+isSame);
            if(isSame)
            {
                 MainActivity.wasMyOwnNumber = isSame;
                 MainActivity.workDone=true;
            }

            // ---send a broadcast intent to update the SMS received in the
            // activity---
            Intent broadcastIntent = new Intent();
            broadcastIntent.setAction("SMS_RECEIVED_ACTION");
            broadcastIntent.putExtra("sms", str);
            context.sendBroadcast(broadcastIntent);
        }
    }

    public static SmsMessage[] getMessagesFromIntent(Intent intent)
    {
        Object[] messages = (Object[]) intent.getSerializableExtra("pdus");
        byte[][] pduObjs = new byte[messages.length][];

        for (int i = 0; i < messages.length; i++)
        {
            pduObjs[i] = (byte[]) messages[i];
        }

        byte[][] pdus = new byte[pduObjs.length][];
        int pduCount = pdus.length;
        SmsMessage[] msgs = new SmsMessage[pduCount];
        for (int i = 0; i < pduCount; i++)
        {
            pdus[i] = pduObjs[i];
            msgs[i] = SmsMessage.createFromPdu(pdus[i]);
        }
        return msgs;
    }
}

No ANR found.

Manish Dubey
  • 4,206
  • 8
  • 36
  • 65
2
public class MainActivity extends Activity{    

    Button submit;
    EditText contact;
    String phNo;
    ProgressDialog progress;
    Boolean wasMyOwnNumber = false;
Boolean workDone = false;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        contact = (EditText)findViewById(R.id.mobileNumber);
        submit = (Button) findViewById(R.id.button1);

        submit.setOnClickListener(new OnClickListener()
        {
                public void onClick(View v)
                {
                    phNo = contact.getText().toString();
                    new CheckOwnMobileNumber().execute();
                    Toast.makeText(getApplicationContext(), phNo, Toast.LENGTH_LONG).show();
                }
        });



    }

    private class CheckOwnMobileNumber extends AsyncTask<String, Void, String>
    {
        @Override
        protected void onPostExecute(String result)
        {
            // TODO Auto-generated method stub
            if(progress.isShowing())
            {

                progress.dismiss();
                // Check SMS Received or not after that open dialog date
                /*if(SMSReceiver.str.equals(phNo))
                {
                    Toast.makeText(getApplicationContext(), "Thanks for providing your          number.", Toast.LENGTH_LONG).show();
wasMyOwnNumber=true;workDone=true;
                }
                else
                {
                    Toast.makeText(getApplicationContext(), "Provide your own mobile number please.", Toast.LENGTH_LONG).show();
wasMyOwnNumber=false;workDone=true;
                    return;
                }*/


            }
        }

        @Override
        protected String doInBackground(String... params)
        {
            // TODO Auto-generated method stub
            String msg = phNo;
            try
            {
                sendSMS(phNo, msg);
                int count=0;
                     while(!workDone)
                          {count++;}
            }
            catch(Exception ex)
            {
                Log.v("Exception :", ""+ex);
            }
            return null;
        }

        @Override
        protected void onPreExecute() {
            // TODO Auto-generated method stub
            progress = ProgressDialog.show(MainActivity.this, "","Checking Mobile Number...");
            progress.setIndeterminate(true);
            progress.getWindow().setLayout(LayoutParams.WRAP_CONTENT,LayoutParams.WRAP_CONTENT);
            super.onPreExecute();
        }

}

    private void sendSMS(String phoneNumber, String message)
        {        
            //PendingIntent pi = PendingIntent.getActivity(getApplicationContext(), 0, new Intent(getApplicationContext(), MainActivity.class), 0);                
            SmsManager sms = SmsManager.getDefault();
            sms.sendTextMessage(phoneNumber, null, message, null, null);        
        }

public class SMSReceiver extends BroadcastReceiver
{
private static final String ACTION_SMS_RECEIVED = "android.provider.Telephony.SMS_RECEIVED";
Context mContext;
private Intent mIntent;
static String address, str = null;

// Retrieve SMS
public void onReceive(Context context, Intent intent) {
    mContext = context;
    mIntent = intent;

    String action = intent.getAction();

    if(action.equals(ACTION_SMS_RECEIVED))
    {
        SmsMessage[] msgs = getMessagesFromIntent(mIntent);
        if (msgs != null)
        {
            for (int i = 0; i < msgs.length; i++)
            {
                address = msgs[i].getOriginatingAddress();
                str = msgs[i].getMessageBody().toString();
            }
        }   

        // ---send a broadcast intent to update the SMS received in the
        // activity---
        workDone=true;
        Intent broadcastIntent = new Intent();
        broadcastIntent.setAction("SMS_RECEIVED_ACTION");
        broadcastIntent.putExtra("sms", str);
        context.sendBroadcast(broadcastIntent);

    }

}

public static SmsMessage[] getMessagesFromIntent(Intent intent)
{
    Object[] messages = (Object[]) intent.getSerializableExtra("pdus");
    byte[][] pduObjs = new byte[messages.length][];

    for (int i = 0; i < messages.length; i++)
    {
        pduObjs[i] = (byte[]) messages[i];
    }

    byte[][] pdus = new byte[pduObjs.length][];
    int pduCount = pdus.length;
    SmsMessage[] msgs = new SmsMessage[pduCount];
    for (int i = 0; i < pduCount; i++)
    {
        pdus[i] = pduObjs[i];
        msgs[i] = SmsMessage.createFromPdu(pdus[i]);
    }
    return msgs;
}
}
    }
Nezam
  • 4,122
  • 3
  • 32
  • 49
  • Got ANR in my package. My Logcat shows : 03-13 17:31:02.049: E/ActivityManager(161): ANR in com.example.test 03-13 17:31:02.049: E/ActivityManager(161): Reason: Broadcast of Intent { act=android.provider.Telephony.SMS_RECEIVED cmp=com.example.test/.SMSReceiver (has extras) } 03-13 17:31:02.049: E/ActivityManager(161): 54% 3732/com.example.test: 54% user + 0% kernel / faults: 21 minor – Manish Dubey Mar 13 '13 at 12:02
  • please post formatted logcat in your question i cannot understand – Nezam Mar 13 '13 at 12:05
  • ok try now.. notice i moved that while loop from `PostExecute()` to `doInBackground()` – Nezam Mar 13 '13 at 12:34
  • Maybe it's just me, but copying and pasting someone else's code in a bounty hunt doesn't feel right. – Simon Mar 14 '13 at 22:42
  • I copied whatever was in the question given itself.Tip: **Whatever you feel may not be right** – Nezam Mar 15 '13 at 04:24
  • When I put that while() loop in doInBackground() I got same ANR problem in my logcat. – Manish Dubey Mar 15 '13 at 06:46
1

Just want to add a bit here to above explanations in the above answers. Which will save time for others as well.

In my case this method didn't returned any mobile number, an empty string was returned. It was due to the case that I had ported my number on the new sim. So if I go into the Settings>About Phone>Status>My Phone Number it shows me "Unknown".

This is probably because you have ported the number from one network to other.

If you are not able to check the number from API Then:

One way of doing that is you generate a text message to the Number and send a Random Generated no to the Mobile Number. You will have to ask the user to enter this Random generated number into your Application. Once it is entered in the application then you can send it onto the server to check whether the number passed in the text is correct or not (Which you have already saved on server against that mobile number).

I hope this makes sense.

user_CC
  • 4,686
  • 3
  • 20
  • 15
  • I didn't port number from one network to another. And please give answer according to question, see my codes. – Manish Dubey Mar 15 '13 at 06:45
  • @ManishAndroid Can you see your mobile number in the Settings Screen? Also Look at my edit to verify Mobile Number – user_CC Mar 15 '13 at 08:58