Android apk 文件动态构建
我正在开发一个android项目,它需要我在运行时构建android的apk文件,我这样做是因为我需要添加一个文本文档。这就像一个客户端服务器进程。
当用户打开特定的 IP 地址时,在服务器端运行时,将使用文本文档构建 apk 文件。文本文档包含单个用户唯一的用户主数据。最后直接下载Android应用程序并安装到手机上。
如果有人知道如何做到这一点,请告诉我。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您至少需要做几件事(我在 J2ME 中完成了类似的任务):
所以基于用户响应,您应该:
You need to do at least several things (I've done similar task in J2ME):
So based on user response you should:
我能想到的最简单的方法是使用一些软件(如 Maven)来动态构建项目。这样,当您收到用户的请求时,您可以使用 Maven 启动构建并将输出推送到请求。
有一些很好的集成 Android - Maven 的项目,例如这个。
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.