I had another problem. when I run an application like facebook, google etc. with BrowserComponent of my application, it works well in my simulator but when I deploy the APK that I downloaded from my CodeName one account on the device nothing is displayed.
On Thursday, May 3, 2018 at 4:04:38 PM UTC+1, [email protected] wrote: > > Hello > it's been a week that I'm working on a live streaming solution using > BrowserComponent's codeName one. > In fact I want to display the flow of a webcam by typing in a browser the URL > of my webcam. > On a classic browser like firefox, or jxbrowser everything works normally, I > can see the image of my camera. > But when I use the BrowserComponent component of CodeName one live streaming > is not displayed. > > Here is the piece of code that allows me to display a web page with > browserComponent: > > @SuppressWarnings("deprecation") > public void start() { > if(current != null){ > current.show(); > return; > } > //TableLayout tl = new TableLayout(3, 2); > > try { > > BrowserComponent browser = new BrowserComponent(); > //browser.setURL("https://www.codenameone.com/"); > //browser.setURL("https://orionassur.com/"); > //browser.setURL("https://www.youtube.com"); > > TableLayout tl; > int spanButton = 2; > if(Display.getInstance().isTablet()) { > tl = new TableLayout(7, 2); > } else { > tl = new TableLayout(14, 1); > spanButton = 1; > } > // tl.setGrowHorizontally(true); > // Form hi = new Form("VSC-gBrowser",new > BoxLayout(BoxLayout.Y_AXIS)); > Form hi = new Form("VSC-Browser", new > BorderLayout(BorderLayout.CENTER_BEHAVIOR_CENTER_ABSOLUTE)); > // Form hi = new Form("VSC-Browser", new FlowLayout()); > // Form hi = new Form("VSC-Browser", new GridLayout(2, 2)); > hi.setLayout(tl); > TextField url = new TextField("", "URL", 10, TextArea.URL); > > > Button submit = new Button("Submit"); > TableLayout.Constraint cn = tl.createConstraint(); > cn.setHorizontalSpan(spanButton); > cn.setHorizontalAlign(Component.RIGHT); > hi.add(url). > add(cn, submit); > > submit.addActionListener(new ActionListener(){ > public void actionPerformed(ActionEvent ae){ > String urlValue = url.getText(); > browser.setURL(urlValue); > // browser.execute("window.socket = > io('"+urlValue+"')"); > > // Display.getInstance().execute(urlValue); > > > > // .... do some operation on value ... > } > }); > > > hi.add(BorderLayout.CENTER, browser); > hi.show(); > > } catch (Exception e) { > > System.out.println("Division par zéro !"); > > } > > } > > once I start the execution here is what is displayed instead of the image of > my webcam: > > > Is there possible to do liveStreaming with CodeName one by using > BrowserComponent ? If yes I want to know how , if not is there any other > solution to do it with codeName one ? > > Thanks > > -- 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 [email protected]. 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/fe4c64f1-5cdf-4972-8ec9-9ab3a34f4642%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
