My app is built on ionic 1 and I have followed this guide to get things working. https://github.com/BranchMetrics/cordova-ionic-phonegap-branch-deep-linking When you click on the branch url, the app opens up fine.
Now I want to setup android app links. When I receive an email with my web app url, eg: https://app.example.com, this should open up the app if mobile app is installed. If not user should be taken to play store/App store.
Also if the link has query params (the query params will be dynamic), this should be passed to the mobile app. eg: https://app.example.com/mypath?query_params=1234567890
Based on the path in the url, the user will be redirected to the respective page on the ionic app.
I have setup the branch sdk bower install branch-sdk
. When I click on the url (https://app.example.com) this still opens up on browser. This is how my index.html in ionic app looks like.
<script src="lib/branch-sdk/dist/build.min.js"></script>
<script type="text/javascript">
console.log("Branch SDK Loading");
branch.init('key_test_ikEKvQjiZRwV1LXZ2hUlamfewwhVQ5rw', function(err, data) {
console.log("Branch SDK Loaded");
console.log("Branch SDK Err and Data ", err, data);
});
</script>
Any idea how to set these things up?