# How to check if the device is connected Webview

**URL:** <https://community.thunkable.com/t/how-to-check-if-the-device-is-connected-webview/1560468>\
**Category:** Questions about Thunkable X\
**Created:** [October 13, 2021, 8:01pm UTC](https://community.thunkable.com/t/how-to-check-if-the-device-is-connected-webview/1560468 "2021-10-13T20:01:36Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gustavo\_Lima](https://avatars.discourse-cdn.com/v4/letter/g/a3d4f5/32.png) [@Gustavo\_Lima](https://community.thunkable.com/u/Gustavo_Lima)\
**Post date:** [October 13, 2021, 8:01pm UTC](https://community.thunkable.com/t/how-to-check-if-the-device-is-connected-webview/1560468/1 "2021-10-13T20:01:36Z")

</div>

I have a webview and when the internet is disconnected it displays an error message on iOS. I would like it to migrate to a screen, and on this screen when connected it goes back to the previous screen automatically. Is it possible to do this?

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [October 14, 2021, 8:20am UTC](https://community.thunkable.com/t/how-to-check-if-the-device-is-connected-webview/1560468/2 "2021-10-14T08:20:59Z")

</div>

You can use this block  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/c/b/cba576f3ff80c57741a765d4a1063dc5688d0d7d.png)

In the device drawer to check that device running the app is connected to the internet.

You can use the same block with a `timer` to check every few seconds and decide what to do.

---

<div class="post-metadata">

**Author:** ![Gustavo\_Lima](https://avatars.discourse-cdn.com/v4/letter/g/a3d4f5/32.png) [@Gustavo\_Lima](https://community.thunkable.com/u/Gustavo_Lima)\
**Post date:** [October 14, 2021, 10:28pm UTC](https://community.thunkable.com/t/how-to-check-if-the-device-is-connected-webview/1560468/3 "2021-10-14T22:28:09Z")

</div>

I try This but not Working See my blocks.

 ![Capturar](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/4/6/460ee3514fbf2f225950915fcbf3389891d11800.png)  
 ![Capturar2](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/1/5/1569d5cf9b165d6046e246332593820ce9ca8ac2.png)

---

<div class="post-metadata">

**Author:** ![Gustavo\_Lima](https://avatars.discourse-cdn.com/v4/letter/g/a3d4f5/32.png) [@Gustavo\_Lima](https://community.thunkable.com/u/Gustavo_Lima)\
**Post date:** [October 14, 2021, 10:29pm UTC](https://community.thunkable.com/t/how-to-check-if-the-device-is-connected-webview/1560468/4 "2021-10-14T22:29:37Z")

</div>

I Change Screen 1 for False. But not Working Too.

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [October 15, 2021, 12:21am UTC](https://community.thunkable.com/t/how-to-check-if-the-device-is-connected-webview/1560468/5 "2021-10-15T00:21:52Z")

</div>

Try changing a label’s text value (“online” or “offline”) on each screen when the device is online. And also when the device is offline. Then test it and report back. If you can’t get it to work, post a link to your project and someone here can test it on their own device.

---

<div class="post-metadata">

**Author:** ![domhnallohanlon](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/domhnallohanlon/32/29554_2.png) [@domhnallohanlon](https://community.thunkable.com/u/domhnallohanlon)\
**Post date:** [October 15, 2021, 7:41am UTC](https://community.thunkable.com/t/how-to-check-if-the-device-is-connected-webview/1560468/6 "2021-10-15T07:41:02Z")

</div>

@Gustavo_Lima, also try using the “starts” event rather than the opens event.

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [October 15, 2021, 9:05am UTC](https://community.thunkable.com/t/how-to-check-if-the-device-is-connected-webview/1560468/7 "2021-10-15T09:05:27Z")

</div>

I tested it with this code and I can see it working

![image](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/5/05220be79b0edba08941d15101bc411916d5a591.png)

---

<div class="post-metadata">

**Author:** ![Gustavo\_Lima](https://avatars.discourse-cdn.com/v4/letter/g/a3d4f5/32.png) [@Gustavo\_Lima](https://community.thunkable.com/u/Gustavo_Lima)\
**Post date:** [October 15, 2021, 12:53pm UTC](https://community.thunkable.com/t/how-to-check-if-the-device-is-connected-webview/1560468/8 "2021-10-15T12:53:53Z")

</div>

Thanks for replys i try this now! @tatiang You asked me to post the project link, if you can take a look please, thank you very much.

[https://x.thunkable.com/copy/66eb161f26ae6738affb1270fe74c28d](https://x.thunkable.com/copy/66eb161f26ae6738affb1270fe74c28d)

---

<div class="post-metadata">

**Author:** ![tatiang](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/tatiang/32/55482_2.png) [@tatiang](https://community.thunkable.com/u/tatiang)\
**Post date:** [October 15, 2021, 3:51pm UTC](https://community.thunkable.com/t/how-to-check-if-the-device-is-connected-webview/1560468/9 "2021-10-15T15:51:04Z")

</div>

Yes but you haven’t made the changes that @muneer and @domhnallohanlon suggested so there’s not much point in testing it yet…

---

<div class="post-metadata">

**Author:** ![muneer](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/muneer/32/75210_2.png) [@muneer](https://community.thunkable.com/u/muneer)\
**Post date:** [October 15, 2021, 4:49pm UTC](https://community.thunkable.com/t/how-to-check-if-the-device-is-connected-webview/1560468/10 "2021-10-15T16:49:02Z")

</div>

I have tested the code I shared earlier on my phone and was switching the WIFI and mobile data on and off and see that the code gives the right message in the screen.

I only shared the code after having tested in myself.

---

<div class="post-metadata">

**Author:** ![ioannis](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/ioannis/32/146956_2.png) [@ioannis](https://community.thunkable.com/u/ioannis)\
**Post date:** [November 8, 2024, 1:14pm UTC](https://community.thunkable.com/t/how-to-check-if-the-device-is-connected-webview/1560468/11 "2024-11-08T13:14:47Z")

</div>


