From a63e7e8201fe520a1aaf91116bf6096773cd9305 Mon Sep 17 00:00:00 2001 From: Ethan Neff Date: Wed, 16 Nov 2016 16:43:18 -0800 Subject: [PATCH] fix: removed onDeviceResume in the testbed for BranchInit --- testbed/www/js/index.js | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/testbed/www/js/index.js b/testbed/www/js/index.js index 2b774ec0..200b8e1c 100644 --- a/testbed/www/js/index.js +++ b/testbed/www/js/index.js @@ -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()'); @@ -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)); } }); }