AとBの2つのアプリがあります
。BをAで呼び出したいです。A
のコードは次のとおりです。
Intent intent = new Intent(Intent.ACTION_MAIN);
intent.setComponent(new ComponentName("com.example.bapp","com.example.bapp.BActivity"));
intent.putExtra ("test2abc", "abctest2");
startActivity(intent);
そして、マニフェストのBのインテントフィルターは次のとおりです。
<intent-filter>
<action android:name="ACTION_BACKCALL" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
ただし、Bが開いている間は、Bを起動する前にBを閉じます。
*.txtファイルを開くための以下のコードを見つけました。これにより、2つのtxtリーダーアプリが同時に開きます。
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setDataAndType(Uri.fromFile(file), mimetype);
startActivity(inte
nt);
どうすれば到着できますか?