Help! detect link and change screen

Hello, I need a simple help, My app has WebView and I want to go browsing just when I get a default link there will be another screen.

Example I am on the screen1 browsing in the following url “https //: example.com” and when I am in this url “https //: example.com/desktop” I want you to change to screen 2 … It is somewhat complex but I do not know how to do it, I would appreciate any help.

if   get WebViewer1.Current Url  =  "https://example.com/desktop"
 then   open another  "Screen2"

You can use a Clock Component to trigger it.
I think the When WebViewer1.Refreshed Block is working too but I don’t test it now…

1 Like

Podrias enviarme una imagen de los bloques te lo agradeceria mucho

The only word I can say in Spanish is “Hola” :joy:
Unfortunately I can not understand you, sorry :sweat_smile:

2 Likes

You could send me an image of the blocks I would appreciate it very much​:v:

I’m not on my computer, Sorry for that…

But what do you think about to search and look a little bit?

You need:

  • if block
  • equal block (= block)
  • When WebViewer1.Refreshed Event or maybe a When Clock1.Timer Event
  • open another Screen block
  • and two Text blocks (one for the default URL and the other one for the second Screen Name)

Look to the blocks I’m sure you will find them :wink:

1 Like

Tank You…

I created a small example how can it looks like:

Screen2 will be opened if you open Makeroid Community. You can use the icon or you can Google for it.

WebViewerUrlTrigger.aia (3,8 KB)
WebViewerUrlTrigger.apk (4,1 MB)

IT’S ONLY AN EXAMPLE SO YOU CAN DO IT ALSO WITH OTHER BLOCKS AND PROCEDURES!
The important point is that you must use the last Event (last block group) on the bottom of the Screenshot.

Don’t forget to mark the solution answer as solution, so we can help another people with the same problem too :wink:

EDIT: I updated the AIA and APK because the “Screen1.Title Bar Icon” is not supported anymore…

2 Likes

@Ka_Fa

Thank you for your great work. This user is posting the same question on all three forums. On the Thunkable forum just an hour ago even after you gave your answer. I think it is very disrespectfull if a user can not wait for an answer and posts everywhere. You are spending your time to help someone. I send him a message when he did it on the AB forum but he clearly doesn’t care because now he posted it on the Thunkable forum.

You shouldn’t spend to much time on him when he posts his next question.

4 Likes

Thank you @Peter.
But I hope that I can help other people as well.

1 Like

Well, I did not know it was a problem to do that but I really needed help … Well if you do not like that I do not do it again, I have been trying to design my app on other platforms and the truth is that I like makeroid Thank you!!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.