Search in sources :

Example 6 with EncodedStringValue

use of com.google.android.mms.pdu.EncodedStringValue in project XobotOS by xamarin.

the class PduPersister method persistAddress.

private void persistAddress(long msgId, int type, EncodedStringValue[] array) {
    ContentValues values = new ContentValues(3);
    for (EncodedStringValue addr : array) {
        // Clear all values first.
        values.clear();
        values.put(Addr.ADDRESS, toIsoString(addr.getTextString()));
        values.put(Addr.CHARSET, addr.getCharacterSet());
        values.put(Addr.TYPE, type);
        Uri uri = Uri.parse("content://mms/" + msgId + "/addr");
        SqliteWrapper.insert(mContext, mContentResolver, uri, values);
    }
}
Also used : ContentValues(android.content.ContentValues) EncodedStringValue(com.google.android.mms.pdu.EncodedStringValue) Uri(android.net.Uri)

Aggregations

EncodedStringValue (com.google.android.mms.pdu.EncodedStringValue)6 ContentValues (android.content.ContentValues)4 Uri (android.net.Uri)4 MmsException (com.google.android.mms.MmsException)3 ByteArrayOutputStream (java.io.ByteArrayOutputStream)2 IOException (java.io.IOException)2 InputStream (java.io.InputStream)2 HashSet (java.util.HashSet)2 Cursor (android.database.Cursor)1 PduCacheEntry (com.google.android.mms.util.PduCacheEntry)1 FileNotFoundException (java.io.FileNotFoundException)1 OutputStream (java.io.OutputStream)1 HashMap (java.util.HashMap)1 Entry (java.util.Map.Entry)1