Android Question Call another application and wait for the Message

I want to call another application from B4a application and wait till the message received from another application. Could you please tell me how to do this . I had already tried this
Dim Intent1 As Intent
Intent1 = pm.GetApplicationIntent ("com.example.uhf")
StartActivity(Intent1)

But please tell me how to receive the message and wait for the external application to exit
 
the other application may not return a message. if it does, then you can use StartActivityForResult:

https://www.b4x.com/android/forum/threads/using-startactivityforresult-with-javaobject.40374/

follow the instructions. it works very well.
an event will be raised in the first activity when the other application answers.

if the other application does not return a message, then game over.
is it supposed to return a message? many apps can be launched with an
intent, but that doesn't mean you receive something back from them.
 
Upvote 0
the other application may not return a message. if it does, then you can use StartActivityForResult:

https://www.b4x.com/android/forum/threads/using-startactivityforresult-with-javaobject.40374/

follow the instructions. it works very well.
an event will be raised in the first activity when the other application answers.

if the other application does not return a message, then game over.
is it supposed to return a message? many apps can be launched with an
intent, but that doesn't mean you receive something back from them.
Sir I tried to use with StartActivityForResult but B4a is giving an error ' Undeclared variable 'startactivityforresult' is used before it was assigned any value.'. I think B4a does not support this Method
 
Upvote 0
Back
Top