通过链接安装apk

时间:2015-05-22 14:12:04

标签: python django web installation apk

我尝试确保在打开链接时无需下载apk即可开始安装。 互联网在代码中找到了一定数量的信息:

path = os.path.join(build.project.path, build.upload_file_identifier + '.' + build.extentions)
file = open(path, 'rb')

response = HttpResponse(file, content_type='application/vnd.android.package-archive')
response['Content-Length'] = os.path.getsize(path)
response['Content-Disposition'] = 'attachment'.format(
    translit(build.name.replace(' ', '_'), 'ru', reversed=True),
    build.number,
    build.build_type)

return response

问题是当你打开链接时开始下载。

是否可以做任何事情来开始安装?

0 个答案:

没有答案