0
只是一個簡短的問題。Google+分享 - 預填評論欄
我有一個「共享與G +」按鈕,這是我用最簡單的方法整合:
https://plus.google.com/share?url=http:// ...
有沒有將文本插入一個評論框的方法嗎?
如果這不能用這裏使用的方法來完成,可以用其他方法來完成嗎?
只是一個簡短的問題。Google+分享 - 預填評論欄
我有一個「共享與G +」按鈕,這是我用最簡單的方法整合:
https://plus.google.com/share?url=http:// ...
有沒有將文本插入一個評論框的方法嗎?
如果這不能用這裏使用的方法來完成,可以用其他方法來完成嗎?
Google+應用是否安裝或沒有在您的設備,以便嘗試它應該對你有所幫助......
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
shareMediaButton = (Button) findViewById(R.id.share_button);
shareMediaButton.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if(isGooglePlusInstalled())
{
PlusShare.Builder share = new PlusShare.Builder(MainActivity.this);
share.setText("write your message here.....!");
//share.addStream(selectedImage);
share.setType("text/plain");
startActivityForResult(share.getIntent(), 0);
}else{
Intent shareIntent = new PlusShare.Builder(MainActivity.this)
.setType("text/plain")
.setText("write your message here.....!")
.getIntent();
startActivityForResult(shareIntent, 0);
}
}
public boolean isGooglePlusInstalled()
{
try
{
getPackageManager().getApplicationInfo("com.google.android.apps.plus", 0);
return true;
}
catch(PackageManager.NameNotFoundException e)
{
return false;
}
}
});
}