2011-06-08 24 views
4

我triying開始WhatsApp的使用Android的意圖:開始的WhatsApp與android.content.Intent.ACTION_SENDTO

String uri = "smsto:+123456"; 
Intent messageIntent = new Intent(Intent.ACTION_SENDTO, Uri.parse(uri)); 
messageIntent.putExtra("sms_body", "My Message"); 
startActivity(messageIntent); 

,如果用戶挑選正常消息傳遞應用程序的偉大工程。但是,如果用戶從選擇器中選擇whatsapp,則不行。 whatsapp中的「撰寫文本字段」保持空白。

我在這裏做錯了什麼?我需要另一個putExtra()嗎?

+0

你問身後的WhatsApp開發商? – CommonsWare 2011-06-08 21:13:02

+0

沒有。讓我這樣做。我會回報。 – domi 2011-06-08 21:47:10

回答

14

下面是從WhatsApp的Android的支持團隊回答:

enter image description here