Android Question Second apk in same package

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
I might be dreaming...
In pc I can add an exe file to my app package so it contains 2 or even more exe files.
This way I can pack the entire solution as I want it.
The user runs the main exe and if and when needed the main exe can run another exe.

Is it possible in Android?
Is it possible with B4A?

The second apk is completely independent but must be with the main apk in same package or in same apk so the user sees one package

Or should I wake up?

If yes - how?
2 apks?
Or what?

Tanks
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
Thanks
Exe was to explain my idea, I know that there is no exe in Android.
The idea was to put 2 apps in same package so I don't need to install 2 app but only one that will contain the second
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
Thank you
As I suspected I will have to wake up...

Any idea how to overcome such a problem?
I can create another app, upload to Google layout store etc...
But I'm trying to avoid it
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
I don´t see how you would overcome that as it is not possible in Android.
Create a second app with a new packagename and start this app if you want to.
Yes, seems like the path to go to
I wanted to avoid the need to send the user to install another app...
That's the reason for me getting 'crazy'
I want to simplify the user's life...
In pc I just pack 2 or more exe files and run them internally if and when needed
One setup
 
Upvote 0

epiCode

Active Member
Licensed User
Thank you
As I suspected I will have to wake up...

Any idea how to overcome such a problem?
I can create another app, upload to Google layout store etc...
But I'm trying to avoid it
you can use Intent to install an apk file however you need to have target phone enable "install app from unknown sources" turned on
 
Upvote 0

epiCode

Active Member
Licensed User
Thanks
It will be easier and simpler to do it the right way through the store...
you can also use intent to open an app in play store (leaving it on the user to install it from there)
 
Upvote 0

Zeev Goldstein

Well-Known Member
Licensed User
Longtime User
If I want to pass some info between my app and the second one that will be invoked as intent - how do I do it?
So the second app will get some input?

And, how if possible to return info to the calling app?

Thanks
 
Upvote 0

teddybear

Well-Known Member
Licensed User
The second apk is completely independent but must be with the main apk in same package or in same apk so the user sees one package

Or should I wake up?

If yes - how?
2 apks?
Or what?

Tanks
If it is in same apk. you can get on dreaming.
Put the second apk into asset folder of your 1st app. while the 1st app running you can check the package if it is installed ? and then you may do what you want to do
 
Upvote 0

aeric

Expert
Licensed User
Longtime User
If you want to create something like the B4A-Bridge, check the source code.
In B4A-Bridge, the app checks if you have B4A-Designer installed. If it is not, it will prompt you to install the designer app which has a different package name.
 
Upvote 0

MicroDrie

Well-Known Member
Licensed User
Longtime User
I don´t see how you would overcome that as it is not possible in Android.
Create a second app with a new packagename and start this app if you want to.
Or you realize the two programs with one B4XPages in which you only initialize the necessary B4Xpages you need, based on your user's choice. Or just throw away pages you no longer need. You just have to think much more modular and realize functionality in reusable and program shareable B4XPage that you can add at will in programs you create.

An additional advantage: you can use the global variable in the B4XMainPage to exchange information between the two programs within your program without being hindered by the Android data restrictions.

By the way, storing and reading a Global variable in the B4XMainPage is a good reason to free up memory space by, for example, removing a B4XPage and a read-out or to write all variables between to program and a file.
 
Upvote 0
Top