将登录详细信息嵌入到APK文件中,每个用户的登录信息是否不同(或其他选项?) [英] Embed login details in APK file, different for each user (or other options?)

查看:112
本文介绍了将登录详细信息嵌入到APK文件中,每个用户的登录信息是否不同(或其他选项?)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们被要求为拥有现有网站,现有用户的公司在Android上创建瘦网络客户端.

We've been asked to create a thin web client on Android for a company with an existing web site, existing users.

他们希望向用户发送彩信,给每个用户自己的下载URL.该URL指向专门为该用户创建的Android apk文件-该文件将包含该用户的网站登录名和密码.

They want to send an mms to their users, giving each user their own download URL. This URL will point to an Android apk file that has been created specifically for that user - it will include that user's login, and password, to the website.

即APK文件将嵌入嵌入式登录详细信息.

这将在J2ME中通过将信息存储在JDK文件中来完成.

This would be done in J2ME by storing info in the JDK file.

我可以在>如何更新apk中的资源文件-但未完全回答.

I can see a simlar question on How to update resources file in apk - but not fully answered.

所以:

  1. 是否可以在apk文件中存储将成为文本文件的资产",并且可以通过解压缩,编辑,重新压缩apk文件轻松地对其进行编辑? (看起来答案是否定的)

  1. is there a way to store an "asset" in the apk file that will be a text file, and easily editable by unzipping, editing, rezipping the apk file? (looks like answer is no)

您是否知道任何类似的问题,或者曾经在类似的应用程序上工作过?

do you know of any similar problems, or have worked on similar apps?

是否有关于如何最好地完成此应用程序的建议?在自动化级别上嵌入客户信息的任何形式都将引起您的兴趣……

is there advice on how best to accomplish this application? Any sort of embedding of customer info on an automated level would be of interest...

最好的选择是将应用设置为使用Ant脚本进行构建,并让客户端实际自定义源代码并为每个用户构建一个新应用吗? (这样做的缺点是客户端会获取源代码,而我们宁愿没有).

would the best option be to set the app to build with an Ant script, and have the client actually customize the source code and build a new app per user? (this has the con that the client gets the source code, which we'd rather not have)

我已经扫描了apk标记的问题,但似乎找不到解决方案.

I have scanned apk tagged questions and can't seem to find a solution to this.

非常感谢, 理查德

推荐答案

我想如果您使用资产文件夹,则可以将其放入apk(或在其中替换虚拟文件).

I guess you could put it into the apk (or replace a dummy file there) if you use the assets folder for it.

您可以很容易地通过文件名而不是resource-id获取数据: getResources().getAssets().open(fileName)

You can obtain the data by filename instead resource-id quite easy: getResources().getAssets().open(fileName)

关于, 奥利弗(Oliver)

Regards, Oliver

这篇关于将登录详细信息嵌入到APK文件中,每个用户的登录信息是否不同(或其他选项?)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆