开发者

Android MMS Parsing

In one of my application, I have to parse the MMS content. I am able to get th开发者_运维百科e encoded MMS content in the form of byte[]. Now I have to decode this byte[] and need to extract all the content based on their content types and header values. But I am struggling here. I don't know how to start decoding...

Any help will be appreciated.


you have the content in byte[] so you can try this:

byte[] buffer;
String incomingNumber = new String(buffer);
int indx = incomingNumber.indexOf("/TYPE");
if(indx>0 && (indx-15)>0){
   int newIndx = indx - 15;
   incomingNumber = incomingNumber.substring(newIndx, indx);
   indx = incomingNumber.indexOf("+");
   if(indx>0){
   incomingNumber = incomingNumber.substring(indx);
}

you can continue to parse like this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜