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.

Filter by
Sorted by
Tagged with
1 vote
1 answer
12 views

Codename One - ProGuard - Duplicate jar entry

I have an existing Codename One application and wish to add some data from a GTFS real-time data feed. All is well, until I add the following statements: try { FeedMessage....
stylsy's user avatar
  • 63
1 vote
0 answers
13 views

Codename1 CSS styling not being applied on device after installing cn1-codescan-lib

On device, without codescan library On device, with codescan library When I install the cn1 codescanner library from the extension or via maven (pom) the css styling is not applied on my device as ...
Kyros Nox's user avatar
  • 183
1 vote
1 answer
13 views

Automatically opening the keyboard in Codename One

I need to automatically open the numeric keyboard to facilitate entering an access PIN. I've tried giving focus to the textfield (textField.requestFocus();), but it hasn't worked. I tried: Display....
Alejandro Fernandez's user avatar
1 vote
1 answer
17 views

Does Codename One's BrowserComponent have a built-in native loading spinner?

I have discovered that when using the BrowserComponent, when navigating from one section to another on my own website, that spinner appears. I would like to know if it's possible to configure it or ...
Alejandro Fernandez's user avatar
1 vote
2 answers
34 views

Can I built a mobile application in which I can connect spring boot as backend REST API and codename as a frontend?

I am working on a master's project to design a mobile application using codename one. I am planning to use spring boot in the backend but don't know where to look for the examples. Can you help me how ...
aayush bhavsar's user avatar
1 vote
0 answers
17 views

CN1 Simulator Hot Reload in Eclipse intended behavior

I am using Codename One with my preferred editor, Eclipse. My platform is Arch Linux and the code base is a Maven Project from the "Initializr". Whenever I make changes in CSS, the running ...
rainer's user avatar
  • 3,305
0 votes
2 answers
34 views

Codename one and javascript (share screen)

I have an android app developed in java with Codename One. Everything that is displayed on the screen belongs to a BrowserComponent that opens a url mydomain.com to which I have access. I need the ...
Alejandro Fernandez's user avatar
0 votes
1 answer
34 views

Hard to click button and menu on iphone 12. How do I solve this issue?

My app(developed by cn1) has a menu and a command on the toolbar. It works fine in Android but hard to click through the menu and command on iPhone(X, 12...) with the notch. Please see the image ...
Daniel Tsai's user avatar
1 vote
1 answer
122 views

My app shutdown without message only in iOS?

This issue is only in iOS. My app crashes at PriceMap.put(id, PL) after putting 5-6 numbers of PL lists without any message. My app runs on Android and the simulator without any problem. private ...
Daniel Tsai's user avatar
1 vote
1 answer
20 views

Is there a way I could use javax.smartcard libs in CodeNameOne?

Hello for my project I want to be able to use javax.smartcardio libs, these are Java 8 libraries or lower but I do not believe CodeName One has support for this library. How could I use this in my ...
Felix's user avatar
  • 83
1 vote
1 answer
48 views

Codenameone app with banner ads - outdated version reported

I made a new version of my cn1-app, and I am trying to publish it on Google Play console. After uploading the aab file, the following error was reported: Error: The developer of Google Mobile Ads (...
dalovrek's user avatar
3 votes
1 answer
760 views

How do I solve the target API level issue from Google about building my app by cn1?

I got an important message from Google. Update your target API level by August 31, 2023 to release updates to your app We've detected that your app is targeting an old version of Android. To provide ...
Daniel Tsai's user avatar
1 vote
1 answer
40 views

Codename one java ios app PROGUARD warnings trouble

I'm writing IOS app using codename one project that I get from codename`s initializer cite. At some point I have to use java.net, java.io and java.util packages. But when I'm trying to build project, ...
Vladyslav Korshenko's user avatar
1 vote
1 answer
28 views

How to check in cn1 (in-app-purchase) if an app was purchased?

I have published a free app with ads on Google Play Store. I consider to implement in-app purchase (non-consumable product, ie. buy-once). So the app would be either free (restricted functionality) or ...
dalovrek's user avatar
1 vote
0 answers
24 views

Codename One: error with MediaManager and URI; can't load libjcef.dylib

I am trying to get audio into my program using URI's and MediaManager, specifically with this method Media media = MediaManager.createMedia(uri, false). It does not work as I keep getting this error (...
Stefan Cohn's user avatar
1 vote
0 answers
29 views

How to inject Admob Extension to a Codename One Project?

I'm having issues getting the Admob extension to work. I initially just inserted the commands found on the extension's Github page (https://github.com/codenameone/admobfullscreen-codenameone) to the ...
Stefan Cohn's user avatar
1 vote
0 answers
39 views

Transparent status bar codename one

Everything displayed on my app belongs to a BrowserComponent. I have tried in every possible way that my form is behind the status bar (with transparency) and extends to the top of the screen. I ...
Alejandro Fernandez's user avatar
1 vote
0 answers
50 views

CodeRAD/Eclipse - StartPageController cannot be resolved

Followed the instructions up to running the app in the simulator. Fine. However, I did not manage to prevent Eclipse from showing this error. Any help would be nice 👍🏼 Also, I must mention that ...
ebardet's user avatar
  • 230
1 vote
2 answers
54 views

Codename One: Resources Not Being Found in Android Build

I am using Codename One to build a little game. My game works in the simulator, however, whenever I run an Android build of the game, I'm met with java.lang.NullPointerException: Attempt to invoke ...
Stefan Cohn's user avatar
1 vote
0 answers
19 views

How to enable Background Fetch for iOS in Codename One

The original documentation of the Codename One BackgroundFetch interface says: "include fetch in the ios.background_modes build hint". The build hints can be found in the Codename One ...
Peter Saitz's user avatar
1 vote
2 answers
83 views

Codename One: Issue with .createMedia method and audio files

I'm trying to make an audio player for a game using Codename One but I've been running into issues with the .createMedia method. public class AudioPlayer { private Media MEDIA = null; public Media ...
Stefan Cohn's user avatar
1 vote
1 answer
27 views

List with an Image and MultiSpanButton

I want to display a list of data with an image. I can load the image into CSS but I have little control the image's size and placement. I can set an image on a label using CSS, but I cannot set the ...
Tony's user avatar
  • 11
1 vote
1 answer
45 views

Why android 12 have problems with bluetooth?

I need help to solve the following problem. When I deploy an apk to a device running Android 12, the app doesn't run and I see a pop up saying: Need android.permission.BLUETOOTH_CONNECT. Any comment ...
MobilitySol Uruguay's user avatar
1 vote
1 answer
63 views

Making audio player in Codename One

I am porting a java game to mobile using Codename One, and have been trying to make an audio player with the framework using code from another thread. I'm running into lots of trouble doing so, mainly ...
Stefan Cohn's user avatar
1 vote
1 answer
24 views

CN1 app hangs when launching closed app via iOS universal link

For our CN1 app on iOS, tapping a universal link works when the app is already opened and in the background but only if it was already opened. When the app is closed before tapping the link, the app ...
Mike Clonts's user avatar
1 vote
0 answers
25 views

Capture.captureAudio() not working on Android

I am making a very basic android app to conduct voice recording. However, Capture.captureAudio() did not include the needed android permission and no dialog was triggered. On the device, I checked ...
javalove's user avatar
  • 560
1 vote
2 answers
85 views

Codename One Windows Push

We are running one of our apps on Windows - Currently a Windows Desktop Build, which we then package using MSIX and distribute via the Windows Store. We would like to add Push Notifications to the app....
ASD Solutions's user avatar
1 vote
1 answer
28 views

Codename One App not dialing phone number on iOS device

Display.getInstance().dial(String number); is doing absolutely nothing in my iOS app. Works fine at Android and displays a messagebox in the simulator. What have I done wrong for iOS? Phone number is ...
Peter Saitz's user avatar
0 votes
1 answer
42 views

maven code-name one create-GUI-form - what's the correct class path specification?

I'm new to Codename One and just starting a new project. I created a project from the Bare Bones Java app template and am trying to add a GUI form. I'm trying to follow the instructions in the ...
Rena's user avatar
  • 11
1 vote
0 answers
32 views

Automatic theme update after css edit doesn't work

Has anyone ever encountered this problem? How to soolve? A few weeks ago the automatic update of the theme after editing the css is not working. I get the following error in the log: CSS watching ...
Renato Nascimento's user avatar
1 vote
2 answers
329 views

There are some warnings when I sent cn1 android build to google play

This question is for codenameone. androidx.annotation:annotation:1.0.0 This SDK version has been reported as outdated. Consider upgrading to a newer version (1.0.1 - 1.0.2, 1.1.0-alpha02+).
Daniel Tsai's user avatar
0 votes
0 answers
331 views

Play Billing Library Version Deprecation Issues

I got warning messages from Google Play console after sending my CN1 Android built for publishing my Android app. We've detected that this app is using an old version of Google Play Billing. From ...
Daniel Tsai's user avatar
1 vote
2 answers
48 views

How to change right side menu icon size in cn1?

I couldn't figure out how to customize it(change the size, color...) of the menu icon (3 horizontal lines). It's small, I need to increase the size. I saw this question How to change menu icon size in ...
Renato Nascimento's user avatar
1 vote
0 answers
30 views

"Sticky" keyboard in Codename One

We have a vertically scrollable page that has a TextField that pops up a keyboard when pressed. Is it possible to keep the keyboard on the screen while the user scrolls? If so, how? The TextField is ...
Renz's user avatar
  • 81
1 vote
1 answer
50 views

Codename One GUI Builder button images are deleted after each build

This is the same problem as I posted Dec 2022: "CodenameOne Cannot Add Image to Button Using GUI Builder". It hasn't been a problem on the two most recent projects I've deployed because I ...
Doug Sisco's user avatar
1 vote
1 answer
32 views

Is there a way to know if a user's Apple ID that they will use for payment have been subscribed before to an app?

I have the following example snippet code where I hope to find out if a user has or is subscribed to an app on iOS: private boolean isAnewUser() { if (inappPurchase.wasPurchased(SKU)) ...
Renz's user avatar
  • 81
1 vote
2 answers
65 views

How to restrict CN1 app from running on Android Studio emulator

Due to app security concern I need to restrict a certain app from being able to run on emulator. How can CN1 android build app be restricted from running on emulators like Android studio and ...
Eric's user avatar
  • 199
1 vote
0 answers
156 views

Promotional Offer Errors

Able to show the promotional offer thanks to support here, but after going through the payment process, inputting my password, and confirming the purchase, I get an error popup that says "Unable ...
Renz's user avatar
  • 81
2 votes
0 answers
45 views

Copy file from apphomepath to download folder in codenameone

i am working at a codenameone app. i like to make gpx files the app and copy those files to the download folder on my phone. So that i can later use this files. I didn't find a good solution in ...
user3025401's user avatar
-2 votes
2 answers
832 views

can you help me with converting this String that contains a date to a varialble of type date and format it?

i have this String that contains a date in this format "2023-04-20T00:00:00+02:00" and i want to convert it back to date in a format just like this 2023-04-20 i tried this code String ...
massaoud ghassen's user avatar
1 vote
0 answers
36 views

How can I delete image from file system storage correctly? Issue with iOS only

In my app I allow the user to capture or select an image from gallery to set as the background for a container. The image is scaled and then saved. The user can replace or remove this image later and ...
James N's user avatar
  • 435
1 vote
1 answer
129 views

Generating a Signature for Apple Promotional Offers

This is a follow up on a question I had asked and thank you to Codename One for implementing promotional offers! I am having trouble generating the signature. The following snippet of code is what I ...
Renz's user avatar
  • 81
1 vote
1 answer
23 views

Netbeans is escaping build hints in codenameone_settings.properties file, causing build errors

Netbeans just started automatically escaping some build hints in the codenameone_settings.properties file. The build server seems to reject this. I've never seen this behavior, I haven't been able to ...
James H's user avatar
  • 1,116
1 vote
1 answer
33 views

How do I show the html content in cn1 project?

I want to view Html content in cn1 project, but the Html component and the webBrowser component of cn1 are all depreciated. The javadoc of BrowserComponent describes 'if you need wide compatibility ...
Daniel Tsai's user avatar
1 vote
1 answer
32 views

Problem with addactiolistener codename one

When I use this code: `TextField teno=new TextField(); teno.setHint("Input name"); Label l=new Label("") teno.addActionListener(click->{ la.setText(teno....
MaurizioMi's user avatar
1 vote
0 answers
29 views

Is there a way to create a simple custom tile images with codename one

I want to create a custom image gallery from capturing images on the device but I can not find a way to do it in Codename one, the openGallery() function is about selecting the images and not creating ...
TAO's user avatar
  • 180
1 vote
0 answers
64 views

iOS App crashes at startup when using Admob implementing CODENAME ONE banner through ios.googleAdUnitId

Now I am implementing Ads using Google Admob, I followed the CODENAME ONE Developer Guide. In Android, it is working fine since the beginning. iOS App crashes at startup.
Oscar Gabriel Naranjo Romero's user avatar
3 votes
1 answer
102 views

calling javascript function from java in Codenameone

**Update i clarified the question ** I am working on a Codenameone app with a local webpage. The webpage is a local html file and a bundle of javascript files. The webpage is loaded in the ...
user3025401's user avatar
0 votes
1 answer
67 views

Implementing auto-renewable subscription with promotional offer

We have a working auto-renewable subscription that gives a free trial using introductory offers for apple, but there are eligibility rules with this type of offer that doesn't satisfy what we need. ...
Renz's user avatar
  • 81
1 vote
0 answers
33 views

How do I get the true type font's height in iOS device?

I would like to get the height of a true-type font. public static Font font = Font.createTrueTypeFont("XXXXXXXX","XXXXXXXXXX.ttf").derive(36f, Style.UNIT_TYPE_DIPS); int height = ...
Daniel Tsai's user avatar

1
2 3 4 5
98