codenameone

Codenameone: How to stop XFClient findAndWait request when network exception occurs so the calling thread can progress?

孤街浪徒 提交于 2021-02-08 09:34:45
问题 My CN1 app uses XFClient to communicate with mySQL database on a server running Xataface. The timer thread calls XFClient's findAndWait method and then sleeps 1 second before repeating. It works well 99+% of the time but sometimes the app encounters a network problem (Bad Gateway, ConnectionExceptions, SocketTimeOutException, etc.) and stops communicating with the server because findAndWait keeps waiting in spite of the exception. Is there a way for findAndWait to stop waiting when an

cn1 - Attempt to invoke virtual method 'boolean java.util.ArrayList.add(java.lang.Object)' on a null object reference

最后都变了- 提交于 2021-02-08 09:16:16
问题 I've a error thrown I can't figure out how it happens. It doesn't occur all the time but once in a while. The error message thrown is "Java.lang.nullPointerException: Attempt to invoke virtual method 'boolean java.util.ArrayList.add(java.lang.Object)' on a null object reference". I've used connectionRequest for parsing the json data. When the error is thrown I've checked if there's problem in url but it gives the proper json data as always. After trying few times, the error is solved

cn1 - Attempt to invoke virtual method 'boolean java.util.ArrayList.add(java.lang.Object)' on a null object reference

岁酱吖の 提交于 2021-02-08 09:16:16
问题 I've a error thrown I can't figure out how it happens. It doesn't occur all the time but once in a while. The error message thrown is "Java.lang.nullPointerException: Attempt to invoke virtual method 'boolean java.util.ArrayList.add(java.lang.Object)' on a null object reference". I've used connectionRequest for parsing the json data. When the error is thrown I've checked if there's problem in url but it gives the proper json data as always. After trying few times, the error is solved

cn1 - Attempt to invoke virtual method 'boolean java.util.ArrayList.add(java.lang.Object)' on a null object reference

瘦欲@ 提交于 2021-02-08 09:16:07
问题 I've a error thrown I can't figure out how it happens. It doesn't occur all the time but once in a while. The error message thrown is "Java.lang.nullPointerException: Attempt to invoke virtual method 'boolean java.util.ArrayList.add(java.lang.Object)' on a null object reference". I've used connectionRequest for parsing the json data. When the error is thrown I've checked if there's problem in url but it gives the proper json data as always. After trying few times, the error is solved

How can I reposition the Floating Button in Codenameone?

无人久伴 提交于 2021-02-08 09:03:43
问题 The FloatingButton seems to be added only in Form.getContentPane() and cannot be added to a container Adding it to my form would make the button shield some components underneaths, Any solution to this? I would like to have positioned inside the scrolling table in a BorderLayout.CENTER not much options here: fab.bindFabToContainer(current, Component.RIGHT, Component.CENTER); 回答1: fab.bindFabToContainer(current, Component.RIGHT, Component.CENTER); Doesn't add the fab to a container. It creates

how can color of status bar be changed as per different forms in codenameone?

心已入冬 提交于 2021-02-08 08:46:23
问题 I have gone via the beow link and it works well . change color But there is static status color and I want to change of status bar as per the different form. I want to use transparent background image as per the attached image , how can it done? [EDIT] I have added the android.style in hint build as shown in attached image but there is no changed in status bar, is I using it correctly or not please verify it. 回答1: Right now transparent status bar is only supported on iOS. We don't support

AntMedia Native Interface issues

泄露秘密 提交于 2021-02-08 08:44:18
问题 I would like to implement this AntMedia iOS and Android native interface for Codename One: import com.codename1.system.NativeInterface; import com.codename1.ui.PeerComponent; /** * @deprecated Native Interface, deprecated because you normally should use the * public API in the AntMediaClient class. */ public interface AntMediaNative extends NativeInterface { /** * Initializes the connection. * * @param serverURL is WebSocket url to connect (wss://...) * @param streamId is the stream id in the

Codename One app not provide real location

∥☆過路亽.° 提交于 2021-02-08 08:42:37
问题 in out app we have a module where you can send time records with GPS location. In 40% of cases we have location problem because the module provides a location which is not real (sometime about 1 km away). When we have this cases we open Google Maps app and it give us perfect location, then again out app and not-real location. For getting the location we use this: Slider s1 = new Slider(); Dialog dlg = makeDialog("HIGH PRECISION LOCATION...", s1, null, 'a'); dlg.addShowListener((ActionListener

Codename One app not provide real location

好久不见. 提交于 2021-02-08 08:41:00
问题 in out app we have a module where you can send time records with GPS location. In 40% of cases we have location problem because the module provides a location which is not real (sometime about 1 km away). When we have this cases we open Google Maps app and it give us perfect location, then again out app and not-real location. For getting the location we use this: Slider s1 = new Slider(); Dialog dlg = makeDialog("HIGH PRECISION LOCATION...", s1, null, 'a'); dlg.addShowListener((ActionListener

Modal Dialog does not appear

蓝咒 提交于 2021-02-08 08:27:51
问题 In my App I have an annoying behavior. It is causing problems to my costumers. The app has several points where I need to show a Dialog (Modal), then the users can fill some fields and then they can close the dialog. So the system follows its natural path. In determined moments this works fine. The dialog is shown, user interacts with it, closes it , .... But, in others moments (the same code) the dialog doesn't appear automatically. The user needs to execute some external action on device