Send and download MMS via content provider instead of PDU bytes.
Change-Id: Ib5a93d07799c9e14fea8be820c6bd4bc7ae8be3a
This commit is contained in:
@@ -1369,8 +1369,8 @@
|
||||
<provider android:name=".os.MmsFileProvider"
|
||||
android:authorities="com.example.android.apis.os.MmsFileProvider"
|
||||
android:enabled="@bool/atLeastLRelease"
|
||||
android:permission="android.permission.MODIFY_PHONE_STATE"
|
||||
android:exported="true"/>
|
||||
android:grantUriPermissions="true"
|
||||
android:exported="false" />
|
||||
|
||||
<!-- ************************************* -->
|
||||
<!-- ANDROID.ANIMATION PACKAGE SAMPLES -->
|
||||
|
||||
@@ -191,8 +191,9 @@ public class MmsMessagingDemo extends Activity {
|
||||
}
|
||||
|
||||
if (contentUri != null) {
|
||||
SmsManager.getDefault().sendMultimediaMessage(contentUri,
|
||||
null/*locationUrl*/, null/*configOverrides*/, pendingIntent);
|
||||
SmsManager.getDefault().sendMultimediaMessage(getApplicationContext(),
|
||||
contentUri, null/*locationUrl*/, null/*configOverrides*/,
|
||||
pendingIntent);
|
||||
} else {
|
||||
Log.e(TAG, "Error writing sending Mms");
|
||||
try {
|
||||
@@ -225,8 +226,8 @@ public class MmsMessagingDemo extends Activity {
|
||||
.build();
|
||||
final PendingIntent pendingIntent = PendingIntent.getBroadcast(
|
||||
MmsMessagingDemo.this, 0, new Intent(ACTION_MMS_RECEIVED), 0);
|
||||
SmsManager.getDefault().downloadMultimediaMessage(locationUrl, contentUri,
|
||||
null/*configOverrides*/, pendingIntent);
|
||||
SmsManager.getDefault().downloadMultimediaMessage(getApplicationContext(),
|
||||
locationUrl, contentUri, null/*configOverrides*/, pendingIntent);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user