Executing HTML code inside Droidscript

270 views
Skip to first unread message

Nii Darku

unread,
Jun 6, 2020, 4:32:44 AM6/6/20
to DroidScript
Hi, I want to execute a piece of HTML function inside DS.

The function creates an html canvas element and runs it through some processes.

I need this to be able to do some canvas manipulation inside a native droidscript app.

Since DS does not allow the creation of canvas I needed a way to trick it to allow HTML to do that job while operating within DS.

I also think this is not the job for webview.

Is this possible guys?
And if so what is the approach please?

Kallikratidas

unread,
Jun 6, 2020, 3:38:35 PM6/6/20
to DroidScript
DroidScript uses android objects. The only way to achieve that is by using a WebView or creating an "HTML" project. But can you please explain your problem?
I have create a plugin for creating CircleImages and I used canvas inside a native project. But I didn't display it somewhere. You can use the canvas object and any HTML object you want, but without being able to show it on the screen. If you want to make a function for example for converting images to base64, you can use the canvas HTML object in your main app code but without adding it in any layout. But if you want to create a game or something like this, you will definitely need to use a WebView or create an HTML project.

Regards!

Nii Darku

unread,
Jun 6, 2020, 5:27:52 PM6/6/20
to DroidScript
Precisely Kalli.

I experimented further and realized that I can create an html canvas in DS.

Thanks.

Dave

unread,
Jun 7, 2020, 6:40:57 AM6/7/20
to DroidScript
DroidScript apps run inside a hidden webview, so you could probably create a hidden HTML canvas but you won't be able to display it unless you create an HTML app

Nii Darku

unread,
Jun 7, 2020, 7:04:12 AM6/7/20
to DroidScript
You know something interesting, I figured out so. I realized that once I could create the html tags dynamically then DS would be running on some kind of HTML platform itself.

I must give it to you guys, I marvel at how you are able to put together java, android, HTML, CSS, scripting, etc.. to form this droidscript tool that enables app developement on the go.

DS could be a hit.
By the way before meeting DS, I met Framework7. Its a tool that seeks to achieve similar goals as DS.

I think you can look at it for some ideas.

Thank you Dave and Great job guys.


Reply all
Reply to author
Forward
0 new messages