简体   繁体   English

如何以编程方式将文本传递给Google语音短信?

[英]How to pass text to Google Voice SMS Programmatically?

I use the following code to start the SMS application:   

Intent smsIntent=new Intent(Intent.ACTION_SENDTO,   Uri.parse("sms:"));
smsIntent.putExtra("sms_body", "Message Body");
startActivity(smsIntent);

It works fine if user selects standard "Messaging" application. 如果用户选择标准的“消息”应用程序,它工作正常。 But if user selects GV the message body text is ignored. 但是如果用户选择GV,则忽略消息正文。

I have also tried the following as suggested in some forums: 我也在一些论坛中尝试了以下建议:

smsIntent.putExtra(Intent.EXTRA_TEXT, "Message Body"); smsIntent.putExtra(Intent.EXTRA_TEXT,“Message Body”);

I have searched all the forums I know of and tried lot of things. 我搜索了所有我认识的论坛,并尝试了很多东西。 Nothing worked for me. 没有什么对我有用。 Am I missing something here? 我在这里错过了什么吗? Does GV need a special handing that it can't be treated as regular “Messaging” app? GV是否需要特殊处理才能将其视为常规“消息”应用程序?

Here are some thoughts that might point you in the right direction: 以下是一些可能指向正确方向的想法:

Hopefully one of these help you out... 希望其中一个可以帮助你...

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM