android - 使用 Google Voice 发送短信

标签 android sms google-voice

我有一个应用程序需要能够发送短信。我有直接发送它们的代码,但我想为没有消息传递计划的用户提供使用 Google Voice 的选项。有谁知道如何做到这一点?我好像找不到路了。这是我现在做的方式:

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);

最佳答案

您想使用 SMS Intent。

这将使用户可以选择(如果他已有默认选项,则跳过此步骤)他想要使用的 SMS 发送实用程序。

一些应用程序将自己注册为此类,例如 skype、yahoo hub、google voice 等。

因此,使用 Intent,您可以告诉 android 使用用户想要的任何内容将文本消息发送给短信收件人。

关于android - 使用 Google Voice 发送短信,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4338001/

相关文章:

android - 为 Android 应用程序创建 SQLite 数据库

sms - 修改ASN.1 BER编码的CDR文件

Android 1.6 相当于 EXTRA_GATEWAY_URI

android - 使用 ProgressBar 和 AsyncTask 发送短信 |安卓

google-voice - 有Google Voice API吗?

c# - 在 C# 中使用谷歌 "Speak Now"

Android 应用内计费 Phonegap 1.0

android - 如何将 RecyclerView 放在 CollapsingToolbarLayout 下面并在 Android 中折叠时响应工具栏?

Android Facebook 登录在注销后总是询问用户

iphone - 处理 iPhone 收到的消息