Hello Ehsan 
to receive from certain numbers , you have to do the following : 
1- make a BroadcastReceiver for receiving SMS messages and declare it in 
the AndroidManifest.xml  
2- in the onReceive(Context context, Intent intent) you take the incoming 
message by doing this 

Bundle bundle = intent.getExtras();
Object[] pdus = (Object[]) bundle.get("pdus");
SmsMessage[] messages = new SmsMessage[pdus.length];
for (int i = 0; i < messages.length; i++) {
messages[i] = SmsMessage.createFromPdu((byte[]) pdus[i]);
         String number = messages[i].getOriginatingAddress();
        
// Now you check if the number is one of the certain numbers that you want 
to receive sms for 


        }


Hope that Helps 
Regards 

On Monday, August 6, 2012 7:23:07 AM UTC+3, Ehsan Sadeghi wrote:
>
> How can I receive from certain numbers and only for them my app is started 
> and how doesn't messages that app receive appear in the messaging built in?

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to