2011-09-13 21 views
2

我有很多麻煩讓我的應用程序共享工作。意圖和共享我的應用程序

public boolean onOptionsItemSelected(MenuItem item) { 
    switch (item.getItemId()) {   
     case R.id.exit: System.exit(0); 
      break; 

     case R.id.icontext: String url = "http://www.manaforged.com"; 
      String shareText = url + "\nCheck this gaming community out!"; 
      Intent sendIntent = new Intent(Intent.ACTION_SEND); 
      sendIntent.setType("plain/text"); 
      sendIntent.putExtra(Intent.EXTRA_TEXT, shareText); 
      startActivity(Intent.createChooser(sendIntent, "Share")); 
      break;    
    } 
    return true; 

我只收到2個選項Gmail和其他一些隨機的東西。我看到其他人使用大致相同的代碼和更多選項的屏幕截圖。我的手機上安裝了Facebook應用程序。 API是否改變,我正在查看舊信息?我對此感到非常沮喪。有任何想法嗎?

回答

1

變化sendIntent.setType("plain/text")sendIntent.setType("text/plain") 它會解決你的問題..

相關問題