Deep-Linking + Bitcoin = đź‘Ś

Burak
2 min readJul 9, 2019

Currently, the payment experience on mobile devices is extremely poor because users have to undertake many steps such as:​

  1. Copy the address.
  2. Open a wallet app.
  3. Paste the address.
  4. Type the amount to send.
  5. Send to the address.
  6. Re-open the source application.

This protocol dramatically reduces the user’s required steps.

1. Opens the deep link to a wallet app.

2. The user confirms payment and is automatically returned to the source app.

iOS

For iOS, your wallet listen deep link interactions with it’s unique custom URL scheme also known as associated domain (i.e yourappdomain://)

Registering a custom URL scheme for your own applications is remarkably simple. All you have to do is create an entry in your application’s info.plist file.

<key>CFBundleURLTypes</key>

<array> <dict>

<key>CFBundleURLName</key>

<string>com.yourapplicationid</string>

<key>CFBundleURLSchemes</key>

<array>

<string>yourappdomain</string>

</array> </dict>

Example Deep Link (iOS):

yourappdomain:// resolve ?payment_protocol_uri=”bitcoin:1EJ19gH17K4upEephwJ4217bPaSop7fxL2?amount=0.000147" &callback_uri=”googlechrome://”

Android

Android deep-link interactions are not done with associated domains. Instead, the app is being invoked through an android:scheme of given cryptocurrency name with following android:host indicated “resolve”.

Supported android:scheme filters include: “bitcoin”, “bitcoincash”, “litecoin”, “dash”, “dogecoin” and “ethereum”

The following XML snippet shows how you might specify an intent filter in your manifest for deep linking — the URI “ethereum://resolve” resolve to this activity.

<activity

android:name="com.yourapplicationid"

android:label="@string/title_crypto"

<intent-filter android:label="@string/filter_view_example_ethereum">

<action android:name="android.intent.action.VIEW" />

<action android:name="android.intent.category.DEFAULT" />

<action android:name="android.intent.category.BROWSABLE" />

<!-- Accept URIs that begin with "ethereum://resolve" -->

<data android:scheme="ethereum"

android:host="resolve" />

</intent-filter>

</activity>

Example Deep Link (Android):

ethereum:// resolve ?payment_protocol_uri=”ethereum:0x024f233f073153b257cc4921ef6b6db79527ff35?amount=0.003733" &callback_uri=”eBay://”

Once the wallet app completed the requested behaviour, the wallet app ping the callback URI (i.e “eBay://”)

--

--