开发者

How to programmatically "install" files on Android device

开发者 https://www.devze.com 2023-01-08 15:12 出处:网络
Let\'s say I have 2 files on Desktop: (Note that I have another file than .apk application.) .apk file

Let's say I have 2 files on Desktop: (Note that I have another file than .apk application.)

  • .apk file
  • .zip file (which contains a large of data that .apk must unzip and do some work with it).

I want to plug an Android device and pr开发者_如何学Cogrammatically copy these both files to Android.

The application must be visible to user and the .zip file must be "visible" to the application, which will unzip it and do some work with it.

With PalmOS, I use HotSync API. With WinMobile I use ActiveSync (rapi) API. How to do it on Android?


http://developer.android.com/guide/developing/device.html explains how to set up a device to allow this

http://developer.android.com/guide/developing/tools/adb.html gives shell commands to install APK files

You should be able to call this programatically using system()

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号