# HTML Extension not Recieving POST messages from App in Android and Live Test

**URL:** <https://community.thunkable.com/t/html-extension-not-recieving-post-messages-from-app-in-android-and-live-test/2923561>\
**Category:** Questions about Thunkable X\
**Created:** [April 1, 2024, 2:07pm UTC](https://community.thunkable.com/t/html-extension-not-recieving-post-messages-from-app-in-android-and-live-test/2923561 "2024-04-01T14:07:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pacecode](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/pacecode/32/209017_2.png) [@pacecode](https://community.thunkable.com/u/pacecode)\
**Post date:** [April 1, 2024, 2:07pm UTC](https://community.thunkable.com/t/html-extension-not-recieving-post-messages-from-app-in-android-and-live-test/2923561/1 "2024-04-01T14:07:25Z")

</div>

Hi Community,

My HTML Extension is not Receiving Post Messages in Android, even though it is working in Web Preview.  
Tried asking ChatGPT but it did not helped  
Code:

```auto
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Whoocoder's image downloader</title>
</head>
<body>

<script 
      src="https://thunkable.github.io/webviewer-extension/thunkableWebviewerExtension.js"
      type="text/javascript"></script>
<script>
// Receive message from Thunkable app
ThunkableWebviewerExtension.receiveMessage(function(message) {
    console.log("Received message from Thunkable app:", message);
    // Define the downloadImage function
    function downloadImage(imageUrl) {
        fetch(imageUrl)
        .then(response => response.blob())
        .then(blob => {
             // Create a URL for the image blob
             var url = window.URL.createObjectURL(blob);
             // Create a link element
             var link = document.createElement("a");
             link.href = url;
             link.download = "IMAGE_DOWNLOADED_BY_A_THUNKABLE_APP"; // Name of the downloaded file
             // Append the link to the body and trigger a click event
             document.body.appendChild(link);
             link.click();
             // Clean up
             document.body.removeChild(link);
             window.URL.revokeObjectURL(url);
        })
        .catch(error => {
            console.error('Error fetching image:', error);
            alert("Failed to download image. Please check the URL and try again.");
        });
    }
    // Call downloadImage function with the received message (image URL)
    downloadImage(message);
});
</script>
   
</body>
</html>

```

Do I have to Update code to remove this issue?  
Please help me with this.

Thanks

---

<div class="post-metadata">

**Author:** ![pacecode](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/pacecode/32/209017_2.png) [@pacecode](https://community.thunkable.com/u/pacecode)\
**Post date:** [April 5, 2024, 3:13pm UTC](https://community.thunkable.com/t/html-extension-not-recieving-post-messages-from-app-in-android-and-live-test/2923561/2 "2024-04-05T15:13:16Z")

</div>

Could someone Please Reply?

---

<div class="post-metadata">

**Author:** ![matt\_conroy](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/matt_conroy/32/150843_2.png) [@matt\_conroy](https://community.thunkable.com/u/matt_conroy)\
**Post date:** [April 5, 2024, 4:44pm UTC](https://community.thunkable.com/t/html-extension-not-recieving-post-messages-from-app-in-android-and-live-test/2923561/3 "2024-04-05T16:44:08Z")

</div>

Hi @pacecode, as we’ve discussed elsewhere, writing these scripts is beyond our normal scope of support but hopefully someone else in the Community has experience writing scripts and can help out!

---

<div class="post-metadata">

**Author:** ![pacecode](https://sea1.discourse-cdn.com/flex015/user_avatar/community.thunkable.com/pacecode/32/209017_2.png) [@pacecode](https://community.thunkable.com/u/pacecode)\
**Post date:** [April 6, 2024, 12:51am UTC](https://community.thunkable.com/t/html-extension-not-recieving-post-messages-from-app-in-android-and-live-test/2923561/4 "2024-04-06T00:51:19Z")

</div>

Yes, that’s why posted the issue here.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/thunkable/original/3X/0/f/0f59f292712368bce16ff80133ae10de8a6f27e8.png) [@system](https://community.thunkable.com/u/system)\
**Post date:** [July 5, 2024, 12:51am UTC](https://community.thunkable.com/t/html-extension-not-recieving-post-messages-from-app-in-android-and-live-test/2923561/5 "2024-07-05T00:51:35Z")

</div>

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