I am using a single activity structure in my project, and I want to handle deep (app) linking using the navigation component. All thing is good, but I can't handle array query params. I want to get complex_types as an array of String.
Existing URL:
my.example.com/?guests=1&complex_types=hotel&complex_types=motel
nav_graph.xml:
<fragment
android:id="@+id/complexFragment"
android:name="com.the.example.packagename.ComplexFragment"
android:label="ComplexFragment">
<argument
android:name="guests"
android:defaultValue="1"
app:argType="integer" />
<argument
android:name="complexFilters"
app:argType="???" />
<deepLink
android:id="@+id/deepLink_complex_fragment"
app:uri="my.example.com/?guests={guests}&complex_types={complexFilters}" />
</fragment>
I don't know what type of argType must be used instead of ??? in complexFilters argument.
In the android editor there is a checkbox for array or you
and in the xml navigation graph will be like this
<argument
android:name="images"
android:defaultValue="@null"
app:argType="string[]"
app:nullable="true" />