Skip to content

Migration to androidX #302

@ikermart

Description

@ikermart

Previous situation, all the deeplinks working
Deeplink Version: 3.1.1
My project using Android Support : v7

After upgrading my entire project to androidX sometimes crashed, see below:
Deeplink Version: 5.2.0
My project now using androidX

Started to throw this crashes:

Exception: java.lang.IllegalArgumentException
android.os.Parcel.nativeAppendFrom (Parcel.java)
android.content.Intent.getExtras (Intent.java:5387)
com.airbnb.deeplinkdispatch.BaseDeepLinkDelegate.createResult (BaseDeepLinkDelegate.java:170)
com.airbnb.deeplinkdispatch.BaseDeepLinkDelegate.dispatchFrom (BaseDeepLinkDelegate.java:121)
com.airbnb.deeplinkdispatch.BaseDeepLinkDelegate.dispatchFrom (BaseDeepLinkDelegate.java:102)

@DeepLinkHandler(AppDeepLinkModule.class)
public class HandlerDeepLinkActivity extends Activity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        try{
            DeepLinkDelegate deepLinkDelegate = new DeepLinkDelegate(new AppDeepLinkModuleRegistry());
            deepLinkDelegate.dispatchFrom(this);
            finish();
        }catch (Exception e){
            FirebaseCrashlytics.getInstance().recordException(e);
            sendFailedAnswer();
        }

    }

**AndroidManifest.xml**
``
<activity  android:name=".deeplink.HandlerDeepLinkActivity"
            android:launchMode="singleInstance"
            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:host="paymnt"
                    android:scheme="txtxtx" />
            </intent-filter>
        </activity>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions