miqbaldc
11/18/2021, 8:43 AM<deeplink scheme>://jobs?category_id=asdf&employment_type=FULLTIME
into a query parameter (what I can think of atm was map):
mapOf(
"category_id" to "asdf",
"employment_type" to "FULLTIME"
)
my code attempts in 🧵miqbaldc
11/18/2021, 8:43 AMval queries = "<deeplink scheme>://jobs?category_id=asdf&employment_type=FULLTIME"
.substringAfter("?")
// categorize it into list
.split("&")
.associate {
// "category_id" to "asdf"
it.substringBefore("=") to it.substringAfter("=")
}
sbyrne
11/18/2021, 11:35 AMmiqbaldc
11/19/2021, 5:16 AMandroid.net.Uri
has Uri.getQueryParameter("key")
that more convenient in our case, instead of trying to manually parsing this
It also has Uri.getEncodedQuery