createInstance

public static AnalysisFragmentCompat createInstance(@NonNull() Document document, @Nullable() String documentAnalysisErrorMessage)

Factory method for creating a new instance of the Fragment using the provided document.

You may pass in an optional analysis error message. This error message is shown to the user with a retry button.

Note: Always use this method to create new instances. Document is required and an exception is thrown if it's missing.

Return

a new instance of the Fragment

Parameters

document

must be the Document from (Document)

documentAnalysisErrorMessage

an optional error message shown to the user