Rusty Well-Known Member Licensed User Longtime User Dec 12, 2016 #1 I have a Java app (Android Studio) and a B4a app. I need to send text from the Java app to the B4a app. In my Java code I have: Code: Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_TEXT, "This is my text to send."; sendIntent.setType("text/plain"); startActivity(sendIntent); I have seen Erel's example Post#7 Code: Dim in As Intent in.Initialize(in.ACTION_SEND, "") in.PutExtra("android.intent.extra.TEXT", "This is my text to send.") in.SetType("text/plain") in.WrapAsIntentChooser("Share Via") StartActivity(in) Both actions say ACTION_SEND. I'm confused as to how: identify which app is sending and which is receiving How to execute the receive end within the B4a app Any suggestions are appreciated. Also, if there is a sample app that sends and/or receives text from another app, that would also be appreciated. Regards, Rusty
I have a Java app (Android Studio) and a B4a app. I need to send text from the Java app to the B4a app. In my Java code I have: Code: Intent sendIntent = new Intent(); sendIntent.setAction(Intent.ACTION_SEND); sendIntent.putExtra(Intent.EXTRA_TEXT, "This is my text to send."; sendIntent.setType("text/plain"); startActivity(sendIntent); I have seen Erel's example Post#7 Code: Dim in As Intent in.Initialize(in.ACTION_SEND, "") in.PutExtra("android.intent.extra.TEXT", "This is my text to send.") in.SetType("text/plain") in.WrapAsIntentChooser("Share Via") StartActivity(in) Both actions say ACTION_SEND. I'm confused as to how: identify which app is sending and which is receiving How to execute the receive end within the B4a app Any suggestions are appreciated. Also, if there is a sample app that sends and/or receives text from another app, that would also be appreciated. Regards, Rusty
Erel B4X founder Staff member Licensed User Longtime User Dec 13, 2016 #2 See this tutorial: https://www.b4x.com/android/forum/t...app-communication-with-intents.30608/#content Upvote 0
See this tutorial: https://www.b4x.com/android/forum/t...app-communication-with-intents.30608/#content