Note that there are some explanatory texts on larger screens.

plurals
  1. POSave/Create MMS in inbox Android
    primarykey
    data
    text
    <p>I am working on an Application which needs to be able to Save/Create a new MMS in inbox or Sent folders but I cant figure out the way.</p> <p>I tried the following code but it gave me exception:</p> <pre><code>ContentValues values = new ContentValues(); values.put("address", "xxxxxxxxxxx"); values.put("body", "body 3"); values.put("read", "0"); getContentResolver().insert(Uri.parse("content://mms/inbox"), values); </code></pre> <p>And the Exception is: </p> <pre><code>ERROR/Database(118): Error inserting read=0 body=body 3 msg_box=1 date=1306153444 address=xxxxxxxxxxx ERROR/Database(118): android.database.sqlite.SQLiteException: table pdu has no column named body: , while compiling: INSERT INTO pdu(read, body, msg_box, date, address) VALUES(?, ?, ?, ?, ?); ERROR/Database(118): at android.database.sqlite.SQLiteCompiledSql.native_compile(Native Method) ERROR/Database(118): at android.database.sqlite.SQLiteCompiledSql.compile(SQLiteCompiledSql.java:91) ERROR/Database(118): at android.database.sqlite.SQLiteCompiledSql.&lt;init&gt;(SQLiteCompiledSql.java:64) ERROR/Database(118): at android.database.sqlite.SQLiteProgram.&lt;init&gt;(SQLiteProgram.java:80) ERROR/Database(118): at android.database.sqlite.SQLiteStatement.&lt;init&gt;(SQLiteStatement.java:36) ERROR/Database(118): at android.database.sqlite.SQLiteDatabase.compileStatement(SQLiteDatabase.java:1145) ERROR/Database(118): at android.database.sqlite.SQLiteDatabase.insertWithOnConflict(SQLiteDatabase.java:1536) ERROR/Database(118): at android.database.sqlite.SQLiteDatabase.insert(SQLiteDatabase.java:1410) ERROR/Database(118): at com.android.providers.telephony.MmsProvider.insert(MmsProvider.java:347) ERROR/Database(118): at android.content.ContentProvider$Transport.insert(ContentProvider.java:174) ERROR/Database(118): at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:146) ERROR/Database(118): at android.os.Binder.execTransact(Binder.java:288) ERROR/Database(118): at dalvik.system.NativeStart.run(Native Method) ERROR/MmsProvider(118): MmsProvider.insert: failed! read=0 body=body 3 msg_box=1 date=1306153444 address=xxxxxxxxxxx </code></pre> <p><strong>UDPATE:</strong> Exception removed by removing the line: <code>values.put("body","body 3")</code> But I can't see any mms in messages.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload