Getting data from another app and sending data back

I need to get a number sent from an outside app sent to my Kodular App as follows (Java Version)

Bundle extras = getIntent().getExtras();

if (extras != null) {
String jobName= extras.getString(“JOBNUMBER”);

Later I need to return some data as follows (Java Version)

Intent intent = new Intent();
intent.setData( Total.toPlainString() );
setResult(RESULT_OK, intent);

Any Ideas on how to express this in Kodular? I know I need to use activity starters, but am not sure how to set them up.

Thanks

Did You Try a Database ,?

App1<=> database <==> App2

The app is to be open by another non-AI style app with the data returned to the same app. I was hoping I could use something that could communicate with the sending apps Java intents.

to receive something from another app in your Kodular app see here Using the Activity Starter chapter Starting App Inventor apps from external apps

To start an App Inventor activity from an external app, use the Java Android methods startActitvity() or startActivityForResult(). To pass a startup value, include that value in the intent, by invoking the method Intent.putExtra(tag, value) where tag is the string APP_INVENTOR_START. The App Inventor app being started can then access the corresponding value with the screen’s Get Start Plain Start Text method.

Taifun

1 Like

Thanks. I saw that, but I am trying to set up to send with tag other than APP_INVENTOR_START in order to send additional information. Specifically, is there a way to receive and send java intents through activity starter?

Thanks.

this is the only tag which can be received, but you can transfer several values also in only one tag

everything what the activity starter is able to do is explained in the documentation

and the already provided document Using the Activity Starter
if you want to reveal, what exactly you are trying to do, then someone can say, if it is possible or not…

Taifun

1 Like

I wasn’t able to find a way to do it either. Thanks for verifying.