Receiving Message through Notification from one twilio number to other twilio number
<p>I had done a lot of R&amp;D on receiving the message notification from twilio number.</p>

<p>scenario is  from one twilio app ,one send the message to the other twilio number ,then the other  twilio number in the app ,have to receive the notification of that particular app .</p>

<p>I had tried send notification ,but did not find anything to sort out this thing ..</p>

<p>Suggest me what to do ,for receiving the message as a notification in the app when someone send the message to that particualr twilio number .</p>

<pre><code>Log.i("sendNotificationMethod","sendNotificationMethod");
        /* Instantiate a new Twilio Rest Client */
        TwilioRestClient client = new TwilioRestClient(sub_sid, sub_auth_token);

        // Get the account and call factory class
        Account acct = client.getAccount();
        SmsFactory smsFactory = acct.getSmsFactory();

        //build map of server admins
        Map&lt;String,String&gt; admins = new HashMap&lt;String,String&gt;();
        admins.put("12056108304", "Johnny");
        admins.put("12053405623", "Helen");
        admins.put("4158675311", "Virgil");

        String fromNumber = sms_fromm;

        Log.i("fromNumber", fromNumber);

        // Iterate over all our server admins
        for (String toNumber : admins.keySet()) {

            //build map of post parameters 
            Map&lt;String,String&gt; params = new HashMap&lt;String,String&gt;();
            params.put("From", fromNumber);
            params.put("To", toNumber);
            params.put("Body", "Bad news1111 " + admins.get(toNumber) + ", the server is down and it needs your help");

            try {
                // send an sms a call  
                // ( This makes a POST request to the SMS/Messages resource)
                Sms sms = smsFactory.create(params);
                Log.i("sms.getStatus()", sms.getStatus().toString());
                Log.i("Success sending SMS: ","" + sms.getSid());
            }
            catch (TwilioRestException e) {
                e.printStackTrace();
            }
        }
</code></pre>

<p>i had used the above code for sending the Notification and using the lib file twilio-java.
I am getting an error of Nosuch method error .Means it is not finding the TwilioRestClient method </p>

<pre><code>03-21 13:19:11.223: E/AndroidRuntime(296): FATAL EXCEPTION: main
</code></pre>

<p>03-21 13:19:11.223: E/AndroidRuntime(296): java.lang.NoSuchMethodError: org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager.
03-21 13:19:11.223: E/AndroidRuntime(296):  at com.twilio.sdk.TwilioRestClient.(TwilioRestClient.java:137)
03-21 13:19:11.223: E/AndroidRuntime(296):  at com.twilio.sdk.TwilioRestClient.(TwilioRestClient.java:108)
03-21 13:19:11.223: E/AndroidRuntime(296):  at com.zoemultiline.sms.SMS_In_Out.initializeView(SMS_In_Out.java:200)
03-21 13:19:11.223: E/AndroidRuntime(296):  at com.zoemultiline.sms.SMS_In_Out.onCreate(SMS_In_Out.java:185)
03-21 13:19:11.223: E/AndroidRuntime(296):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
03-21 13:19:11.223: E/AndroidRuntime(296):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
03-21 13:19:11.223: E/AndroidRuntime(296):  at android.app.ActivityThread.startActivityNow(ActivityThread.java:2503)
03-21 13:19:11.223: E/AndroidRuntime(296):  at android.app.LocalActivityManager.moveToState(LocalActivityManager.java:127)
03-21 13:19:11.223: E/AndroidRuntime(296):  at android.app.LocalActivityManager.startActivity(LocalActivityManager.java:339)
03-21 13:19:11.223: E/AndroidRuntime(296):  at android.widget.TabHost$IntentContentStrategy.getContentView(TabHost.java:651)
03-21 13:19:11.223: E/AndroidRuntime(296):  at android.widget.TabHost.setCurrentTab(TabHost.java:323)
03-21 13:19:11.223: E/AndroidRuntime(296):  at android.widget.TabHost$2.onTabSelectionChanged(TabHost.java:129)
03-21 13:19:11.223: E/AndroidRuntime(296):  at android.widget.TabWidget$TabClickListener.onClick(TabWidget.java:453)
03-21 13:19:11.223: E/AndroidRuntime(296):  at android.view.View.performClick(View.java:2408)
03-21 13:19:11.223: E/AndroidRuntime(296):  at android.view.View$PerformClick.run(View.java:8816)
03-21 13:19:11.223: E/AndroidRuntime(296):  at android.os.Handler.handleCallback(Handler.java:587)
03-21 13:19:11.223: E/AndroidRuntime(296):  at android.os.Handler.dispatchMessage(Handler.java:92)
03-21 13:19:11.223: E/AndroidRuntime(296):  at android.os.Looper.loop(Looper.java:123)
03-21 13:19:11.223: E/AndroidRuntime(296):  at android.app.ActivityThread.main(ActivityThread.java:4627)
03-21 13:19:11.223: E/AndroidRuntime(296):  at java.lang.reflect.Method.invokeNative(Native Method)
03-21 13:19:11.223: E/AndroidRuntime(296):  at java.lang.reflect.Method.invoke(Method.java:521)
03-21 13:19:11.223: E/AndroidRuntime(296):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
03-21 13:19:11.223: E/AndroidRuntime(296):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
03-21 13:19:11.223: E/AndroidRuntime(296):  at dalvik.system.NativeStart.main(Native Method)</p>

<pre><code>enter code here
</code></pre>
