DeepLink Support App

Hello Coder I need a Deeplink support function can anyone give me any tips or extension!!

Thanks for advanced

Can use CustomWebview support deeplink or maybe try the extension of deep.

There is no extension available for deep link with my specific URL. If the webview method work to run deeplink activity can you please share the block

Just Change Your Hostname and rebuild this code using Rush or AI2 Extension Template

package com.AB.DeepLink;

import android.app.Activity;

import android.content.Intent;

import android.net.Uri;

import android.os.Bundle;

import com.google.appinventor.components.annotations.DesignerComponent;

import com.google.appinventor.components.annotations.SimpleObject;

import com.google.appinventor.components.annotations.UsesActivities;

import com.google.appinventor.components.annotations.androidmanifest.ActionElement;

import com.google.appinventor.components.annotations.androidmanifest.ActivityElement;

import com.google.appinventor.components.annotations.androidmanifest.CategoryElement;

import com.google.appinventor.components.annotations.androidmanifest.DataElement;

import com.google.appinventor.components.annotations.androidmanifest.IntentFilterElement;

import com.google.appinventor.components.common.ComponentCategory;

import com.google.appinventor.components.runtime.AndroidNonvisibleComponent;

import com.google.appinventor.components.runtime.ComponentContainer;

@DesignerComponent(category = ComponentCategory.EXTENSION, description = "Adds deep link support", iconName = "images/extenions", nonVisible = true, version = 1)

@SimpleObject(external = true)

@UsesActivities(activities = {@ActivityElement(exported = "true", intentFilters = {@IntentFilterElement(actionElements = {@ActionElement(name = "android.intent.action.VIEW")}, categoryElements = {@CategoryElement(name = "android.intent.category.DEFAULT"), @CategoryElement(name = "android.intent.category.BROWSABLE")}, dataElements = {@DataElement(host = "Your_Hostname", scheme = "https")})}, name = "com.AB.DeepLink.DeepLink$DeepLinkActivity")})

public final class DeepLink extends AndroidNonvisibleComponent {

    public static class DeepLinkActivity extends Activity {

        public void onCreate(Bundle bundle) {

            super.onCreate(bundle);

            Uri data = getIntent().getData();

            if (data != null && data.toString() != null) {

                Intent launchIntentForPackage = getPackageManager().getLaunchIntentForPackage(getPackageName());

                launchIntentForPackage.putExtra("APP_INVENTOR_START", '\"' + data.toString() + '\"');

                startActivity(launchIntentForPackage);

                finish();

            }

        }

    }

    public DeepLink(ComponentContainer componentContainer) {

        super(componentContainer.$form());

    }

}
3 Likes

I want to convey my utmost gratitude for your invaluable assistance. Your help was crucial in overcoming the challenges I faced, and I cannot thank you enough for your unwavering support.

I deeply appreciate your expertise and guidance, which played a significant role in resolving the issues I was dealing with. Your generous assistance has had a profound impact on my life, and I am grateful for the time and effort you have invested in helping me.

Thank you once again for your kind support and assistance. I am truly indebted to you and hope to reciprocate your kindness in the future.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.