record, commented out, attempt to send NBS message. sendDataMessage()

crashes internally, and googling finds lots of reports/questions and
no answers.  It appears NBS is broken on Android, at least for CDMA.
Might want to revisit on a newer OS version that the 2.1 I'm running
now.
This commit is contained in:
Andy2 2011-08-25 06:52:12 -07:00
parent 711f12fa9e
commit 79acccc6bf
2 changed files with 64 additions and 0 deletions

View file

@ -31,6 +31,8 @@
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.VIBRATE" />
<!-- <uses-permission android:name="android.permission.RECEIVE_SMS" /> -->
<!-- <uses-permission android:name="android.permission.SEND_SMS" /> -->
<uses-sdk android:minSdkVersion="3" android:targetSdkVersion="4" />
@ -122,5 +124,13 @@
<service android:name="RelayService"/>
<!-- <receiver android:name="NBSReceiver"> -->
<!-- <intent-filter android:priority="10"> -->
<!-- <action android:name="android.intent.action.DATA_SMS_RECEIVED" /> -->
<!-- <data android:scheme="sms" /> -->
<!-- <data android:port="50009" /> -->
<!-- </intent-filter> -->
<!-- </receiver> -->
</application>
</manifest>

View file

@ -0,0 +1,54 @@
// /* -*- compile-command: "cd ../../../../../; ant install"; -*- */
// /*
// * Copyright 2010 by Eric House (xwords@eehouse.org). All rights
// * reserved.
// *
// * This program is free software; you can redistribute it and/or
// * modify it under the terms of the GNU General Public License as
// * published by the Free Software Foundation; either version 2 of the
// * License, or (at your option) any later version.
// *
// * This program is distributed in the hope that it will be useful, but
// * WITHOUT ANY WARRANTY; without even the implied warranty of
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// * General Public License for more details.
// *
// * You should have received a copy of the GNU General Public License
// * along with this program; if not, write to the Free Software
// * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// */
// package org.eehouse.android.xw4;
// import android.content.BroadcastReceiver;
// import android.content.Context;
// import android.content.Intent;
// import android.telephony.SmsManager;
// public class NBSReceiver extends BroadcastReceiver {
// @Override
// public void onReceive( Context context, Intent intent )
// {
// Utils.logf( "NBSReceiver::onReceive(intent=%s)!!!!",
// intent.toString() );
// }
// static void tryNBSMessage()
// {
// byte[] data = { 'a', 'b', 'c' };
// SmsManager mgr = SmsManager.getDefault();
// try {
// mgr.sendDataMessage( "123-456-7890", null, (short)50009,
// data, null, null );
// // PendingIntent sentIntent,
// // PendingIntent deliveryIntent );
// Utils.logf( "sendDataMessage finished" );
// } catch ( IllegalArgumentException iae ) {
// Utils.logf( "%s", iae.toString() );
// }
// }
// }