FlowR 1.2.2
Add deep link support:
First, setup the deep link as explained in the documentation.
Then annote your fragment with a @DeepLink
annotation. That value will be the relative path...
@DeepLink("/path1/")
public class TestFragment extends Fragment implement FlowrFragment
... or two.
@DeepLink({"/path1/","path2"})
public class TestFragment extends Fragment implement FlowrFragment
You can also insert variable:
@DeepLink("/{id}/details")
public class TestFragment extends Fragment implement FlowrFragment
.
.
.
String url = getArguments().getString(Flowr.DEEP_LINK_URL,"");
String id = getArguments().getString("id","");
To trigger the deep linking handling, simply call open(Intent, Fragment))
getFlowr()
.open(getIntent(), HomeFragment.class)
.skipBackStack(true)
.displayFragment();
Additionally you can access a Fragment via the link attached to it:
getFlowr()
.open("/path1/")
.skipBackStack(true)
.displayFragment();
variables work too:
getFlowr()
.open("/1234/details")
.skipBackStack(true)
.displayFragment();
But don't forget to add those lines to your proguard config:
-keep public class * implements com.fueled.flowr.internal.FlowrConfig
-keep public class * implements com.fueled.flowr.internal.FlowrDeepLinkHandler