Follow

How To Set Up Your App for Deep Linking

Note: Deep linking capability is only available in Pugpig Products on iOS and Android from version 1.3.4+

- iOS
- Android

iOS

To enable and use deep linking in your Pugpig Products iOS app and content you need to set up a custom URL scheme in your Xcode project- you can find out more about how to do this here.

Once your app is live with a custom URL scheme applied you can start using the following URL schema to deep link users into your application. We advise sending deep links via push notifications. We don't think email marketing is a particularly good use case for this feature because it assumes a number of pre-requisites like user viewing email on device and having the app installed with content downloaded so you should always highlight these conditions to users in email communications if you intend to use it for this purpose.

We support five specific actions that your URL can trigger:

1. Open an issue already downloaded
2. Open an issue to a specific page already downloaded
3. Prompt user to purchase store subscription
4. Prompt user to login to third party auth

The generic format for a URL to trigger an app action is:

CustomProtocol://action?parameter1=value1,parameter2=value2

Where ‘CustomProtocol’ is the custom URL scheme you set up earlier in the app binary.

Link TypeLink ExampleLink DescriptionActionParameter 1Parameter 2
to Edition <CustomProtocol>://content?editionID=<EditionID> If user has edition on device it will open the edition on first page content editionID n/a
to Page in Edition <CustomProtocol>://content?editionID=<EditionID>&pageURL=<PageID> If user has edition on device it will open on the page specified content editionID pageURL
to Store Subscription <CustomProtocol>://subscribe Attempts to purchase default store subscription available subscribe n/a n/a
to Third Party Auth Login <CustomProtocol>://login[?providerName] If you don't provide a providerName it will go to the first store auth screen available in app. Otherwise third party subscriptions login screen Account > Existing Subscriptions. login providerName n/a

Generally, URLs that trigger ‘content’ actions should be created from your CMS, as it is important that the ‘editionID’ and optional ‘pageURL’ values are correct and valid. 

If the content isn't available on the users device the deep link URL should simply fallback to launching the application in the usual manner.

 Android 

To enable and use deep linking in your Pugpig Products Android app you have to add this in your AndroidManifest.xml:

<activity
      android:name="com.kaldorgroup.pugpig.products.DeepLinkHelper"
      android:theme="@android:style/Theme.NoDisplay">
      <intent-filter>
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="${packageName}" />
      </intent-filter>
</activity>


In the android:scheme="${packageName}" replace everything inside the quotes if the URI scheme is not going to be the package name/bundle id.
 

 

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments

Powered by Zendesk