Application upgrade | developer.brewmp.com Application upgrade | developer.brewmp.com

Developer

Application upgrade

If I upgraded my existing application (say it has already passed TBT and has been put in ADS) to a newer version will its Download ID change or remain the same?
Is it possible to change application's ID from version to version?

It will change.

It will change.

In this case how the application "know" about new ID? As I understood,
I will seek for update by previous Download ID (taken from MIF) while updated package will be available in ADS with newly issued ID.
Please correct..'cause I don't understand how upgrade is happening in this case :confused:

In this case how the application "know" about new ID? As I understood,
I will seek for update by previous Download ID (taken from MIF) while updated package will be available in ADS with newly issued ID.
Please correct..'cause I don't understand how upgrade is happening in this case :confused:

Application Upgrade Through cmshop
BAM 2.0.4+ automatically handles the scenario where a cmshop:ItemID= call is made with an item ID that no longer exists on the server by performing an upgrade check to find later versions of the application. This situation arises if the application is upgraded on the server after a previous version has been installed on a device. On BAM 2.0.4+ this will be properly handled by MobileShop; however, for devices with BAM versions less than 2.0.4, the workaround described here is required for proper MobileShop behavior when dealing with upgraded applications.
The download item ID is a 32-bit unsigned integer used to identify application packages within the Application Download Server (ADS). The application ID actually consists of the first 24 bits; the final 8 bits represent the version of the application. Any time an upgrade request is made for a given item ID (cmshop:UpgradeCheck=), the ADS makes a check to verify that the version on the server exceeds the version in the upgrade request – if the application version on the server is greater than or equal to the version in the upgrade request, the request will fail. This is significant because an upgrade check request will fail to return results if the application version on the device matches the version on the server, preventing MobileShop from allowing the user to purchase additional uses. For this reason, an application cannot blindly perform an upgrade check request with the item ID it fetches through ISHELL_GetClassItemID().
The solution for this problem is to zero out the version number for the upgrade check request through simple logical operations, as demonstrated below:
#define DLITEMID_FAMILY_MASK (0xffffff00l)
uint32 myAppDownloadID; // used to store download ID
// retrieve download ID and zero out the version number
myAppDownloadID = ISHELL_GetClassItemID(pIShell, AEECLSID_MYAPP) & DLITEMID_FAMILY_MASK;
After the version number has been zeroed out, the application can safely make an upgrade check request regardless of the application version on the server. Any application intended for a device running a version of BAM less than 2.0.4 should be coded to perform an upgrade check with a zeroed-out version number any time MobileShop is invoked for license upgrading.
Determining BAM Software Version
For devices with a generic BAM version, open BAM and select the “Settings->Manage Apps->System Info”. The MobileShop version will be listed as “Software”.
For devices with customized BAM versions (such as the Verizon Get-It-Now UI), refer to the Device Datasheet under “BREW AppMgr Version”.

Application Upgrade Through cmshop
BAM 2.0.4+ automatically handles the scenario where a cmshop:ItemID= call is made with an item ID that no longer exists on the server by performing an upgrade check to find later versions of the application. This situation arises if the application is upgraded on the server after a previous version has been installed on a device. On BAM 2.0.4+ this will be properly handled by MobileShop; however, for devices with BAM versions less than 2.0.4, the workaround described here is required for proper MobileShop behavior when dealing with upgraded applications.
The download item ID is a 32-bit unsigned integer used to identify application packages within the Application Download Server (ADS). The application ID actually consists of the first 24 bits; the final 8 bits represent the version of the application. Any time an upgrade request is made for a given item ID (cmshop:UpgradeCheck=), the ADS makes a check to verify that the version on the server exceeds the version in the upgrade request – if the application version on the server is greater than or equal to the version in the upgrade request, the request will fail. This is significant because an upgrade check request will fail to return results if the application version on the device matches the version on the server, preventing MobileShop from allowing the user to purchase additional uses. For this reason, an application cannot blindly perform an upgrade check request with the item ID it fetches through ISHELL_GetClassItemID().
The solution for this problem is to zero out the version number for the upgrade check request through simple logical operations, as demonstrated below:
#define DLITEMID_FAMILY_MASK (0xffffff00l)
uint32 myAppDownloadID; // used to store download ID
// retrieve download ID and zero out the version number
myAppDownloadID = ISHELL_GetClassItemID(pIShell, AEECLSID_MYAPP) & DLITEMID_FAMILY_MASK;
After the version number has been zeroed out, the application can safely make an upgrade check request regardless of the application version on the server. Any application intended for a device running a version of BAM less than 2.0.4 should be coded to perform an upgrade check with a zeroed-out version number any time MobileShop is invoked for license upgrading.
Determining BAM Software Version
For devices with a generic BAM version, open BAM and select the “Settings->Manage Apps->System Info”. The MobileShop version will be listed as “Software”.
For devices with customized BAM versions (such as the Verizon Get-It-Now UI), refer to the Device Datasheet under “BREW AppMgr Version”.

Thank you very much, Max!
The principle of Application ID assignment from version to version became clear. :)
Just one more thing to know...what is BAM? Is there any info on this subject? Perhaps I overlooked it, but this is the 1st time I encounter this abbreviation.

Thank you very much, Max!
The principle of Application ID assignment from version to version became clear. :)
Just one more thing to know...what is BAM? Is there any info on this subject? Perhaps I overlooked it, but this is the 1st time I encounter this abbreviation.

BAM = BREW Application Manager (App Manager).

BAM = BREW Application Manager (App Manager).