Search Results for

    Show / Hide Table of Contents

    Custom URL Scheme

    Introduction

    Custom URL schemes provide a way to reference content inside your app. Users can open a custom URL in the browser or tap on a link. Other apps can also launch your app with specific context data; for example, a photo library app might display a specified image.

    Configuration

    Android

    This assumes you have already generated the android folder. If not, see the setup link here.

    • Step 1: Open the AndroidManifest.xml file, in the android/app/src/main folder.

    • Step 2: Add an intent filter for incoming links. Inside the activity tag, add the following lines of code:

      <intent-filter>
          <action android:name="android.intent.action.VIEW"/>
          <category android:name="android.intent.category.DEFAULT"/>
          <category android:name="android.intent.category.BROWSABLE"/>
          <!-- Accepts URIs that begin with "com.casewhere.mobile://” -->
          <data android:scheme="com.casewhere.mobile"/>
      </intent-filter>
      

    IOS

    This assumes you have already generated the ios folder. If not, see the link in ionic or capacitor for setting up and running.

    • Step 1: Open the project in Xcode, then select it.
    • Step 2: Select the Info tab.
    • Step 3: Go to the URL Types and click on ‘+’.
    • Step 4: Enter com.casewhere.mobile in Identifier and URL Schemes.
    custome-url-scheme-ios

    Reference

    • Capacitor IOS Documentation
    • Android Deep Links
    • IOS Custom URL Scheme
    In This Article
    Back to top Generated by DocFX