krisDrOid
krisDrOid

Reputation: 3316

Android apk file Dynamic Build

I am working on an android project which requires me to build the android's apk file at run time, i am doing so because i need to add a text document. This is like a client server process.

When a user opens a particular ip address, at run time on server side the apk file is built with the text document. The text document contains the users master data which is unique to a single user. At the end, the android app is directly downloaded and installed on mobile phone.

If any one knows the way to do it, please let me know.

Upvotes: 3

Views: 1915

Answers (2)

Barmaley
Barmaley

Reputation: 16363

You need to do at least several things (I've done similar task in J2ME):

  1. You have to have JDK on server side
  2. ANT tool installed there
  3. Some scripting tool to generate sources (as a last resort your own Java servlet)

So based on user response you should:

  • using scripting tool generate Java source
  • generate/collect necessary resources
  • generate AndroidManifest.xml
  • run on top of that ANT builder
  • get APK file and upload it to customer

Upvotes: 4

Sephy
Sephy

Reputation: 50392

The easiest way I can see would be to use some software like maven to build your project dynamically. This way, when you receive a request from a user, you start a build with maven and push the output to the request.
There are some nice projects of integration Android - Maven like this.

Upvotes: 1

Related Questions