There is application A, in it the standard activity com.example.messer.myapplicationa

There is application B, there is also standard activity com.example.messer.myapplicationb

You need to send a string from A to B

Intent i = new Intent(com.example.messer.myapplicationb); i.putExtra("string", editText.getText()); startActivityForResult(i,1); 

What to transfer to the intent? I can not find in any way

    2 answers 2

    Transfer your string from application A to the MainActivity of application B:

     Intent myIntent1 = new Intent(); myIntent1.setComponent(new ComponentName("com.example.messer.myapplicationb", "com.example.messer.myapplicationb.MainActivity")); myIntent1.putExtra("param1", myEditText1.getText().toString()); startActivity(myIntent1); 

    In Appendix B, in the MainActivity in the onCreate method, you accept the transferred string:

     String myParametrFromApplicationA = getIntent().getStringExtra("param1"); Toast.makeText(getApplicationContext(), myParametrFromApplicationA, Toast.LENGTH_SHORT).show(); 

      Look in the direction of the IntentFilter , another example