codenameone

Codename One - Test Recorder: execute a test on a real device

牧云@^-^@ 提交于 2019-12-01 11:57:28
问题 In the developer guide of Codename One, it's written so: «Codename One includes a built in testing framework and test recorder tool as part of the simulator. This allows developers to build both functional and unit test execution on top of Codename One. It even enables sending tests for execution on the device (pro-only feature).» Using a pro account, what are the steps to do a test on a real device? 回答1: You need to set the build hint build.unitTest=1 which will build a version of the app

bar code scanner is too slow to read the code

Deadly 提交于 2019-12-01 11:21:36
问题 I have used codenameone codescanner library to read bar code. It uses third party scanner which if used separately works fine and is quick to read the bar code. But using codenameone app, the same scanner is too slow(most of the time unable to scan). I have tested it in samsung devices and few other devices. The outcome is not so good. How can I enhance the scanner? code: CodeScanner.getInstance().scanBarCode(new ScanResult() { public void scanCompleted(String contents, String formatName,

Facebook Login Graph API returns wrong profile picture URL

寵の児 提交于 2019-12-01 11:08:52
问题 I'm using Facebook graph API by calling https://graph.facebook.com/v2.10/me?access_token=xxxxxxxxxxxxxxxxxx&fields=id,email,name,first_name,last_name,gender,age_range,picture.width(512).height(512),locale,link,timezone,updated_time which returns the json response I was expecting. Something like this: { "id": "1234567890987654321", "email": "xxxxxx\u0040example.com", "name": "xxxx xxxx", "first_name": "xxxx", "last_name": "xxxx", "gender": "xxxxx", "age_range": { "min": 21 }, "picture": {

CodenameOne: VKB changes the screen

◇◆丶佛笑我妖孽 提交于 2019-12-01 10:49:32
问题 I have a an app developed on CodenameOne platform where I have textfields for manuel input. Each time when the VKB shows on android, the contents of the screen are pushed to bottom and especially the textfield becomes so thin that no characters can be seen. How can I prevent this? 回答1: On android when the VKB is launched the Form gets a sizeChanged event, to prevent this behavior you can declare the textfields parent container as a scrollable Y container BoxLayout Y 来源: https://stackoverflow

Can't Run Simulator

拈花ヽ惹草 提交于 2019-12-01 08:35:39
I haven't been coding for a little while, and so I fired up Eclipse, updated the plugin and Eclipse, and now when I try to launch the simulator I get an exception: Exception in thread "AWT-EventQueue-0" java.lang.VerifyError: Bad type on operand stack Exception Details: Location: javax/swing/JScrollBar.getAccessibleContext()Ljavax/accessibility/AccessibleContext; @16: putfield Reason: Type 'javax/swing/JScrollBar$AccessibleJScrollBar' (current frame, stack[1]) is not assignable to 'javax/accessibility/AccessibleContext' Current Frame: bci: @16 flags: { } locals: { 'javax/swing/JScrollBar' }

executeOfflineCommand skips a command while executing from storage on Android

*爱你&永不变心* 提交于 2019-12-01 08:31:46
问题 I have to execute "Start" and "Finish" Commands in the Sequential Order in my program and synchronize everything at the end. So I'm inserting the Offline commands in the order first and assuming they will execute in the same order. I'm using "List" with "Iterator" for this. Problem here is: Finish Command will be missed execution in some strange scenarios in the middle and "start" commands will execute next to each other and sending all wrong data and mapped it in a wrong way. As action will

How to use Codename one Storage?

扶醉桌前 提交于 2019-12-01 07:06:35
问题 I am trying to port my LWUIT application to Codename one. I have used RMS in LWUIT and now obviously I have to transform this to Storage. I don't understand how the Storage class works in Codename one and the documentation for codename one has nothing about either. 1) What is the structure of a storage file? --> In J2ME RecordStore , you have records bunched together like a table. Every row, corresponds to a record. Each record has a unique record ID and you can access the record with this

Can't Run Simulator

醉酒当歌 提交于 2019-12-01 06:20:08
问题 I haven't been coding for a little while, and so I fired up Eclipse, updated the plugin and Eclipse, and now when I try to launch the simulator I get an exception: Exception in thread "AWT-EventQueue-0" java.lang.VerifyError: Bad type on operand stack Exception Details: Location: javax/swing/JScrollBar.getAccessibleContext()Ljavax/accessibility/AccessibleContext; @16: putfield Reason: Type 'javax/swing/JScrollBar$AccessibleJScrollBar' (current frame, stack[1]) is not assignable to 'javax

codename one app version number programmatically

不打扰是莪最后的温柔 提交于 2019-12-01 04:41:36
I'm trying to get application version from the code at runtime how to get codename1.version from codenameone_settings.properties programmatically Use Display.getInstance().getProperty("AppVersion", "1.0") , it will return the app version 来源: https://stackoverflow.com/questions/40101244/codename-one-app-version-number-programmatically

Is There A Way To Disable Mac OS Retina Scaling For A Swing App?

本小妞迷上赌 提交于 2019-12-01 04:08:32
问题 We have a rather complex application that needs as much screen real-estate as it can get, naturally the retina display Mac Books are excellent for this purpose. However, it seems that in Swing those devices use points rather than pixels. They allow me to change the icons to higher resolution versions as discussed here. But since we do a lot of complex graphics and components overlays I want to just use "real pixels". To be clear I am not interested in fixing blurry images or icons (not