From 630b48b63ef085d3c0d25e8379b0178d75aa6cf6 Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Tue, 5 Jan 2010 14:57:29 +0100 Subject: [PATCH] Tatoo compatibility --- AndroidManifest.xml | 38 ++++++++++---------- src/com/openwide/android/MultiSmsSender.java | 6 ++-- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index f10cd78..e0e0818 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,22 +1,22 @@ - - - - - - - - - - - - - - - + package="com.openwide.android" android:versionCode="2" + android:versionName="1.0.1"> + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/com/openwide/android/MultiSmsSender.java b/src/com/openwide/android/MultiSmsSender.java index 72b8f8a..0fa3642 100644 --- a/src/com/openwide/android/MultiSmsSender.java +++ b/src/com/openwide/android/MultiSmsSender.java @@ -9,6 +9,7 @@ import android.app.ProgressDialog; import android.content.DialogInterface; import android.content.Intent; import android.os.Bundle; +import android.telephony.PhoneNumberUtils; import android.telephony.gsm.SmsManager; import android.view.Menu; import android.view.MenuItem; @@ -83,8 +84,9 @@ public class MultiSmsSender extends Activity { for (int i = 0; i < numbers.length; i++) { String newN = numbers[i].trim(); mSendingDialog.setMax(size); - if (!newN.equals("")) { + if (!newN.equals("") && PhoneNumberUtils.isWellFormedSmsAddress(newN)) { mSendingDialog.setProgress(i / size); + if (!allreadySend.contains(newN)) { allreadySend.add(newN); manager.sendMultipartTextMessage(newN, null, manager.divideMessage(message), null, null); @@ -101,7 +103,7 @@ public class MultiSmsSender extends Activity { dialog.dismiss(); } - }).setMessage( getResources().getString(R.string.message_sent)).show(); + }).setMessage(allreadySend.size()+" "+ getResources().getString(R.string.message_sent)).show(); }else { new AlertDialog.Builder(this).setPositiveButton(getResources().getString(R.string.ok), new DialogInterface.OnClickListener() {