如何在iPhone中使用MMS进行音频播放? [英] How to use MMS for audio in iphone?

查看:134
本文介绍了如何在iPhone中使用MMS进行音频播放?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我确实在iPhone中浏览了MMS,但是我没有找到太多信息,大多数发现与图像有关.我想使用ios sdkiPhone中的iPhone中使用MMS发送音频,是否可以这样做?我对MMS有以下查询.

I did goggling about MMS in iPhone but I did not find much info on this,most of the findings are related to images. I would like to send audio using MMS in iPhone using ios sdk.Is it possible to do this?I have the following queries regarding MMS.

如何使用iOS SDK识别iPhone中的所有MMS音频文件?

How to identify all the MMS audio files in iPhone using iOS SDK?

如何使用iOS SDK播放iPhone中的MMS文件?

How to play MMS files in iPhone using iOS SDK?

有人可以帮助我识别这些东西吗!

Could some one help me in identifying these things !

推荐答案

MMS,如Multimedia Messaging Service中所述,不适用于iOS中的开发人员. 只有messages.app可以发送MMS,您不能访问messages.app中的任何数据,也不能发送MMS.

MMS as in Multimedia Messaging Service is not available for a developer in iOS. Only the messages.app can send MMS, you can't access any data from the messages.app nor can you send an MMS.

iOS SDK提供了消息UI框架允许您发送电子邮件和短信.但是短信仅限于SMS.

The iOS SDK provides Message UI Framework which allows you to send Email and Text messages. But the text messages are restricted to SMS only.

更新:iOS 7现在支持附件.

Update: iOS 7 now supports attachment.

 - (void)sendAudioFile:(NSURL)audioFilePath {
    if ([MFMessageComposeViewController canSendAttachments] &&
        [MFMessageComposeViewController canSendText] &&
        [MFMessageComposeViewController isSupportedAttachmentUTI:@"com.apple.coreaudio-​format"]) //.caf files
    { 
        NSLog(@"can send");

        MFMessageComposeViewController *message = [[MFMessageComposeViewController alloc] init];
        [message addAttachmentURL:audioFilePath withAlternateFilename:nil]; //.caf file
        message.messageComposeDelegate = self;
        [self presentViewController:message animated:YES completion:nil];
    }
    else {
        NSLog(@"cannot send");
    }
}    

这篇关于如何在iPhone中使用MMS进行音频播放?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆