Questions tagged [codenameone]

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

Codename One is a Write Once Run Anywhere (WORA) tool for application development that uses the Java language with a subset of its API and/or Kotlin to build native iOS (iPhone), Android, Windows (UWP), etc. applications.

It's an open source tool that integrates with all major IDE's.

To remove the need for a Mac/Windows machine (when building for iOS/Windows) Codename One uses the cloud to build native apps. It hosts Mac/Linux/Windows machines in the cloud and when a device deployment is needed the binary JAR file is sent to the cloud where it's translated to native code (C/Objective-C, C#, etc.), compiled, signed and delivered directly to the device. You can learn more about this process and how it works via this question.

Codename One also provides the ability to build for devices without the cloud servers (offline build).

4859 questions
5
votes
1 answer

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

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…
Shai Almog
  • 51,749
  • 5
  • 35
  • 65
5
votes
6 answers

Creating two Dimensional array with existing arrays in java

I have four arrays of strings and I would like to create a two dimensional array of 3 columns and dynamic rows. the arrays are like: String[] first_name; String[] last_name; String[] unit; String[] phone_number; Object[][] obj = new…
Gordons
  • 324
  • 5
  • 17
5
votes
2 answers

How to create the custom Calendar in LWUIT?

Currently in LWUIT, I can use Calendar. But I can't add the notes on particular dates. How to create the custom Calendar in LWUIT? Because I need to show the birthday notes on LWUIT Calendar and want to show the birthday notes when user select that…
bharath
  • 14,283
  • 16
  • 57
  • 95
4
votes
1 answer

New Codename One bare-bones project to start a new project

I have now noticed a radical change in the source Java code obtained via https://start.codenameone.com/ Obviously I'm used to coding with init(), start(), stop(), destroy() methods, I don't know how to handle this new code. Is it documented…
Francesco Galgani
  • 6,137
  • 3
  • 20
  • 23
4
votes
1 answer

How to automate the build of codenameone project (using only command line)?

How to automate the building of a codename one project (only command line)? Today, we need to automatize all as possible. Is it possible to write a build pipeline for a CodeName One Project? If yes, Which CI/CD tool is better?
hrugani
  • 457
  • 3
  • 11
4
votes
1 answer

Creating a website that doubles as an app using Codename One

I've been creating apps using AppSheet where an app is usable from both a desktop computer as well as Android and iOS mobile devices. We recently became disillusioned with the AppSheet platform due to bugs that they refused to fix, and so decided to…
tvinci
  • 41
  • 1
4
votes
1 answer

Post form information to Browser Component

I currently have a html web application which contains a hidden form:
A Houghton
  • 372
  • 5
  • 18
4
votes
1 answer

usesCleartextTraffic not permitted

I use to send build to codenameone for year, but suddenly all the newly android build apps is not working with http protocol, getting "java.io.IOException: Cleartext HTTP traffic to domainname.com not permitted." I search through google but not…
Manuk
  • 301
  • 1
  • 6
4
votes
2 answers

Codename one - Form.initLaf throws random "Illegal Access" errors

in my app, I get "IllegalAccess" errors, at seemingly random places and times. The only thing in common is the stack trace: java.lang.IllegalAccessError: class sun.reflect.GeneratedConstructorAccessor3 cannot access its superclass…
Lequi
  • 539
  • 2
  • 13
4
votes
1 answer

How to handle keys pressed almost in the same time?

I'm trying to resolve a problem with the search bar. It works but the problem is that if I press two keys almost at the same time, the app will only search the words with the first key pressed. Here are the logs: In this one, it works when I press…
Farssi Issam
  • 173
  • 6
4
votes
1 answer

Codename one new gui builder-back command from EVERY form navigation

I am navigating between forms in the NEW GUI builder. The old one had a back button on every form by default. How do I enable the back button on new gui builder in every form, every time i navigate in a new form? Tried through constants in…
C Java
  • 446
  • 2
  • 16
4
votes
1 answer

How to make dashed or dotted lines in CN1 charts

I'm using the com.codename1.charts lib but there isn't a whole lot of documentation. None of the chart demos use dashed or dotted lines and I assumed you could use BasicStroke.DASHED but changing this constant value does not seem to make a…
Nick
  • 41
  • 1
4
votes
2 answers

Can I test my Codename One app on my iOS device for free?

I have written a simple to-do list app in Codename One, and so far I have used the simulator to test it. I want to see how it looks on a real device (iPhone 5s or 8 Plus), but I don't want to purchase the Apple Developer membership. I really don't…
Henry Sanger
  • 143
  • 2
  • 15
4
votes
1 answer

How to read a String from the clipboard in a codename one app?

My app occasionally reads text data from the clipboard. I'm using code like this, which seems to work ok on android. String pasteText = null; Object pasteObj = Display.getInstance() .getPasteDataFromClipboard(); if (pasteObj…
flewby
  • 109
  • 8
4
votes
1 answer

How to dynamically create Objects to add into ArrayList in Java

I am currently building a 2D Asteroid game using Java and Codename One with a heavy focus on OOP patterns. I'm having trouble, however, trying to dynamically create new objects (in my case the Object I want to add is a superclass GameObject) to add…
Ben Yan
  • 61
  • 1
  • 9