出错的LOG如下:

01-04 04:08:54.457: V/sending_mms_library(10438): error saving mms message
01-04 04:08:54.457: W/System.err(10438): com.google.android.mms.MmsException: unable to update content://mms/1388779734454/part/0
01-04 04:08:54.457: W/System.err(10438): at com.google.android.mms.pdu_alt.PduPersister.persistData(PduPersister.java:798)
01-04 04:08:54.457: W/System.err(10438): at com.google.android.mms.pdu_alt.PduPersister.persistPart(PduPersister.java:759)
01-04 04:08:54.457: W/System.err(10438): at com.google.android.mms.pdu_alt.PduPersister.persist(PduPersister.java:1389)
01-04 04:08:54.457: W/System.err(10438): at com.klinker.android.send_message.Transaction.getBytes(Transaction.java:423)
01-04 04:08:54.457: W/System.err(10438): at com.klinker.android.send_message.Transaction.sendMmsMessage(Transaction.java:309)
01-04 04:08:54.467: W/System.err(10438): at com.klinker.android.send_message.Transaction.sendNewMessage(Transaction.java:140

01-04 04:08:54.497: V/sending_mms_library(10438): still an error saving... :( 
01-04 04:08:54.497: W/System.err(10438): java.io.FileNotFoundException: App op not allowed
01-04 04:08:54.497: W/System.err(10438): at android.database.DatabaseUtils.readExceptionWithFileNotFoundExceptionFromParcel(DatabaseUtils.java:146)
01-04 04:08:54.497: W/System.err(10438): at android.content.ContentProviderProxy.openAssetFile(ContentProviderNative.java:611)
01-04 04:08:54.497: W/System.err(10438): at android.content.ContentResolver.openAssetFileDescriptor(ContentResolver.java:922)
01-04 04:08:54.497: W/System.err(10438): at android.content.ContentResolver.openOutputStream(ContentResolver.java:669)
01-04 04:08:54.507: W/System.err(10438): at android.content.ContentResolver.openOutputStream(ContentResolver.java:645)
01-04 04:08:54.507: W/System.err(10438): at com.klinker.android.send_message.Transaction.createPartImage(Transaction.java:1055)
01-04 04:08:54.507: W/System.err(10438): at com.klinker.android.send_message.Transaction.insert(Transaction.java:1020)
01-04 04:08:54.507: W/System.err(10438): at com.klinker.android.send_message.Transaction.getBytes(Transaction.java:429)
01-04 04:08:54.507: W/System.err(10438): at com.klinker.android.send_message.Transaction.sendMmsMessage(Transaction.java:309)
01-04 04:08:54.507: W/System.err(10438): at com.klinker.android.send_message.Transaction.sendNewMessage(Transaction.java:140)

01-04 04:08:54.507: W/System.err(10438): java.lang.IllegalArgumentException: Null message URI.
01-04 04:08:54.517: W/System.err(10438): at com.android.mms.transaction.MmsMessageSender.(MmsMessageSender.java:63)
01-04 04:08:54.517: W/System.err(10438): at com.klinker.android.send_message.Transaction.sendMmsMessage(Transaction.java:312)
01-04 04:08:54.517: W/System.err(10438): at com.klinker.android.send_message.Transaction.sendNewMessage(Transaction.java:140)

出现这个错误的原因,是因为Android 4.4 KitKat上面新的SMS机制,如果有添加,删除短信操作,你的应用必须设置为默认的SMS APP,具体原因可以看我的这篇文章:
http://www.yinqisen.cn/blog-304.html

如果你的android 系统版本 < 4.4则不会有此问题。

推荐一个很棒的第三方精简的 Laravel console

个人喜好经常写些命令行工具,laravel 很方便,但脚手架工程就 45M左右,使用 composer install --no-dev 也要24M左右,很笨重。 也尝试过 symfony 的 compos...

阅读全文

有关 PHP 和 js 浮点运算的坑

javascript 0.1 + 0.2 为啥不等于 0.3 ? (正确结果:0.30000000000000004) 0.8 * 7 为啥不等于 5.6 ? (正确结果:5.6000000000000005) PHP var_dump(intv...

阅读全文

彻底搞懂 PHP 变量结构体,多数文章观点不准确

PHP5 中的 zval // 1. zval typedef struct _zval_struct { zvalue_value value; zend_uint refcount__gc; zend_uchar type; zend_uchar is...

阅读全文

欢迎留言