HockeyApp SDK has offered a new feature "In-App Update". This feature checks if a new version for your app store release is available and if yes, it will show an alert view to the user and let him open your app in the App Store app.
Based on the description in the documentation, the implementation in the Xamarin.Droid project is as follows :
protected override void OnCreate(Bundle savedInstanceState)
{
base.OnCreate(savedInstanceState);
SetContentView(Resource.Layout.CustomerInfoLayout);
// Hockey App SDK API - for In-App Update.
// _appUtils.HockeySecretKey - the value is the key got from the hockey portal when the App was registered.
UpdateManager.Register(this, _appUtils.HockeySecretKey);
// Initializes certain UI elements.
Initialize();
}
The manifest defines the permissions required as follows :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto" package="com.xyz.abc" android:versionCode="100000000" android:versionName="1.0.0">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="22" />
<application android:label="Abc" android:icon="@drawable/App_Icon" android:name="Abc.Droid.AbcApplication">
<meta-data android:name="net.hockeyapp.android.appIdentifier" android:value="3436451c725e49988d6f12dc843d85e8" />
</application>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.INTERNET" />
</manifest>
The implementation does not work, although it is in line with the documentation provided : https://support.hockeyapp.net/kb/client-integration-cross-platform/how-to-integrate-hockeyapp-with-xamarin#feedback
To test the working of this feature, two build were generated with Version numbers 2.0.0 and 2.1.0 and uploaded on HockeyApp as Alpha builds. Further, 2.0.0 was installed on the device. The home screen which has the integrated API was left open for quite a while, and nothing happened, when ideally it should have provided a pop-up to notify that version 2.1.0 was available.
The sniffing tool Charles was used to check if there is any query happening, and the query sent out by HockeySDK returns a 200 result code, where as the response is just empty braces {}.
The documentation also says that this feature is disabled by default, although it does not mention how to enable it.
Additional information : The HockeyApp SDK DLL being used is the latest version 5.1.2. The same implementation was also tested with version 5.1.1.
Query : Does this functionality work for builds uploaded in App Store or Hockey App? If it works for builds uploaded in Hockey App, then should it be an Alpha build or a Beta build?
Also, any kind of help is appreciated to get this functionality working. Thank you!
The HockeyApp support team has been quite informative in this regard.
While uploading a build to the HockeyApp store, it is possible to distribute the build to either Restricted users or Unrestricted users. 1) In case of Unrestricted users, the implementation provided above for In-App Update feature works perfectly fine. 2) In case of Restricted users, Authentication feature needs to be in place, after which the In-App Update feature should be triggered.
PS - Documentation to implement Authentication feature https://support.hockeyapp.net/kb/client-integration-cross-platform/how-to-integrate-hockeyapp-with-xamarin#authentication