-1

This is my URL which i get after scanning a bar code :-

 https://www.dubrovniksecrets.com/use.php?101720131|02|03|2018.04.30|blah

How can i retrieve the values from the URL? Since there is no key i cannot use getQueryParameterName() to extract the value.

Saathwik
  • 199
  • 1
  • 2
  • 11

1 Answers1

1

You will have to manually parse it. first cut off the first part, before ?:

String url = "https://www.dubrovniksecrets.com/use.php?101720131|02|03|2018.04.30|b";
String paramsString = url.split("?")[1];

Then you can split the params:

String[] params = paramsString.split("|");

Now you have an array or the values.

Vladyslav Matviienko
  • 10,610
  • 4
  • 33
  • 52