Page 1 of 2

answer url does not work in Android liveCode

Posted: Wed Mar 16, 2022 12:43 pm
by liveCode
answer url does not work in Android liveCode
What can I do?

Re: answer url does not work in Android liveCode

Posted: Wed Mar 16, 2022 5:42 pm
by FourthWorld
What does "answer url" do on other platforms?

Re: answer url does not work in Android liveCode

Posted: Wed Mar 16, 2022 5:47 pm
by Klaus
Did you check "Internet" in the "Standalone Application Settings" for Android?

And since the automatism "Search for required inclusions when saving the standalone application"
does not work reliably, maybe you need to include the "Internet" library manually?

Re: answer url does not work in Android liveCode

Posted: Wed Mar 16, 2022 6:46 pm
by jacque
"answer url" doesn't make sense, what are you trying to do?

Re: answer url does not work in Android liveCode

Posted: Wed Mar 16, 2022 7:02 pm
by Klaus
Maybe he just forgot to add the actual url?

Re: answer url does not work in Android liveCode

Posted: Thu Mar 17, 2022 9:28 pm
by liveCode
This is the code I put:

Code: Select all

    answer url "https://tcrvo.ml/verisin.txt"
And this is the settings of Android in liveCode
And it still does not work

Note: If I run the command in liveCode it works but if I run the app and run on my phone it does not work

Re: answer url does not work in Android liveCode

Posted: Thu Mar 17, 2022 10:19 pm
by SparkOut
Can you show the "inclusions" tab of the standalone settings as well please?

Re: answer url does not work in Android liveCode

Posted: Fri Mar 18, 2022 8:12 am
by liveCode
To shoot more?

Re: answer url does not work in Android liveCode

Posted: Fri Mar 18, 2022 8:14 am
by liveCode
Is there anything I did not mark?

Re: answer url does not work in Android liveCode

Posted: Fri Mar 18, 2022 10:07 am
by AndyP
You probably need to include the HTTP Library as well :)

Re: answer url does not work in Android liveCode

Posted: Fri Mar 18, 2022 10:20 am
by liveCode
Thanks,
I will update you on Sunday whether it worked or not

Re: answer url does not work in Android liveCode

Posted: Fri Mar 18, 2022 10:49 am
by FourthWorld
HTTP is handled in the Internet library, which is checked. The httpd library is for running a localhost server for mobile testing.

I think what's missing us the SSL library, needed for HTTPS.

Re: answer url does not work in Android liveCode

Posted: Fri Mar 18, 2022 11:40 am
by liveCode
I added the SSL directory and it still does not work

Re: answer url does not work in Android liveCode

Posted: Fri Mar 18, 2022 12:59 pm
by stam
Standard inclusions aren't the issue i don't think.
I created a standalone for desktop with a single button:

Code: Select all

on mouseUp
    answer url "https://tcrvo.ml/verisin.txt"
end mouseUp
The only inclusions i ticked were 'Internet', in addition to the already ticked 'ask' and 'answer'.
This worked just fine - click the button launches a dialog with the text 1.0.0.

If this isn't working on mobile, it seems likely to be a mobile specific issue (i'm afraid i can't really help there though) - i'm guessing internet access has be allowed or some such, but i can see in your first screenshot that you've already ticked the 'Internet' tickbox. Not sure if anything else needs to be done...

Maybe someone else can try compiling for Android and see if its a general issue?
Hopefully some experienced Android dev can advise...

Re: answer url does not work in Android liveCode

Posted: Fri Mar 18, 2022 5:27 pm
by Klaus
Hi livecode,

lets try to narrow the problem, do this:

Code: Select all

on mouseUp
    put url("https://tcrvo.ml/verisin.txt") into tVar
    if the result <> EMPTY then
       answer "Problem:" & CR & the result
    else
       answer tVar
   end if
end mouseUp
Then tell us what the dialog shows you.


Best

Klaus