开发者

Unknown Method Installpackged

开发者 https://www.devze.com 2023-02-14 09:33 出处:网络
I have developed an app for Android 1.5. I used the method: android.content.pm.PackageManager.installPackage(..) successfully.

I have developed an app for Android 1.5.

I used the method: android.content.pm.PackageManager.installPackage(..) successfully.

Now 开发者_JAVA百科I need to use the same app for Android ver 2.1 but for my luckless the method has removed.

anyone know about replecment for this method? (I am aware to the fact which I must have system permissions in order to use it)

thanks,

ray.

just to make it clear: I am looking for silent way of installing the activity as We did in ver 1.5. we are the phone manufactures(thats why we have specially phone permissions) and we need to ability to do installation without the users involvement. we developed some service for our customers, but now with ver 2.1 we cant help them.


This was deemed a security risk, and I'm pretty sure it was never a public API. The only way third party software should be installing applications is by launching the built-in app installer activity.

Start an activity with the Intent.ACTION_PACKAGE_INSTALL action, with data URI pointing to an .apk


I think the correct way to install apk from your application is via Activity. Android: install .apk programmatically check this for more details.

0

精彩评论

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