I'm looking to set an apk uninstall followed by an install of a newer version. Is there a way to set if version of bundle/ID = x.x.x continue with uninstall else discontinue?
I'm looking to set an apk uninstall followed by an install of a newer version. Is there a way to set if version of bundle/ID = x.x.x continue with uninstall else discontinue?
As far as I know, 'IF" script command is, in general, NOT supported for most script application cases (including scripts in pcg package) for Android platform.
The If-Then logical statements are not supported in the scripting for Android devices. This includes the Send Script option, File Sync scripts, Package scripts, Out of Contact Policy scripts, etc.
I would simply have a script that uninstalls the previous bundle ID as a Pre-Install script of your new package deployment. There is no harm in attempting to run an uninstall if the app isnt there.
...but boy wouldn't it be great to use an if-then to utilize "update" instead of remove/install...
Having if-then statements combined with being able to take user input from a pop up window would be a dream come true in Android.