blackberry/DistimoSDK-PhoneGap-Plugin — pull request #2 by YifanRen (2014-10-04 16:35:34+00:00)
Title: Updated existing code and added openApplink() implement.

openAppLink: function(applinkHandle, campaignHandle);

Basically Distimo created a uri "http://app.lk//redirect?[x=]" for each user application. When GET that, Distimo server will redirect it to the app world uri "http://appworld.blackberry.com/webstore/content/".

openAppLink() function prevent the redirection, get the appId from the response header, and invoke app world with that. If it fails to get the appId, it will open browser with applink uri. That page will be redirected and app world is invoked showing the corresponding app.