Passing parameters in url path to webview

Hi Community,

I found a issue with webView when loading local html file with parameters on Android.

It perfectly loads webpage.
webView:request( “test.html”, system.ResourceDirectory )

When I tried to load it this way
webView:request( “test.html?someVeriable=value”, system.ResourceDirectory )

It say “webpage is not available” screenshot attached.

Is it a bug?

My Corona build is 2015.2646

Regards,
Usman Mughal

 

I suspect the problem is that to use ?key=value type syntax requires a web server to process those parameters and pass them to a script. When you load local HTML there is no server to handle it, it’s just reading a flat file and a file with that name doesn’t exist (“test.html?someVeriable=value”)

Thanks Rob for reply.

It’s a strange thing that It’s working fine in case of iOS and I have come to know that it is worked as expected for some Android too. Same like a web server it process the parameters and passes to the scripts of file.

Here is another question about the parameters. Can I get some other way to pass parameters to file in case of Android?

Regards,
Usman Mughal

iOS and Android are different, it’s not reasonable to expect OS level things to behave the same between the two.

Now if you say this worked in a previous version of Corona SDK on Android, then there might be a regression bug, but we would need to know the last version it worked in and a test case to show that it doesn’t work any longer.

Rob

I suspect the problem is that to use ?key=value type syntax requires a web server to process those parameters and pass them to a script. When you load local HTML there is no server to handle it, it’s just reading a flat file and a file with that name doesn’t exist (“test.html?someVeriable=value”)

Thanks Rob for reply.

It’s a strange thing that It’s working fine in case of iOS and I have come to know that it is worked as expected for some Android too. Same like a web server it process the parameters and passes to the scripts of file.

Here is another question about the parameters. Can I get some other way to pass parameters to file in case of Android?

Regards,
Usman Mughal

iOS and Android are different, it’s not reasonable to expect OS level things to behave the same between the two.

Now if you say this worked in a previous version of Corona SDK on Android, then there might be a regression bug, but we would need to know the last version it worked in and a test case to show that it doesn’t work any longer.

Rob