public static boolean copyMedia(Context context,long msgId){
  boolean result=true;
  PduBody body=null;
  try {
    body=SlideshowModel.getPduBody(context,ContentUris.withAppendedId(Mms.CONTENT_URI,msgId));
  }
 catch (  MmsException e) {
    Log.e(TAG,"copyMedia can't load pdu body: " + msgId);
  }
  if (body == null) {
    return false;
  }
  int partNum=body.getPartsNum();
  for (int i=0; i < partNum; i++) {
    PduPart part=body.getPart(i);
    result&=copyPart(context,part,Long.toHexString(msgId));
  }
  return result;
}

public static boolean copyMedia ( Context context , long msgId ) { boolean result = true ; PduBody body = null ; try { body = SlideshowModel . getPduBody ( context , ContentUris . withAppendedId ( Mms . CONTENT_URI , msgId ) ) ; } catch ( MmsException e ) { Log . e ( TAG , "copyMedia can't load pdu body: " + msgId ) ; } if ( body == null ) { return false ; } int partNum = body . getPartsNum ( ) ; for ( int i = 0 ; i < partNum ; i ++ ) { PduPart part = body . getPart ( i ) ; result &= copyPart ( context , part , Long . toHexString ( msgId ) ) ; } return result ; }
copies media from an mms to the " download " directory on the sd card . if any of the parts are audio types , drm ' d or not , they ' re copied to the " ringtones " directory .
