peacemaker Expert Licensed User Longtime User Jul 4, 2012 #1 Hi, All Anyone tried to install\uninstall APK hidden by PackageManager? For launcher application. Here Java source: android - install / uninstall APKs programmatically (PackageManager vs Intents) - Stack Overflow android - uninstall app silently with system priveleges - Stack Overflow I guess, is it possible by Reflection under B4A?
Hi, All Anyone tried to install\uninstall APK hidden by PackageManager? For launcher application. Here Java source: android - install / uninstall APKs programmatically (PackageManager vs Intents) - Stack Overflow android - uninstall app silently with system priveleges - Stack Overflow I guess, is it possible by Reflection under B4A?
NJDude Expert Licensed User Longtime User Jul 4, 2012 #2 You can try this to Install: Code: Dim i As Intent i.Initialize(i.ACTION_VIEW, "file:///sdcard/MyAPK.apk") i.SetType("application/vnd.android.package-archive") StartActivity(i) To Uninstall: Code: Dim i As Intent i.Initialize("android.intent.action.DELETE", "package:com.example.app") StartActivity(i) Is that what you want to do? Last edited: Jul 4, 2012 Upvote 0
You can try this to Install: Code: Dim i As Intent i.Initialize(i.ACTION_VIEW, "file:///sdcard/MyAPK.apk") i.SetType("application/vnd.android.package-archive") StartActivity(i) To Uninstall: Code: Dim i As Intent i.Initialize("android.intent.action.DELETE", "package:com.example.app") StartActivity(i) Is that what you want to do?
peacemaker Expert Licensed User Longtime User Jul 4, 2012 #3 NJDude, i know about this manual install\uninstall by Intents. Question is for background installation\uninstallation APKs by the launcher that is a custom Market. Upvote 0
NJDude, i know about this manual install\uninstall by Intents. Question is for background installation\uninstallation APKs by the launcher that is a custom Market.
Erel B4X founder Staff member Licensed User Longtime User Jul 5, 2012 #4 It is not possible to silently install or uninstall an APK unless your application is part of OS ROM. Upvote 0
It is not possible to silently install or uninstall an APK unless your application is part of OS ROM.
peacemaker Expert Licensed User Longtime User Jul 5, 2012 #5 Yes, this application is planned to be main ROM launcher. Must it be in system app folder evn for debugging ? Last edited: Jul 5, 2012 Upvote 0
Yes, this application is planned to be main ROM launcher. Must it be in system app folder evn for debugging ?
Erel B4X founder Staff member Licensed User Longtime User Jul 8, 2012 #6 You will need to call private Android APIs to install / uninstall the apps. I'm afraid that I'm not familiar with these APIs nor they are probably not documented anywhere. Upvote 0
You will need to call private Android APIs to install / uninstall the apps. I'm afraid that I'm not familiar with these APIs nor they are probably not documented anywhere.
peacemaker Expert Licensed User Longtime User Jul 8, 2012 #7 But links in my first post shows public abstract void installPackage( Uri packageURI, IPackageInstallObserver observer, int flags, String installerPackageName); public abstract void deletePackage( String packageName, IPackageDeleteObserver observer, int flags); Click to expand... Seems, there some people posted that used, and there is link to a working Eclipse code. Do you mean now these functions cannot be tried anywhow with help of Reflection ? Upvote 0
But links in my first post shows public abstract void installPackage( Uri packageURI, IPackageInstallObserver observer, int flags, String installerPackageName); public abstract void deletePackage( String packageName, IPackageDeleteObserver observer, int flags); Click to expand... Seems, there some people posted that used, and there is link to a working Eclipse code. Do you mean now these functions cannot be tried anywhow with help of Reflection ?
Erel B4X founder Staff member Licensed User Longtime User Jul 8, 2012 #8 You can try them with reflection. Upvote 0
peacemaker Expert Licensed User Longtime User Jul 16, 2012 #9 Seems, real way is only by Shell commands to install\uninstall hidden. Upvote 0
peacemaker Expert Licensed User Longtime User Aug 6, 2012 #10 Erel said: You can try them with reflection. Click to expand... HI, Erel, What kind of object in b4a is Android Observer in these functions? Observer | Android Developers Observable | Android Developers Upvote 0
Erel said: You can try them with reflection. Click to expand... HI, Erel, What kind of object in b4a is Android Observer in these functions? Observer | Android Developers Observable | Android Developers
Erel B4X founder Staff member Licensed User Longtime User Aug 7, 2012 #11 These objects are not used by Basic4android. Upvote 0
Dogbonesix Active Member Licensed User Longtime User Sep 16, 2012 #12 Too manykeys, I guess I was getting errors loading my first key and after many tries I believe there are several keys now. In fact I am not really sure how I got this far. But my problem now is below: Installation will fail if the signing key is different than the previous used key. In that case you will need to manually uninstall the existing application. Completed successfully. I have two questions: 1) How do I manually uninstall the application? Or As the application is quite small - just recode (cut and paste) a new application with different package and application labels and start a new signing process? Upvote 0
Too manykeys, I guess I was getting errors loading my first key and after many tries I believe there are several keys now. In fact I am not really sure how I got this far. But my problem now is below: Installation will fail if the signing key is different than the previous used key. In that case you will need to manually uninstall the existing application. Completed successfully. I have two questions: 1) How do I manually uninstall the application? Or As the application is quite small - just recode (cut and paste) a new application with different package and application labels and start a new signing process?
Dogbonesix Active Member Licensed User Longtime User Sep 16, 2012 #13 See Above Post I was looking too deep. Solution :signOops:too simple... Just delete the application on the phone not on B4A... Upvote 0
See Above Post I was looking too deep. Solution :signOops:too simple... Just delete the application on the phone not on B4A...
Devv Active Member Licensed User Longtime User Apr 23, 2015 #14 Erel said: It is not possible to silently install or uninstall an APK unless your application is part of OS ROM. Click to expand... You only need to have root access , i had tested this on multiple devices , no need for ROM integration so far ... Upvote 0
Erel said: It is not possible to silently install or uninstall an APK unless your application is part of OS ROM. Click to expand... You only need to have root access , i had tested this on multiple devices , no need for ROM integration so far ...
DonManfred Expert Licensed User Longtime User Apr 23, 2015 #15 This is an old thread!!! Why are you ansering on an 2,5 years old thread? If you have an issue then you should create a new thread Upvote 0
This is an old thread!!! Why are you ansering on an 2,5 years old thread? If you have an issue then you should create a new thread