Thanks for replay.....
On Saturday, 3 November 2012 12:50:01 UTC+5:30, Haris wrote:
>
> Hi....
>
> I need to crete an application like group messaging. For that I am
> using SmsManager class.
>
> MY code look like
>
>
> static List<String> phone_num = new ArrayList<String>();static List<String>
> SMS = new ArrayList<String>();
>
> @Overridepublic void onCreate(Bundle savedInstanceState) {
> super.onCreate(savedInstanceState);
> setContentView(R.layout.main);
> readExcelFile(this, "/sdcard/Excel.xls");
> View readExcelButton = findViewById(R.id.buttonSend);
> readExcelButton.setOnClickListener(this);
> }
>
>
> public void onClick(View v) {
> switch (v.getId()) {
> case R.id.buttonSend:
> for(int i=0;i<phone_num.size();i++)
> {
> SmsManager smsManager = SmsManager.getDefault();
> smsManager.sendTextMessage(phone_num.get(i),SMS.get(i), null,
> null);
> }
>
> Toast.makeText(getBaseContext(),
> "Sendingfinished",Toast.LENGTH_SHORT).show();
>
>
> break;
> default: break;
> }
> }
>
>
> My question is, is it a right method for sending group sms. Or should I
> create pendingIntent with broadcast receiver to monitor the sending process
> and wait inside the for loop until each message send finished to send next.
>
> Thanks in advance....
>
>
>
--
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