airbnb / DeepLinkDispatch

A simple, annotation-based library for making deep link handling better on Android
http://nerds.airbnb.com/deeplinkdispatch/
4.38k stars 407 forks source link

Using intent provider instead of reflection to generate intent #206

Open bangarharshit opened 6 years ago

bangarharshit commented 6 years ago

Reflection is currently used to generate the intent in DeepLinkDelegate.

    new DeepLinkEntry("http://example.com/deepLink/{id}/{name}/{place}", DeepLinkEntry.Type.METHOD, MainActivity.class, "intentForTaskStackBuilderMethods"),

Why not use a cache of IntentProvider?

    public interface IntentProvider {
        Intent get(Context context);
    }

DeepLinkEntry can then use provider instead of the method name.