Converting from WebBrowser to BrowserComponent

22 views
Skip to first unread message

mcw

unread,
Sep 13, 2018, 2:05:05 PM9/13/18
to CodenameOne Discussions
Haven't built my apps for some time and discovered a lot of deprecated classes and methods.

I am trying to switch from WebBrowser  to BrowserComponent.

What is the BrowserComponent equivalent of WebBrowser.createDataURI(_coverImage, "image/png");

Thanks,

Martin

Steve Hannah

unread,
Sep 13, 2018, 2:14:42 PM9/13/18
to codenameone...@googlegroups.com
I don't think there's an equivalent.  WebBrowser is simply a wrapper around BrowserComponent that will fall back to the old HTMLComponent on platforms that don't support a native web view.  But all of the platforms we target now, have a native webview so that class has become redundant for the most part - aside from the odd useful utility method like createDataURI.

We should probably make an equivalent in either BrowserComponent or another one of the CN1 utility classes.


--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/593a1131-e1b8-4439-9793-e7843efff7ed%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Steve Hannah
Software Developer
Codename One

mcw

unread,
Sep 13, 2018, 2:34:34 PM9/13/18
to CodenameOne Discussions
Thanks Steve.

Is it OK to use WebBrowser, it is not one of the classes being deleted in 5.0 right?

Steve Hannah

unread,
Sep 13, 2018, 3:03:40 PM9/13/18
to codenameone...@googlegroups.com
WebBrowser is not being deleted in 5.0.

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discussions+unsub...@googlegroups.com.
Visit this group at https://groups.google.com/group/codenameone-discussions.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages