1
我有以下代碼爲Android與其他應用程序如Facebook,Twitter,WhatsApp或Watever分享應用程序。我的Android應用程序共享我的應用程序鏈接到其他應用程序不起作用
它是開放的對話,並顯示應用程序選擇任何人,但是當我選擇的應用程式它給我的消息共享失敗,請稍後再試
Intent shareIntent = new Intent(Intent.ACTION_SEND);
shareIntent.setType("plain/text");
shareIntent.putExtra(Intent.EXTRA_TEXT, mWebView.getUrl());
startActivity(Intent.createChooser(shareIntent, "share_with"));
它只需將url複製到短信我想與其他應用程序共享,當我點擊按鈕時,它應該顯示應用程序選擇一個whatsapp viber imo或任何,所以我會選擇該應用程序假設whatsapp,然後用戶, –
它看起來像你做得很好[你可以參考這個](https://developer.android.com/training/sharing/send.html#send-text-content) –