B4J Question how to run b4j app from another b4j app?

ilan

Expert
Licensed User
Longtime User
hello

can i run a b4j app from another b4j app?
and also send data?

thanx
 
Last edited:

Cableguy

Expert
Licensed User
Longtime User
To exchange data the "best" way is to have a common DataFile. As to run another b4j app, is just a matter of "shelling" it
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
yes you are right. just saw this post from erel


it solves the issue of running another b4j app.
and about sharing data i think i will store it in a file and when the app starts it will read from it and delete it since i dont want the data to stay locally.

thanks
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
It might be worth considering generating a random filename in app 1 then passing that as a parameter to app 2 , that way sneaky people won't know what name to look for.
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
It might be worth considering generating a random filename in app 1 then passing that as a parameter to app 2 , that way sneaky people won't know what name to look for.
this is a very good idea, thanks! ?

you can use it to give parameters to the other app too.
They arrive in
B4X:
AppStart (Args() As String)
the Args-Parameter(s) ;-)

great this is what i needed to know! ?
 
Upvote 0

stevel05

Expert
Licensed User
Longtime User
It might be worth considering generating a random filename in app 1 then passing that as a parameter to app 2 , that way sneaky people won't know what name to look for.
This is the way I implemented this in one of my apps. I didn't use a random file name, but it works well. You can pass a small amount of data as a parameter but the length is limited, if you don't know how much data will need to be passed, it is easier and safer to use a file and pass the path to it.

I also used the same filename to send data back when required.
 
Upvote 0

ilan

Expert
Licensed User
Longtime User
i am saving the data to a file (random name) -> passing the path -> open the other app
other app getting the path from args() -> processing the data - deleting the file

works perfect! thanks again ?
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…