Added IntentHandler
to start or handle Intents (#13)
public interface IntentHandler {
/**
* Called immediately after intent has created on {@link Floo#start()}.
*
* @param context The context.
* @param intent The intent.
*/
void onIntentCreated(@NonNull Context context, @NonNull Intent intent);
}
Floo.configuration()
.setDebugEnabled(BuildConfig.DEBUG)
.setIntentHandler(new FragmentIntentHandler()) // <- DefaultIntentHandler by default
.addRequestInterceptor(new LogInterceptor("Request"))
.addTargetInterceptor(new LogInterceptor("Target"))
.addTargetNotFoundHandler(new WebHandler())
.addTargetNotFoundHandler(new OpenDirectlyHandler())
.addTargetNotFoundHandler(new TargetNotFoundToaster());