codenameone

Updating Codename one in Eclipse

為{幸葍}努か 提交于 2021-02-19 15:04:33
问题 I can't seem to get ToastBar in my build, my CodenameOne.jar doesn't have the class. I've tried updating libs from project properties and it says it's all up to date. My eclipse says I have Codename 3.1 installed too, shouldn't it be 3.3 now? Is there something in particular I need to do to get the latest Codename one jar? 回答1: That API wasn't released yet and is only available in the source code at this time. It will be available within a couple of weeks as we try to release every 3-4 weeks.

Reduce the impact of videos in memory to prevent crashes

南笙酒味 提交于 2021-02-19 09:10:17
问题 I have an app with potentially a very large amount of images and videos, depending on how many posts users make. Already in development, with relatively few posts containing tabs with images and videos, occasionally the app crashes on real devices, I fear due to too much memory usage. Are there any tips and strategies to optimize resource usage? As for images, I only use medium-resolution regular EncodedImages (no multi-images), as backgrounds in Labels of fixed size. As for videos, I only

Reduce the impact of videos in memory to prevent crashes

不羁的心 提交于 2021-02-19 09:04:33
问题 I have an app with potentially a very large amount of images and videos, depending on how many posts users make. Already in development, with relatively few posts containing tabs with images and videos, occasionally the app crashes on real devices, I fear due to too much memory usage. Are there any tips and strategies to optimize resource usage? As for images, I only use medium-resolution regular EncodedImages (no multi-images), as backgrounds in Labels of fixed size. As for videos, I only

When videos are just loaded or paused, they are completely black (on Android)

心已入冬 提交于 2021-02-19 08:20:35
问题 This happens on Android only . Videos work properly on iOS and Simulator. The problem is that when my videos are loaded into the MediaPlayer, the displayed frame is and remains completely black. After pressing play, the video displays correctly. By pressing pause, the frame on which the pause occurred is shown correctly. However, if the app switches to background and then back to foreground, the paused video goes back to completely black. How can I fix this problem? The relevant part of my

How to structure the CN1 code for a tablet form layout?

蓝咒 提交于 2021-02-19 07:59:10
问题 I've been building my Codename One app for the phone screen format so far. There is a separate Form for the main menu, then a second Form with a list of elements, and then a third Form to edit an element selected from the list. Each Form has an overflow menu and various Titlebar command buttons. And each (Extended) Form has a lot of code that implements the functions in the Form and shares variables etc. However, to use the tablet (iPad) screen estate, I would like to show the main menu on

Codenameone Bluetooth APIs not working on android

淺唱寂寞╮ 提交于 2021-02-19 07:43:24
问题 I have downloaded BluetoothDemo from https://github.com/chen-fishbein/bluetoothle-codenameone. I created APK file using codename one build server and install it on my android mobile. Its not working. Is there any way to fix it? Can I run the same from netbeans using AVD manager or something similar to that so that I can debug it myself? If I started bluetooth manually, following is error on mobile phone on click of initialize or start scan option- Error snapshot attached 回答1: You need to also

Codenameone Bluetooth APIs not working on android

妖精的绣舞 提交于 2021-02-19 07:42:57
问题 I have downloaded BluetoothDemo from https://github.com/chen-fishbein/bluetoothle-codenameone. I created APK file using codename one build server and install it on my android mobile. Its not working. Is there any way to fix it? Can I run the same from netbeans using AVD manager or something similar to that so that I can debug it myself? If I started bluetooth manually, following is error on mobile phone on click of initialize or start scan option- Error snapshot attached 回答1: You need to also

Managing Demo / Full version of my app in Codename One

无人久伴 提交于 2021-02-19 06:14:42
问题 I was ordered to deliver an app in 2 versions : one demo/light (limitted features) the other full (all features). I have a boolean in code which tells which one is running. They both run as expected in the simulator or on a test device (iOS and Android). Now I want to distribute them. So I read that it was possible with XCode to define different targets corresponding to the light / full versions and with Eclipse it was possible to define the base project as a library and then create 2

Codename one javascript callback

左心房为你撑大大i 提交于 2021-02-19 04:49:05
问题 I am trying to display a consent page in my app. The page should be written in html so the app need to handle a button clicked event from browser. I tried to replicate the example in blog (minus the jQuery part): bc.addJSCallback( "document.getElementById('ACCEPT').addEventListener('click', function(){callback.onSuccess(true)})", res -> { System.out.println(res); dialog.dispose(); } ); The html looks like this: <html> <button id='ACCEPT'>Accept</button> <button id='DECLINE'>Decline</button>

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

♀尐吖头ヾ 提交于 2021-02-08 09:34:46
问题 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