The switch from the C# port of this library is pretty painless, but there are several changes that you need to be aware of. We believe the switch to the native library is for the better for several reasons:
- Official Google code
- Google will keep it up-to-date with Android releases
- Fixes several issues (crashes and leaks)
After switching, there will be a few compiler errors that you are most likely to hit:
- Namespaces have changed to
Google.Android.Vending.* - Licensing
AesObfuscatoris nowAESObfuscatorApkExpansionPolicyis nowAPKExpansionPolicyCallbackErrorCodeis nowLicenseCheckerErrorCodePolicyServerResponseis nowPolicyResponse
- Expansion.Downloader
DownloaderServiceabstract members are nowpublicDownloaderService.Saltis now a methodDownloaderService.GetSalt()DownloaderStateis nowDownloaderClientStateServiceMarshalleris nowDownloaderServiceMarshallerDownloadsDatabaseis nowDownloadsDBDownloadsDB.GetDownloads()is nowGetDownloadsList()DownloadServiceRequirementis nowDownloaderServiceRequirementClientMarshalleris nowDownloaderClientMarshallerServiceFlagsis nowDownloaderServiceFlags
Although this is a few changes, the compiler will pick them all up and intellisense will find the replacement type.
If there are any missing members or changes in behavior, please open an issue so that we can rectify this.
Namespace
- All the namespaces have been merged into
Google.Android.Vending.Licensing- Changed from
LicenseVerificationLibrarytoGoogle.Android.Vending.Licensing - Changed from
LicenseVerificationLibrary.PolicytoGoogle.Android.Vending.Licensing - Changed from
LicenseVerificationLibrary.ObfuscatortoGoogle.Android.Vending.Licensing - Changed from
LicenseVerificationLibrary.DeviceLimitertoGoogle.Android.Vending.Licensing
- Changed from
Types
- Changed from
AesObfuscatortoAESObfuscator - Changed from
ApkExpansionPolicytoAPKExpansionPolicy - Changed from
CallbackErrorCodetoLicenseCheckerErrorCode- Changed enum item from
ErrorNonMatchingUidtoNonMatchingUid
- Changed enum item from
- Changed from
PolicyServerResponsetoPolicyResponse - Type
ServerManagedPolicyno longer has prroperty setters- Method
ServerManagedPolicy.ResetPolicy()is no longer available
- Method
Namespace
- All the namespaces have been merged into
Google.Android.Vending.Expansion.Downloader- Changed from
ExpansionDownloadertoGoogle.Android.Vending.Expansion.Downloader - Changed from
ExpansionDownloader.ClienttoGoogle.Android.Vending.Expansion.Downloader - Changed from
ExpansionDownloader.DatabasetoGoogle.Android.Vending.Expansion.Downloader - Changed from
ExpansionDownloader.ServicetoGoogle.Android.Vending.Expansion.Downloader
- Changed from
Types
- Changed from
ClientMarshallertoDownloaderClientMarshaller - Changed from
ClientMessagestoDownloaderClientMarshallerMessage - Changed from
ClientMessageParameterstoDownloaderClientMarshallerParameter - Changed from
DownloaderStatetoDownloaderClientState - Type
DownloaderService- Abstract members are now
publicinstead ofprotected - Property
Saltis now a methodGetSalt()
- Abstract members are now
- Changed from
DownloaderServiceActionstoDownloaderServiceAction - Changed from
ControlActiontoDownloaderServiceControlAction - Changed from
ServiceFlagstoDownloaderServiceFlags- Changed enum item from
FlagsDownloadOverCellulartoDownloadOverCellular
- Changed enum item from
- Changed from
ServiceMarshallertoDownloaderServiceMarshaller - Changed from
ServiceParameterstoDownloaderServiceMarshallerParameter - Changed from
NetworkDisabledStatetoDownloaderServiceNetworkAvailability - Changed from
DownloadServiceRequirementtoDownloaderServiceRequirement - Changed from
ExpansionDownloadStatustoDownloaderServiceStatus - Changed from
DownloadStatusExtrastoDownloaderServiceStatusExtras - Changed from
DownloadsDatabasetoDownloadsDB- Type
DownloadsDBis no longer a pure static type- The database is now obtained by
DownloadsDB.GetDB(), soDownloadsDB.GetDownloads()now becomesDownloadsDB.GetDB().GetDownloads()
- The database is now obtained by
- Method
GetDownloads()will returnnullif there are no downloads - Method
DownloadsDB.GetDownloadsList()will function the same as the oldDownloadsDatabase.GetDownloads()
- Type