Extract HTML data and pass in app

Hello Everyone,

I need your support to make an app. I can’t use custom List view or list viewers components as it’s limited access of data and some times app crashes due to a large number of lists/data.

So I decided to work with HTML so that I can generate lots of similar lists with different data.
But I got stuck at a point. If you will check the attached screenshot there is a contact button in the HTML code.


So I want to show the email id as an alert with the help of a notifier but I don’t know how it will be possible.

I request you all to give your opinion/suggestion on it. That will be very helpful for me. I’m sharing an aia file also to check the HTML code.webview.aia (6.7 KB)

1 Like

I think it will solve lots of problems which we face with an extra and large number of data. Please check if you can solve it or not. Thanks

This might help:

Dynamic Scrolling Image List in Webviewer

I saw your codes and blocks it’s a very complex process for me. and I need to use buttons as I’m planning to use 3 different types of custom list UI in my app.

I request you to check my simple code and help me if you have some free time.

The only way you interact with appinventor code using web_viewer or html is ```
window.AppInventor.setWebViewString or window.AppInventor.getWebViewString.

There is a lot in community on this topic.

Mohan

Hi Mohan,

Thanks for your reply. I have tried everything but it’s not working for me. I request I you have some time please share an aia file to show a value with WebViewString

Try this:

webview_rev1.aia (6.7 KB)

I converted your html to a file
Added a script to the bottom:

 //returns the id of the button, which should match the email address of the person
 function onClick(element) {
  window.AppInventor.setWebViewString(element.id);
}
</script>

inserted similar to each button:
id="[email protected]" onclick="onClick(this)"

This should show you how it works. This is not really suitable for large numbers of entries, hence you should look again at my example which pulls all the data from a list and dynamically builds your html.

1 Like

First of all thanks for your help.

I need to add a large number of entries and the app will generate it as per firebase data. Will again try to understand your example. Can you share your app aia for a reference?

Will it not work with html?

There is an aia shared on the demo page linked above (at the bottom)

I wasn’t working in Kodular so didn’t have the required html block.

If you want i will create extension

1 Like

Much appreciated sid creative :+1:

1 Like