codenameone

codename one app version number programmatically

岁酱吖の 提交于 2019-12-01 02:04:41
问题 I'm trying to get application version from the code at runtime how to get codename1.version from codenameone_settings.properties programmatically 回答1: Use Display.getInstance().getProperty("AppVersion", "1.0") , it will return the app version 来源: https://stackoverflow.com/questions/40101244/codename-one-app-version-number-programmatically

How to show two or more label at centre of the container in codenameone

[亡魂溺海] 提交于 2019-12-01 01:03:03
I am new for Codenameone Is there any option to align a label depends on another label like align bottom, top, right and left option? How to align many labels at the centre of the parent layout? Here I have attached the code I tried for: Container center = new Container(new BorderLayout()); Label des = new Label((String) data.get("title")); des.setUIID("MultiLine2"); center.addComponent(BorderLayout.NORTH,des); Label author = new Label((String) data.get("author")); author.setUIID("MultiLine2"); center.addComponent(BorderLayout.SOUTH,author); cnt.addComponent(BorderLayout.CENTER, center); I am

NSAllowsArbitraryLoadsInWebContent in CN1

烈酒焚心 提交于 2019-12-01 00:25:29
I'm trying to deal with Apple's http restrictions on Codename One. According to iOS Cocoa keys doc, NSAllowsArbitraryLoadsInWebContent will work on iOS 10 following these instructions: An optional Boolean value that applies only to content to be loaded into an instance of the following classes: WKWebView UIWebView (iOS only) WebView (macOS only) Set this key’s value to YES to obtain exemption from ATS policies in your app’s web views, without affecting the ATS-mandated security of your NSURLSession connections. Default value is NO. To support older versions of iOS and macOS, you can employ

iOS debug build install fails

南笙酒味 提交于 2019-11-30 22:48:27
I have a CN1 test project which was last built and successfully installed on various test devices in mid January 2017. In rebuilding this project using the current CN1 version with the same certificate, provisioning profile and devices it now fails to install with the "Unable to Download App... could not be installed at this time." message. Any suggestions as to what the issue might be? I have also created a small test project using artifacts from a different Apple developer account with the same result. I used the certificate wizard to create the certificate and provisioning profile for the

Saving an Image Locally in Codename One Project

半世苍凉 提交于 2019-11-30 20:43:20
I've followed the tutorial of creating a camera capture page in this video: http://www.youtube.com/watch?v=nF4eqzVcsic So my code at the moment looks like this: protected void onCamera_CaptureButtonAction(Component c, ActionEvent event) { String i = Capture.capturePhoto(); if (i != null) { try { Image img = Image.createImage(i).scaledHeight(500); findCameraLabel().setIcon(img); } catch (Exception ex) { } } } I had a look at the CameraDemo application, but can't seem to locate any files being saved. I basically just want any pictures taken to be saved in the src folder. Any help would be

How to change the color of the status bar in a codenameone android app?

左心房为你撑大大i 提交于 2019-11-30 16:34:19
I would like to change the color of the status bar to match my app background, how can I do this? It is possible by placing a colors.xml file under the CN1 project <project>/native/android directory with the following example content: <resources> <color name="colorPrimary">#ffffc003</color> <color name="colorPrimaryDark">#ffffc003</color> <color name="colorAccent">#ff009486</color> </resources> Where in this case the colorPrimaryDark is the color you would like to color the status bar 来源: https://stackoverflow.com/questions/34904705/how-to-change-the-color-of-the-status-bar-in-a-codenameone

ERROR ITMS-90168: “The binary you uploaded was invalid.”

半世苍凉 提交于 2019-11-30 12:09:23
ERROR ITMS-90168: "The binary you uploaded was invalid. "The resulting API analysis file is too large. We were unable to validate your API prior to delivery I got the above error each time I want to upload the new version of my app to iTunes connect. I am using application loader for the upload. My application was developed using Codename one. Please, any help will be appreciated. I have been on this for a long time now An invalid binary can happen for several reasons (the analysis file isn't the problem): Outdated application loader - this is the most common reason. Make sure your Mac OS X

How to build the native Android sources from Codename One's build server

僤鯓⒐⒋嵵緔 提交于 2019-11-29 22:46:14
问题 I'm using the new gradle build switch when sending an Android build for Codename One. One of the highlighted benefits of building with gradle is the ability to open/run in Android Studio and indeed the project opens for me but I'm getting the following error: Error:Unable to load class 'org.codehaus.groovy.runtime.StringGroovyMethods'. Possible causes for this unexpected error include: Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.) Re

ERROR ITMS-90168: “The binary you uploaded was invalid.”

不羁岁月 提交于 2019-11-29 17:49:04
问题 ERROR ITMS-90168: "The binary you uploaded was invalid. "The resulting API analysis file is too large. We were unable to validate your API prior to delivery I got the above error each time I want to upload the new version of my app to iTunes connect. I am using application loader for the upload. My application was developed using Codename one. Please, any help will be appreciated. I have been on this for a long time now 回答1: An invalid binary can happen for several reasons (the analysis file

Event handling anomaly

不羁岁月 提交于 2019-11-29 11:42:58
After the last library update (my jar files dates is 22. Oct.) The event handling does not work as expected. For example the SwipeEvent in SwipeableContainer and the ActionListener in FloatinAutton works. But the button and MultiButton does not. I debuged it. Does not fall into any EventDispatcher instance that includes relevant listener. So the handler code defined in the form (multiButton.addActionListener(e -> {...) is not called anymore. This phenomenon can be reproduced by recompiling the KitchenSink app and running it in the simulator. And the downloaded apk does not work correctly. The