1
在Android應用Google+分享休息,我想用Google+分享API,您可以通過導航到調用:如果我的應用程序啓動這樣一個活動使用的WebView
https://plus.google.com/share?url=...
;
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(theUrl);
startActivity(intent);
然後創建瀏覽器,我在Google+上看到我的帖子。
在另一方面,如果我嘗試創建這樣一個活動:
Intent intent = new Intent();
intent.setData(theUrl);
intent.setClass(this,GoogleActivity.class);
startActivity(intent);
其中GoogleActivity是)的活動,其的onCreate(實例 網頁視圖,以及的WebView加載通過意圖傳遞的URL , 事情不起作用。我看到WebView,它進入一個頁面,允許我分享上面提到的url。我可以點擊Google+上的分享按鈕 ,然後查看我的Google+信息流,就像我在啓動瀏覽器時打開 一樣。但是我在我的視頻流中看不到我的共享鏈接!
爲什麼這兩種情況會有所不同?
請將您自己的答案標記爲正確答案:) –