Skip to content

Commit

Permalink
fix: removed onDeviceResume in the testbed for BranchInit
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanneff committed Nov 17, 2016
1 parent 8585d6d commit a63e7e8
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions testbed/www/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,26 +8,14 @@ var app = {
},
bindEvents: function bindEvents() {
document.addEventListener('deviceready', this.onDeviceReady, false);
document.addEventListener('resume', this.onDeviceResume, false);
},
onDeviceReady: function onDeviceReady() {
BranchInit(true);
},
onDeviceResume: function onDeviceResume() {
BranchInit(true);
}
};
app.initialize();

// branch
function onBranchLinkHook(data) {
if (data) {
alert('Initialize: ' + JSON.stringify(data));
}
else {
alert('No data found');
}
}

function BranchInit(isDebug) {
console.log('Trigger BranchInit()');
Expand All @@ -44,9 +32,17 @@ function BranchInit(isDebug) {
console.error(err);
alert('Error: ' + JSON.stringify(err));
});

// handler for deep link data
function onBranchLinkHook(data) {
if (data) {
alert(JSON.stringify(data));
}
}
// optional
Branch.onNonBranchLink(function NonBranchLinkHandler(data) {
if (data) {
alert('Non-branch link found: ' + JSON.stringify(data));
alert(JSON.stringify(data));
}
});
}
Expand Down

0 comments on commit a63e7e8

Please sign in to comment.