Android, Is it possible to consolidate two APK files?
<p>I have a project for Android. In this project my client asked me following scenario but I'm not sure that it is possible.</p>

<p>They want to create an app-store for android. In this store after developer uploads his application we should wrap this APK file with our APK file (therefore we will have one APK file). This wrapper adds some activities to developer's application in order to able users to check their credits and add credits if they have not enough credit to their account (we don't want to manipulate the developer's code, we just want to add our code into their code). Therefore, when user download and install this application, each time he/she launches the application, our wrapper should be run first and check his/her financial account through Internet, if s/he has enough credit in his account, therefore s/he is free to use the application. If s/he didn't have enough credit we should guide him/her to buy more credit. </p>

<p>The things that I did, I created two sample project to see if I add APK of one to second, may I run that application from second application.</p>

<p>In the first application I just show some text in its activity and in second project (wrapper) I created a button that when I click on it, first project should be run. The result was not satisfactory and I couldn't run it. </p>

<p>I think if I export JAR file from first project and repeat above procedure I'll have better results but because in future we can't ask developers to put JAR file of your application instead of APK, it is not a good idea.</p>

<p>Now, for around a week I was thinking about this story and I couldn't find a way to know how can I consolidate and merge developer's application with our wrapper application. </p>

<p>If you have any suggestion please guide me.</p>
