Google Voice SMS intent

北城以北 提交于 2019-12-31 04:07:08

问题


Right now I'm trying to create an SMS intent with a populated number.

Intent sendIntent = new Intent(Intent.ACTION_VIEW);
sendIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); 
sendIntent.setData(Uri.parse("smsto:"+phoneNumber));
context.startActivity(sendIntent);
setResultData(null);

this works fine with the phone's SMS app, however the problem is that if Google Voice is installed and the user selects this option rather than the normal SMS app, google voice won't populate the number.

Is there a way to populate the number in google voice with an SMS intent?


回答1:


You can check here "list of google voice intents and arguments" http://groups.google.com/group/appinventor/browse_thread/thread/2e857e86f113109b?tvc=2&pli=1




回答2:


This blog post seems to be about what you are after: the Intent setting the phone number for the SMS. The redundant setting of metadata maybe helps Google Voice-enhanced phones.

http://juristr.com/blog/2009/12/android-sms-activity-doesnt-fill-phone/



来源:https://stackoverflow.com/questions/5386326/google-voice-sms-intent

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!