Page 1 of 1

browse widget different behavior in Android

Posted: Fri Jun 08, 2018 3:55 pm
by terryho
Hi

I face a different behavior on android device on browse widget. Please try my attach zip file, Which use the stack to run in ios simulator, it will show a web page (for local file) and click some link, which the file has in the local folder, it will show the web page, but in Android device, it will not show other link.

I don't know whether it is a bug in Android or not. Please help me to confirm it.

Regards

Terry Ho

Re: browse widget different behavior in Android

Posted: Sat Jun 09, 2018 5:52 pm
by jacque
The iOS simulator reads files from the hard drive just as the Finder does. If you are using a hard coded or relative file path it will probably fail on a real iPhone too.

I didn't think browsers could access the local file system, but if they do, then on mobile you need to use specialFolderPath() instead of a specific URL. (I don't download files from here usually, it's easier if the post contains scripts I can read here. So I haven't examined the stack.)

Re: browse widget different behavior in Android

Posted: Tue Jun 12, 2018 5:42 pm
by terryho
Hi Jacque,

Yes, You are right. I'm oversight that It is different in real device and simulator.

Regards

Terry Ho

Re: browse widget different behavior in Android

Posted: Wed Jun 13, 2018 4:52 pm
by terryho
Hi

After further test, I think it is the bug in android device. Which I put the the following code in the browser widget,

On browsernavigatebegin purl
Answer purl
End browsernavigatebegin

Then the answer message will display in ios device and will not display in Android device, when click on the link.

I will file this bug.

Regards

Terry Ho

Re: browse widget different behavior in Android

Posted: Wed Jun 13, 2018 6:25 pm
by jacque
Does browserStartedLoading work?

EDIT: Never mind, I see you're using a widget. Try browserDocumentLoadBegin and see if that works.

Re: browse widget different behavior in Android

Posted: Thu Jun 14, 2018 3:05 pm
by terryho
Hi Jacque,

Confirm it is a bug.

https://quality.livecode.com/show_bug.cgi?id=21358

Thanks your help. Which point me to the right direction.

Regards

Terry Ho