Firebase dynamic links

To start using Firebase dynamic links you need to:

  1. Include the Firebase dynamic links module to your build.gradle.
    implementation ("com.poqstudio:content.firebasedynamiclinks:$VERSION_NAME")
  2. Add SHA-256 certificate fingerprint to you Firebase project.
  3. Add your google-services.json obtained from the Firebase console to the src folder.
  4. Add the following intent filter to the SplashActivity to your manifest which will merge with the existing platform manifest.
    <activity
    android:name="com.poqstudio.app.platform.presentation.splash.view.SplashActivity"
    android:label="@string/app_name"
    android:screenOrientation="portrait"
    android:theme="@style/SplashTheme">
    <intent-filter android:autoVerify="true">
    <action android:name="android.intent.action.VIEW" />
    <category android:name="android.intent.category.DEFAULT" />
    <category android:name="android.intent.category.BROWSABLE" />
    <data
    android:host="@string/firebase_dynamic_links_host"
    android:scheme="@string/firebase_dynamic_links_scheme"/>
    </intent-filter>
    </activity>
  5. Load the Koin module firebaseDynamicLinksModule as one of your extra modules.
  6. Override the XML String resources:
    • firebase_dynamic_links_host (String): to set the link host, i.e. poqdemo.page.link
    • firebase_dynamic_links_scheme (String): to set the link scheme, i.e. https
    • firebase_dynamic_links_ios_bundle_id (String): to set up iOS bundle id.
    • firebase_dynamic_links_ios_app_store_id (String): to set up ios app store id
    • firebase_dynamic_links_fallback_to_app_store (bool): true by default, if a mobile user does not have the app installed will be redirected to the app store. If it is set to false the user will be redirected to the browser.

Platform module is configured to use FirebaseDeepLinkProvider to resolve the Firebase dynamic link. Then, it will transform the link String with LinksViewModel to a DeepLink and navigate to the correct screen using LinksNavigator.

Product detail SDK will also generate a Firebase dynamic link using FirebaseShareLinkProvider.