1
ユーザーが他のユーザーとオブジェクトを共有できるようにしたいと考えています。
私はこのようなインテントフィルタを持つオブジェクトの情報を表示することができアクティビティがあります。共有のためAndroid:ユーザーがこのリンクをクリックすると、リンクを共有してアクティビティを開くことができます
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="http" android:host="www.mywebsite.com" />
</intent-filter>
コード:
Intent shareIntent = new Intent(Intent.ACTION_SEND);
shareIntent.setType("text/plain");
shareIntent.putExtra(Constants.EXTRA_OBJECT_ID, id);
shareIntent.putExtra(Constants.EXTRA_IS_LOCAL, false);
shareIntent.putExtra(Intent.EXTRA_TEXT, "http://www.mywebsite.com");
startActivity(Intent.createChooser(shareIntent, "Share link using"));
しかし、私は、このリンクをクリックしたとき、私は自分のアプリケーションを見ることができないが「アクションを使用して完了」ダイアログで
私はこのリンクを最初にテキストとして共有し、次にこのリンクをクリックするとアクティビティを開く –