Tatoo compatibility

This commit is contained in:
Mathieu Maret 2010-01-05 14:57:29 +01:00
parent b03884c987
commit 630b48b63e
2 changed files with 23 additions and 21 deletions

View File

@ -1,22 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.openwide.android"
android:versionCode="1"
android:versionName="1.0">
<application android:label="@string/app_name" android:icon="@drawable/multisms">
<activity android:name=".MultiSmsSender"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".PhoneNumberSelection"></activity>
<activity android:name="SelectGroupActivity"></activity>
<activity android:name="GroupEditActivity"></activity>
</application>
<uses-sdk android:minSdkVersion="3" />
<uses-permission android:name="android.permission.READ_CONTACTS"></uses-permission>
<uses-permission android:name="android.permission.SEND_SMS"></uses-permission>
<uses-permission android:name="android.permission.RECEIVE_SMS"></uses-permission>
package="com.openwide.android" android:versionCode="2"
android:versionName="1.0.1">
<application android:label="@string/app_name" android:icon="@drawable/multisms">
<activity android:name=".MultiSmsSender" android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".PhoneNumberSelection"></activity>
<activity android:name="SelectGroupActivity"></activity>
<activity android:name="GroupEditActivity"></activity>
</application>
<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4"/>
<supports-screens android:smallScreens="true"
android:anyDensity="true" />
<uses-permission android:name="android.permission.READ_CONTACTS"></uses-permission>
<uses-permission android:name="android.permission.SEND_SMS"></uses-permission>
<uses-permission android:name="android.permission.RECEIVE_SMS"></uses-permission>
</manifest>

View File

@ -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() {