tier1
tier1

Reputation: 6433

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

Upvotes: 3

Views: 217

Answers (2)

Ahmad
Ahmad

Reputation: 72533

A very interesting question. I asked that question myself too. But did not get an answer to that. The only thing I could came up with was to use tge (unifficial) Google play store API and then after the User starts the App you could download the second App trough the API. But I assume thats not very elegant

Upvotes: 0

CommonsWare
CommonsWare

Reputation: 1006554

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.

Upvotes: 2

Related Questions