Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android - Packaging 2 applications together

Remember how Facebook posted an update awhile back that included a 'Camera' app as well as the regular Facebook app? How can I package 2 apks together in the market so when you download the main application, your actually getting 2 separate applications that are related to each other?

I would rather have my users get both applications at once then trying to hunt for both of them individually. Thanks

like image 754
tier1 Avatar asked Aug 10 '26 11:08

tier1


1 Answers

Remember how Facebook posted an update awhile back that included a 'Camera' app as well as the regular Facebook app?

No.

How can I package 2 apks together in the market so when you download the main application, your actually getting 2 separate applications that are related to each other?

You can't.

The closest you could get would be to package App B's APK into App A's assets, then when App A is run, copy App B to external storage and initiate an install. This will cost twice the storage space, since you have no way of removing the copy of App B from App A's APK. And, the user will have to go through and approve the install of App B.

My guess is that what you think are two separate applications are really two separate launcher icons, which can be handled in a single APK by having two <activity> elements with the <intent-filter> for MAIN and LAUNCHER, instead of just one.

like image 118
CommonsWare Avatar answered Aug 13 '26 11:08

CommonsWare



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!