2014-10-17 154 views
2

我試圖發送信息throgh variouse應用例如WhatsApp,Facebook,微博等意圖選配用於發送短信的短信不

我現在用的這個:

Intent messageIntent = 
new Intent(Intent.ACTION_VIEW,Uri.fromParts("smsto",showPhone.getText().toString(),null)); 

我應該用什麼來代替smsto?

它將只要求短信應用我要像WhatsApp的,臉譜等

回答

2

所有消息的應用程序試試這個,它會幫助你在這個

  Intent sharingIntent = new Intent(Intent.ACTION_SEND); 
      sharingIntent.setType("text/plain"); 
      sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, Html.fromHtml(textToShare)); 
      startActivity(Intent.createChooser(sharingIntent,titleOfSharingWindow));  
+0

它會顯示郵件(Android默認值)也? – Amy 2014-10-17 07:53:23

+0

它會顯示安裝在android手機中的所有應用程序的消息服務... – 2014-10-17 07:54:24

+0

我想通過一個數字也消息,WhatsApp的應用程序。它似乎不可能在上面的代碼 – Amy 2014-10-17 07:54:26