Questions tagged [codenameone]

Codename One is an open source Write Once Run Anywhere Mobile Development Platform that allows Java developers to build native (iOS/Android/Windows Phone etc.) applications

2
votes
1answer
12 views

Codename one-Navigate form in a different package

I am using the typical code to navigate between forms in the same package. For instance, the form tutorial.java Form Tutorials = new Tutorials(); Tutorials.getToolbar().setBackCommand(...
1
vote
1answer
29 views

Bash: increase a version number in a Java properties file (Codename One version)

I have a Netbeans project (it's a Codename One project), that executes a build.xml ant build script. I modified that build.xml to execute an external bash script for some targets, for example: <...
1
vote
1answer
12 views

Codename One: log which code is calling another code

This question is referring to Codename One only. Short story: I'm debugging a strange bug that occurs only in real devices but not in the Simulator. There is method that is called every second in a ...
0
votes
0answers
9 views

OneSignal Integration with Codename One (Android)

as mentioned on the Codename One Discussions forum (https://groups.google.com/forum/#!topic/codenameone-discussions/fQTCZfvr8eY), I'm in need of integrating OneSignal on my Android app written with ...
1
vote
0answers
6 views

CertPathValidator Exception in older Android devices

Hi I see the following error message in the logs related to SSL Certificate. How can this be avoided. javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor ...
1
vote
0answers
7 views

NoClassDefFoundError on older android devices for using FingerprintManager

I'm testing on older android device and I see the following message in the logs. Login will take indefinite time and I'm not sure if this is something to do with upgrading the libraries. CN1 doesn't ...
2
votes
1answer
16 views

Embedding material icons charcters in regular text in CodenameOne

Is there a way to inject a material icon character inside a regular text paragraph? So I need something like this: "Some text"+material icon character here+" some more text". And I want this to flow ...
1
vote
1answer
10 views

Padding between multibutton components

I am trying to add padding between the multibutton components. I did getStyle().setPaddingTop(10) but this pads within the component, not the outside of the border. I also have a border for the ...
1
vote
1answer
17 views

Setting height to slider on the Swich

On te Codename Designer I saw the Swith with a fine slider line, but when I use on a form, the circle and the slider are same Height. ¿how I must do to set the slider Height? Switch on Designer ...
1
vote
0answers
34 views

How to create a list containing Switch components

I'd like to create a UI with a list of Container elements containing Label and Switch components. In 2015 I did something similar using a ContainerList. Apparently Codename One recommends using a ...
1
vote
1answer
22 views

Programmatically select a tab of a Codename One Tabs object

To programmatically select a tab of a Codename One Tabs object, the following code is enough: tabs.setSelectedIndex(tabToSelect, true); The problem is that this code selects the wanted tab but it ...
1
vote
1answer
27 views

Support for DatagramSocket (UDP)?

My app requires minimal support for DatagramSocket (i.e. UDP). Specifically, I need new DatagramSocket(), send(DatagramPacket p) and receive(DatagramPacket p). I'd like to support both iOS and ...
1
vote
1answer
24 views

CIRCULAR REFERENCE:com.codename1.ui.Display$EdtException

I've just discovered a new bug in the app I'm developing. In the Simulator, this bug causes the CPU working at 100% for a while, producing a very long log (it seems a loop of something). Finally, the ...
1
vote
1answer
23 views

Codenameone: Register iOS App as share target

I found an article where a solution is described how to register an codenamone app as a target for "open with" on an iOS device. Is there also a way to register an codenamone app as a share target on ...
1
vote
1answer
57 views

Can I execute an App Windows UWP generated by Codename One on Windows 10 Desktop machines?

I have a client that needs my App (that was developed using Codename-One-Framework) executing on Windows 10 Desktop machines as well on the Android devices. My Codename One account allows me to ...
1
vote
0answers
44 views

How to avoid drag and drop traces in CN1

As you can see in the animation below the dragging causes traces I don't want. Moreover the dragged component is drawn vertically shifted. I guess this has to do with the statusbar. But how can I ...
1
vote
1answer
26 views

Store to JSON a PropertyBusinessObject containing a ListProperty

I have difficult to store to JSON a PropertyBusinessObject containing a ListProperty. I created the following test case, that works fine on the first execution, but fails on the second. Is my code ...
1
vote
1answer
29 views

the barcode scan library doesn't work on iOS but it does on Android

I try to use this librairy to use the barcode scanner on iOS : https://github.com/codenameone/cn1-codescan It works very well on Android but when my application opens the same barcode scanner form on ...
1
vote
0answers
44 views

Codename One, sending SMS on android issue

I am using Codename One to create an app for both Android and iOS which sends SMS messages. For the most part the app works well in both Android and iOS but I have discovered an intermittent situation ...
1
vote
1answer
47 views

Codenameone Occasionaly see ConnectException when connecting to domain name url

I have a domain name www.example.com with an ip address of 1.2.3.4 In my code I connect to https://www.example.com:8443 to call some REST services. (Ip address is never used) This all works fine but ...
2
votes
1answer
31 views

The codeScanner doesn't work when it's used with my application

I have a problem with the code scanner, I use this lib https://github.com/codenameone/cn1-codescan in my application to scan the barcode. I work on an android application and I try to scan code_128 ...
1
vote
1answer
36 views

CodenameOne Mobile app throws SSL Exception connecting to https server with real certificates (not self signed)

I have an Amazon AWS environment running a spring boot server app with https endpoints. (https://www.myapp.com:8443) A real (not self signed) certificate for www.myapp.com has been installed on the ...
1
vote
1answer
11 views

“jar_project” Builder in Eclipse CN1 project loops on refresh

CN1 projects have an additional Builder "jar_project" configured. Apparently this builder is looping when "Refresh using native hooks or polling" is checked in Eclipse Preferences -> General -> ...
1
vote
1answer
20 views

Codename One TextField Unable to Align Text

I have a series of text fields in an Android app. I want to align the text vertically to the center (and horizontally to the left), but I can't find the correct approach. This is my code: ...
1
vote
0answers
17 views

Vertical align with Created TTF Font

On Android (in simulator or in IOS work fine) when used on a Label a created TTF Font (from a file), do not vertical align the icon with the font, the font are on top. When I use a native Font works ...
2
votes
1answer
33 views

Add Buttons to the Codename One Toolbar

The Toolbar API hasn't any method to add Buttons on left or right (except than inside SideMenus). It allows only to add Commands, but a Command is less useful than a Button because I cannot style each ...
1
vote
2answers
30 views

How do I get the new Codename One GUI builder? I cannot find a download link anywhere

I have been learning Codename One from the IntelliJ IDE. I have the plugin for CN1 version 6.0.2. It uses the OLD GUI designer. I have been reading about their NEW GUI Builder and want to try it out, ...
1
vote
1answer
31 views

Location API throwing an error on Android

I see this sporadic message on Android devices when using the LocationManager.getLocationManager().setLocationListener() and Tracking GPS location in the App. Please advise if anyone see the same ...
1
vote
1answer
20 views

Prevent wrong imports in Netbeans

Sometimes I don't notice that Netbeans imports the wrong packages inside a Codename One project. It causes me to waste time until I notice a such sneaky mistake. This happens me a lot of times, ...
1
vote
1answer
19 views

NPE creating system fonts?

I'm trying out CodenameOne and I get an NPE which seems to have something to do with the System Fonts. This is in the Simulator on macOS. Caused by: java.lang.NullPointerException at com.codename1....
1
vote
0answers
21 views

Images shown rotated in Codename One

I'm developing a Codename One app for iOS. I gave the user the option to take pictures or to load them from the gallery of the device. After that, the app shows pictures in labels (encapsulated in a ...
0
votes
1answer
13 views

Codenameone: Broken button layout on the showcase

We are evaluating CodenameOne to adopt it as our platform. In the Showcase App, the menu buttons layout gets broken (button smaller than the image) after changing to some Themes like the "Leather". ...
0
votes
1answer
22 views

Codenameone: DateTime-Pickcer on Android looks ugly/corrupt

I use DateTime Picker within my Codenameone App. On my Android-Device it looks unreadable - see attached Screenshot. Is there any way to fix this corrupt layout?
1
vote
1answer
15 views

How do I change the style of a path in the Google Maps api in Codename one

I am making an app for school and I am using the Google Maps Library in Codename one. I create a path between various points but the path is thin and black and very hard to see. I've looked at all ...
1
vote
1answer
29 views

Exception: java.lang.NoClassDefFoundError - org/json/simple/JSONValue

I wanted to use the yandex api translate It works in Java project but not in Codename One project I followed these steps to add an api in a project like i did in java project: https://github.com/...
1
vote
2answers
27 views

In Codename One, generic method to get all Components of a given type

I know that in Codename One I can get all Components of a given type (and its subtypes) using a recursive method like the following: recursiveSearch(Display.getInstance().getCurrent()); public void ...
1
vote
1answer
27 views

How to generate qrcode in codename one

I'm trying to generate qrcode code in my application with qrgen and then saved in specific file but there is a problem in the libary 'java.io.FileOutputStream' where it can not be found. i want to ...
1
vote
0answers
18 views

Generalize code to capture and crop a photo

This questions refers to Codename One only. Thanks to the commit 98dcbaa and re-working the test case ImageViewerSample2778, I created a full working example to capture a photo and to crop it. My ...
1
vote
0answers
23 views

Codename One Map Container - Place marker on tapped point of the screen

I'm developing a Codename One app for iOS. I'm using a MapContainer (https://github.com/codenameone/codenameone-google-maps) and I set a tap listener for it, in order to draw a marker in the point of ...
1
vote
1answer
18 views

Codename One: findById in UIFrament

I'm doing some tests with UIFragment. Can you please tell me why the following code is wrong? It gives me a NullPointerException. Form hi = new Form("Hi World", BoxLayout.y()); UIFragment myUI = ...
1
vote
1answer
29 views

Android app glitch reviews when much better on Apple in Codenameone app

Please could i have some advice from those who have been building apps for longer than myself. After 18 months of developing 2 quite complex CN1 apps, available on IOS and Android stores, I get ...
1
vote
0answers
20 views

How to implement dialog in toolbar

I am doing my first apps using codename one. I want to implement a dialog message when I press the toolbar. Now my code is when I press the toolbar, it will output the text "Right" only. I want to pop ...
0
votes
2answers
30 views

java.lang.NoClassDefFoundError: com/codename1/ui/ComponentSelector

I try to add Google Native Maps (GoogleMaps.cn) to my CodeNameOne Project , but i have an error java.lang.NoClassDefFoundError: com/codename1/ui/ComponentSelector the error is caused by this ligne ...
0
votes
1answer
33 views

can someone help me fix this Picker error

I am using Picker component is codename one, it was working properly before as shown in 1st screenshot, its showing the full string. But in 2nd screenshot, its not showing some alphabets. Screenshot ...
1
vote
1answer
29 views

How to move the label to center

I want to do the app when I press the tab button the result(website) will show at the center. Now the result is like this the result show at bellow: But I want my result like this: For example when I ...
1
vote
1answer
31 views

Control width render animation in Codenameone

I have a page which has multiple vertical sections, each with a thermometer type control i have built, rendered on each. How do i code it so that when the page loads that the 'mercury' width, of all ...
1
vote
2answers
46 views

How to POST File to an URL in Java CodeName One?

I wanna to upload an image in java and copied in a directory with WebService in Symfony i tried it with Postman and it worked but when i did it in Java, it didn't work, i don't know how to pass a ...
1
vote
0answers
47 views

Not able to connect my Codename One iOS app to my server

I was trying to build an iOS app using Codename One, I was successfully able to generate the build, but when installed on my device I'm not able to connect to my server. The app works fine on android ...
1
vote
1answer
23 views

how to do webview and adjust text inside the form?

I am new in codename one. I want to do the apps using webview. When I add the code below the simulator will close automotive. Here is the code: public void start() { if(current != null){ ...
1
vote
1answer
17 views

Using SendGrid with Codename one- subject and from Email mix up and emails go straight to spam

I'm working on a codename one application and want to send an automated email. I downloaded the cni1lib, SendGrid, and implemented it. The syntax for sending an email is below but the subject is ...

http://mssss.yulina-kosm.ru