发送语音消息给另一个联系号码 [英] send voice message to another contact number

查看:113
本文介绍了发送语音消息给另一个联系号码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经做了一个程序,在其中我的发送一些文字 pre定义的联系人号码,但现在我也想发送语音消息以这个数字请让我知道我能做到这一点?

要发送文字短信,我用下面code: -

 字符串phoneNumber的=XXXX9;
            字符串消息= editLocation.getText()的toString()。
            SmsManager smsManager = SmsManager.getDefault();
            smsManager.sendTextMessage(phoneNumber的,空的消息,NULL,NULL);
            Toast.makeText(getApplicationContext(),
            信息已发送!,Toast.LENGTH_LONG).show();


解决方案

转寄此的链接。在这个环节没有对如何通过彩信发送图像的交代。你可以替换音频文件的图像文件。你可以找到code在上面的链接的评论发送语音消息。

I have made a program, in which I am sending some text to pre defined contact number, but now I also want to send voice message to that number please let me know how can I do this?

To send text SMS I am using below code:-

            String phoneNumber = "XXXX9";
            String message = editLocation.getText().toString();
            SmsManager smsManager = SmsManager.getDefault();
            smsManager.sendTextMessage(phoneNumber, null, message, null, null);
            Toast.makeText(getApplicationContext(), 
            "Message Sent!", Toast.LENGTH_LONG).show();

解决方案

Refer this link. In this link there is an explaination on how to send images via MMS. you can just replace the image file with the Audio File. you can find the code to send voice message in the Comments of the above link.

这篇关于发送语音消息给另一个联系号码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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