发送使用谷歌语音短信 [英] Sending an SMS using Google Voice

查看:245
本文介绍了发送使用谷歌语音短信的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,我需要能够发送短信。我有code直接发送他们,但我想给使用谷歌语音到没有通讯计划谁的用户选择。有谁知道如何做到这一点?我似乎无法找到的方式。下面是我现在正在做的方式:

  StringBuffer的缓冲区=新的StringBuffer();
buffer.append(GEOC);
buffer.append(mLogType.getSelectedItemPosition()== 0@:×);
。buffer.append(mGeocache.getWaypoint())附加();
如果(mLogEdit.getText()长度()方式> 0)
{
    buffer.append(mLogEdit.getText()的toString());
}SmsManager短信= SmsManager.getDefault();
sms.sendTextMessage(41411,空,buffer.toString(),NULL,NULL);


解决方案

您想使用短信意向。

这将会给用户选择的选项(或跳过这一步,如果他已经有一个默认选项)的短信发送程序,他要的使用。

几个应用程序注册自己本身,如Skype,雅虎枢纽,谷歌语音等。

所以使用意图,你告诉机器人使用任何用户想要发送短信到短信的收件人。

I have an app where I need to be able to send SMS messages. I have the code to send them directly, but I would like to give the option to use Google Voice to users who don't have messaging plans. Does anyone know how to do this? I can't seem to find the way. Here is the way I am doing it now:

StringBuffer buffer = new StringBuffer();
buffer.append("GEOC ");
buffer.append(mLogType.getSelectedItemPosition() == 0 ? "@" : "x");
buffer.append(mGeocache.getWaypoint()).append(" ");
if(mLogEdit.getText().length() > 0)
{
    buffer.append(mLogEdit.getText().toString());
}

SmsManager sms = SmsManager.getDefault();
sms.sendTextMessage("41411", null, buffer.toString(), null, null);

解决方案

You want to use an SMS Intent.

That will give the user the option to select (or skip this step if he already have a default option) which SMS sending utility he want's to use.

several applications register themselves as such, such as skype, yahoo hub, google voice, etc.

So using a Intent, you tell android to use whatever the user wants to send the text message to a sms recipient.

这篇关于发送使用谷歌语音短信的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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