Running the "Update current installation" option, how do I obtain the version info from the prior installation? I've been through the API and the closest thing I've seen is the public static interface ApplicationRegistry.ApplicationInfo.
Edit
This is how I am currently going about it. It works but am not sure if this is the most feasible method.
import com.install4j.api.ApplicationRegistry;
ApplicationRegistry.ApplicationInfo[] AppInfo = ApplicationRegistry.getApplicationInfoById(context.getApplicationId());
return AppInfo[0].getVersion();
You could use the
static ApplicationRegistry.ApplicationInfo getApplicationInfoByDir(java.io.File dir)
Checks if the specified directory contains an application installed by install4j and retrieves information about it.
This will return a ApplicationInfo instead of the ApplicationInfo[].
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With