This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<intent-filter> | |
<data android:scheme="your_uri_scheme" /> | |
<action android:name="android.intent.action.VIEW" /> | |
<category android:name="android.intent.category.DEFAULT" /> | |
<category android:name="android.intent.category.BROWSABLE" /> | |
</intent-filter> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fallbackFunction = function() { | |
window.location.replace('market://details?id=com.myapp.package'); | |
}; | |
var addIFrame = function() { | |
var iframe = document.createElement("iframe"); | |
iframe.style.border = "none"; | |
iframe.style.width = "1px"; | |
iframe.style.height = "1px"; | |
iframe.src = 'your_uri_scheme://'; | |
document.body.appendChild(iframe); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Uri data = this.getIntent().getData(); | |
if (data != null && data.isHierarchical()) { | |
String uri = this.getIntent().getDataString(); | |
Log.i("MyApp", "Deep link clicked " + uri); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
res.set('Location', 'intent://open?link_click_id=123456#Intent;scheme=branchtest;package=io.branch.testbed;'); | |
res.status(307).end(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<receiver android:name="io.branch.testbed.InstallListener" android:exported="true"> | |
<intent-filter> | |
<action android:name="com.android.vending.INSTALL_REFERRER" /> | |
</intent-filter> | |
</receiver> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class InstallListener extends BroadcastReceiver { | |
@Override | |
public void onReceive(Context context, Intent intent) { | |
// called in the install referrer broadcast case | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void onReceive(Context context, Intent intent) { | |
String rawReferrerString = intent.getStringExtra("referrer"); | |
if(rawReferrerString != null) { | |
Log.i("MyApp", "Received the following intent " + rawReferrerString); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fallbackFunction = function() { | |
window.location.replace('market://details?id=io.branch.testbed&referrer=specialparam'); | |
}; | |
var addIFrame = function() { | |
var iframe = document.createElement("iframe"); | |
iframe.style.border = "none"; | |
iframe.style.width = "1px"; | |
iframe.style.height = "1px"; | |
iframe.src = 'your_uri_scheme://'; | |
document.body.appendChild(iframe); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(b,r,a,n,c,h,_,s,d,k){if(!b[n]||!b[n]._q){for(;s<_.length;)c(h,_[s++]);d=r.createElement(a);d.async=1;d.src="https://cdn.branch.io/branch-v1.8.0.min.js";k=r.getElementsByTagName(a)[0];k.parentNode.insertBefore(d,k);b[n]=h}})(window,document,"script","branch",function(b,r){b[r]=function(){b._q.push([r,arguments])}},{_q:[],_v:1},"addListener applyCode banner closeBanner creditHistory credits data deepview deepviewCta first getCode init link logout redeem referrals removeListener sendSMS setIdentity track validateCode".split(" "), 0); | |
branch.init('YOUR-BRANCH-KEY'); | |
branch.deepview( | |
{ | |
'channel': 'mobile_web', | |
'feature': 'deepview', | |
data : { | |
'$deeplink_path': 'page/1234', | |
'user_cookie_id': '7890', | |
'page_id': '1234', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
branch.deepviewCta(); |