You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To trigger the deep linking handling, simply call `open(Intent, Fragment))`
238
+
239
+
### Deep Linking Setup:
240
+
241
+
To generate your deep link handler you will need to annotate at least one class with the `@DeepLinkHandler` annotation. The name of the class annotated with the `@DeepLinkHandler` annotation would then be used as the name of the generated handler class with "Impl" appended at the end.
239
242
240
243
```java
241
-
getFlowr()
242
-
.open(getIntent(), HomeFragment.class)
243
-
.skipBackStack(true)
244
-
.displayFragment();
244
+
/** This will generate a MainDeepLinkHandlerImpl class */
245
+
@DeepLinkHandler
246
+
public class MainDeepLinkHandler {
247
+
}
248
+
```
249
+
250
+
However it is also possible to specify a custom name for the generated class by passing the desired class name as a string argument to the `@DeepLinkHandler` annotation.
251
+
252
+
```java
253
+
/** This will generate a MyDeepLinkHandler class */
254
+
@DeepLinkHandler("MyDeepLinkHandler")
255
+
public class MainActivity extends AbstractActivity {
256
+
}
257
+
```
258
+
259
+
If you have fragments across multiple modules, you will need to add the `@DeepLinkHandler` annotation to at least one class in each module.
260
+
261
+
```java
262
+
/** This will generate a LibraryDeepLinkHandlerImpl class */
263
+
@DeepLinkHandler
264
+
public class LibraryDeepLinkHandler {
265
+
}
266
+
```
267
+
268
+
Provide the list of generated deep link handlers to your flowr instance.
269
+
270
+
```java
271
+
public class MainActivity extends AbstractActivity {
272
+
273
+
private Flowr flowr;
274
+
275
+
public void getFlowr() {
276
+
if (flowr == null) {
277
+
flowr = new Flowr(...);
278
+
flowr.setDeepLinkHandlers(new MainDeepLinkHandlerImpl(), new LibraryDeepLinkHandlerImpl());
279
+
}
280
+
281
+
return flowr;
282
+
}
283
+
}
284
+
```
285
+
286
+
Finally to trigger the deep linking handling, simply call `open(Intent, Fragment))` from your `Activity#onCreate(Bundle)` method.
287
+
288
+
```java
289
+
public class MainActivity extends AbstractActivity {
0 commit comments