codenameone

html video control is not working in codenameone app for android

有些话、适合烂在心里 提交于 2019-12-06 16:06:52
I've a codenameone app that calls a secure website developed in html5. It uses html video control to take a snapshot. The site works in chrome perfectly. But when I call it from codenameone app, installed on Android device, the video control does not appear on the page. The required camera permissions are set in the App. The log is as below: LOGS....--------- beginning of main 09-07 15:43:39.586 23032 23085 I Adreno : QUALCOMM build : 84c9b58, I4fcced3c6d 09-07 15:43:39.586 23032 23085 I Adreno : Build Date : 01/17/18 09-07 15:43:39.586 23032 23085 I Adreno : OpenGL ES Shader Compiler Version:

Codenameone Capture Photo Upside down

ぃ、小莉子 提交于 2019-12-06 16:06:08
using the Capture class to take photos using the front facing camera (Selfie Camera) on android, the photo comes out upside down. Is there any way we can detect that the front facing camera was used so we can rotate the image if needed? Some cameras capture the image in the orientation of the camera sensor then mark it with a special rotation flag in EXIF to indicate that the image should be viewed in a different orientation. This is common in the back camera that always captures in landscape and marks portrait images as rotated. When you open an image using Image.createImage(filePathToImage)

Notification icon is white on the notification tray

删除回忆录丶 提交于 2019-12-06 16:00:33
My app icon on the notification tray became white on android 5. I have seen this Notification bar icon turns white in Android 5 Lollipop , but how can I change it on my codenameone app. It is possible to place a 24x24 icon named "ic_stat_notify.png" under the src/ folder of the app. The icon can be white with transparency areas. The build server picks up this image and uses it as the notification icon if found on the project. 来源: https://stackoverflow.com/questions/34995371/notification-icon-is-white-on-the-notification-tray

Codename One - ToastBar when “No connectivity detected”

那年仲夏 提交于 2019-12-06 15:55:36
What is a correct approach to deal with Internet connection unavailability (that is common on mobile devices)? Maybe it's a big question (or maybe not), however I didn't find any Codename One tutorial / article / video or API to deal with an unstable Internet connection (that is the normality on mobile) without errors or unexpected behaviors. I've found an app (Protonmail) that has a functionality that I would like to replicate in my apps. Please look at the following two screenshot: the first one is taken when the Internet connection is available, the second one when it's not available. I

Codename One - container.setScrollVisible(true) in the center of a BorderLayout

♀尐吖头ヾ 提交于 2019-12-06 15:43:31
I tried to use: container.setScrollableY(true); container.setScrollVisible(true); The container is placed in the the center of a BorderLayout. The container results scrollable, but the scroll bar is not visible (neither during the scrolling nor in other moments). Why? A scrollbar will only appear if you have enough content within the container and fades out when you don't scroll. Make sure to add enough elements to the container to see it and then try scrolling. 来源: https://stackoverflow.com/questions/50079153/codename-one-container-setscrollvisibletrue-in-the-center-of-a-borderlayout

Can't build anymore : OutOfMemoryError Java Heap Space

假如想象 提交于 2019-12-06 15:37:33
I can't build any app anymore : Your build size is: 23552kb Sending build request to the server, notice that the build might take a while to complete! Sending build to account: xxxxxx@gmail.com C:\workspace\nutriplanning\build.xml:101: java.lang.OutOfMemoryError: Java heap space In pricing it said 50mb build jar size Two minutes before I send an other built for iOS (bigger) and it works. Now I can't build neither iOS or Android. I already tried to increase memory settings on Ant with no results. What should I do ? Thank you for your help ! I have a handy guide for this: From here . 来源: https:/

Codename One - Transition from FormA to FormB to FormC

六月ゝ 毕业季﹏ 提交于 2019-12-06 15:35:22
The following code works as expected on the Codename One simulator, that is: show first Form (startForm) fade to the second Form (emptyForm) for two seconds fade to the third Form for one second (loginForm) So the transition duration should be three seconds in total. But on real devices the third Form is shown almost immediately. What's wrong in my code? // Transition from startForm to loginForm startForm.show(); startForm.setTransitionOutAnimator(CommonTransitions.createFade(2000)); emptyForm.show(); emptyForm.setTransitionOutAnimator(CommonTransitions.createFade(1000)); UITimer.timer(2000,

Resources and Codename One

不羁岁月 提交于 2019-12-06 15:20:46
I am using Codename One and I want to insert a lot of html pages in my app and then load them in a WebView. I want to insert html files in resources. How can I insert files in resources, maybe by using GUI builder data? What is the code to load the html files in WebView? tizbn There are several ways to do this. If you can package every individual file into a single file you can use something like this: put the test.html in default package create WebBrowser webBrowser = new WebBrowser(); and add to your form webBrowser.setUrl("jar:///test.html") If you need a complex HTML/CSS/JavaScript

Unicode File IO in Codename One

六月ゝ 毕业季﹏ 提交于 2019-12-06 15:08:29
I want to read an Unicode file (UTF-8) and write it back to another file. Code I used for reading is, (As in Textscreen in Codename One, how to read text file? ) final String textFile = "/readme.txt"; String text = ""; InputStream in = Display.getInstance().getResourceAsStream(null, textFile); if (in != null){ try { text = com.codename1.io.Util.readToString(in); in.close(); } catch (IOException ex) { System.out.println(ex); text = "Read Error"; } } I even tried text = com.codename1.io.Util.readToString(in,"UTF-8"); and DataInputStream dis = new DataInputStream(in); text = com.codename1.io.Util

Crash on iOS with Picker

隐身守侯 提交于 2019-12-06 14:54:05
I have a problem with my application on iOS only (iPad 9.7" 11.3.1) when I launch a new Form with a Picker in it (created with GUI Builder). Thanks to a Mac I was able to see some logs : java.lang.NullPointerException at com_codename1_impl_ios_IOSImplementation.instanceofObjArray:7464 at com_codename1_io_Util.instanceofObjArray:470 at com_codename1_ui_spinner_Picker.setType:781 at fr_aaa_bbb_Saisie.initGuiBuilderComponents:462 at fr_aaa_bbb_Saisie._INIT__:71 at fr_aaa_bbb_Saisie._INIT__:67 at fr_aaa_bbb_Photo.onContinueActionEvent:419 ... Code at line 462 : gui_Picker.setType(4); Can't see why