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.
4,892
questions
1
vote
1
answer
21
views
Build Errors when implementing native code
for background this is a continuation from this previous question where it was recommended to take the below approach.
I am implementing the native android code below to call for biometric ...
1
vote
1
answer
25
views
How do I eliminate the afterimage when I showback a form?
How do I eliminate the afterimage when I show back a form? Please reference the images below.
Or can I remove the animation of showing back?
Before showback()
During showback()
After showback()
1
vote
1
answer
27
views
Styling a ScaleImageButton
Can anyone please advise me how to style a ScaleImageButton so that a semi-transparent overlay is displayed over the image to show the button is pressed (similar to that of a Button)?
My ...
1
vote
1
answer
21
views
Adding more than one gradle dependency
I've added a dependency to a via the build hints
android.gradleDep=implementation("androidx.biometric:biometric:1.1.0")
I'd like to add another
android.gradleDep=implementation("...
1
vote
1
answer
79
views
How do I implement Android native code that includes "this" and "MainActivity.this". Using import com.codename1.impl.android.AndroidNativeUtil;
I am implementing the native android code below to call for biometric authentication with device pin/pattern/password as a backup. I've used the below code in android studio and it works with ...
1
vote
1
answer
42
views
How do I rotate text string?
How do I rotate a string to 90 degrees? The code doesn't work.
Transform transform = g.getTransform();
g.rotateRadians(1.571f); //90 degree
x = getX();
y = getY();
g.drawString(&...
0
votes
1
answer
94
views
Upgrade to a newer com.google.android.gms SDK version - Codename One
I am trying to publish a Codename One app bundle in play store and I cant because they are giving me this error.
"The developer of Maps SDK for Android (com.google.android.gms:play-services-maps) ...
1
vote
0
answers
27
views
Intermittent issue - NullPointerException after period of inactivity, often after orientation change on iOS devices only
I have been receiving NullPointerException reports as per below. Often they occur just after the device orientation changes. example report below: -
[EDT] 11:19:53,486 - Orientation changed to ...
0
votes
1
answer
21
views
theme.res getting corrupted when i rebuild the project which used to work using JDK 8
I see theme.res being corrupted continuously and threme.res replaced with corrupted version in the project. Following is the message from console. Please let me know what can be done on this -
...
1
vote
1
answer
29
views
Codename One - Upgrade to JDK 11
I'm seeing the following error after upgrading the project to JDK 11. I have updated the CN1 Libraries from Extension Manager already and codename settings (codename1.arg.java.version=11) file with ...
1
vote
0
answers
100
views
Getting "cannot find symbol" when trying to add label
I have used System.out.println() to verify my search is returning the index to the container on the grid I need, and that .getComponentAt(the returned index) is returning the correct container as Shai ...
2
votes
1
answer
30
views
How do I send an event to a component?
I have a button btn that doSomething() in response to a long-pressed event.
Button btn = new Button("do Something button");
btn.addLongPressListener(new ActionListener(){
@...
1
vote
1
answer
40
views
How do I spotlight a component and show hint on a dialog?
I have a specific container on a form. I want to pop up a dialog and show the container with hints on the dialog. Please reference the image below.
1.Capature outlook of the container as an image and ...
1
vote
1
answer
24
views
Components not displayed properly within containers in Codenameone
I have an issue with Codenameone not displaying components as a solid color image label within a container. It displays fine if the image is created from an actual photo.
This does not work (...
1
vote
1
answer
51
views
How do I change UI language more effieicntly?
I changed the UI language by code below
UIManager.getInstance().setBundle(theme.getL10N("L10N", language));
Should I recreate all components on the UI to change the language?
Are there any ...
1
vote
1
answer
30
views
How do I remove specific components from the sidemenu?
I added components to sidemenu by the code below
getToolbar().addComponentToSideMenu(btn1)
How do I remove btn1 from sidemenu?
0
votes
1
answer
31
views
Codename One Container in Y-Layout not scrolling when using UIID
I am preparing an Android app that is using a container in Boxlayout.y.
When using the code example from here , scrolling the container content in x-direction works beautifully.
But when I change the ...
1
vote
0
answers
36
views
Codename One - server build fails
I have an existing Codename One project that has built successfully in the past. I've made changes to the project and the most recent build fails. I went back to the most recent version that DID build,...
1
vote
1
answer
19
views
Padding issue with TextFields
I have added 2 containers to East to try and force Preferred Height, with the results the same as without the 2 containers, as shown in the image I attached . Anybody have any ideas.
1
vote
1
answer
22
views
How do I use glass pane but also allow a user entering data in a specific UI component but disable all others?
I would like to design tutorials in my cn1 app. I can have an instructor painted on the glass pane to direct a user to enter required data in UI components step by step.
Can I have a glass pane and ...
1
vote
1
answer
36
views
How do I change the background color of a specific UIID in theme and all UIIDs derived from the specific UIID are also changed?
I have a theme in my cn1 project. I would like to provide color-style selections to my users.
I only have one theme file in my project.
How do I change the background color of a specific UIID in the ...
1
vote
0
answers
38
views
Codenameone NFC TAG Writer Native Interface call Tag is null Error [duplicate]
I wanted to write to an NFC tag using a call to the native interface
Here is my Native impl file for android
The entrypoint function is bindNFCwriter().
public class NewInterfaceImpl {
public String ...
1
vote
2
answers
96
views
Codename one upload image to S3 bucket
I am trying to upload an image to my s3 bucket in my codenameone project as per the thread below,
Codename one upload image to S3 bucket permission
But unable to do so. Getting connection error code ...
1
vote
0
answers
56
views
Codename One - error: package com.google.protobuf does not exist
Further to Codename One - ProGuard - Duplicate jar entry. I've created the native interface and can build and run the code in NetBeans and the Simulator. I've now created similar code under the ...
1
vote
1
answer
41
views
Android Build Hint android.xactivity Error (using NetBeans)
I tried to add Native Android Activity. I did
android.xactivity = <activity android:name="com.appne.exam.NFCActivity" android:label="@string/app_name"><intent-filter>&...
1
vote
2
answers
47
views
java.lang Error Message after adding textbox to my class in Codename One Project
Using NetBeans 18, developing a Codename One app built with Initializr.
I got my last issue resolved by re-creating the project and transferring everything in. Now that I started adding elements, I ...
1
vote
0
answers
20
views
NetBeans accepting top folder as project folder
Has anyone had success getting NetBeans to accept the top folder of a Codename One Initializr Project as the project folder? Because NetBeans doesn't recognize the folder, I get an error that the pom....
1
vote
1
answer
50
views
LocalNotification: Notification with vibration and floating message whit Codename One
I need my application to show a notification when the application is in the foreground. I have two problems.
1) I wish that upon receiving the notification a vibration is emitted. I don't know how to ...
1
vote
1
answer
29
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....
1
vote
0
answers
18
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 ...
1
vote
1
answer
17
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....
1
vote
1
answer
18
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 ...
1
vote
2
answers
187
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 ...
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 ...
0
votes
2
answers
41
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 ...
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 ...
1
vote
1
answer
127
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 ...
1
vote
1
answer
21
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 ...
1
vote
1
answer
63
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 (...
3
votes
1
answer
813
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 ...
1
vote
1
answer
48
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, ...
1
vote
1
answer
30
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 ...
1
vote
0
answers
25
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 (...
1
vote
0
answers
31
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 ...
1
vote
0
answers
41
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 ...
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 ...
1
vote
2
answers
57
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 ...
1
vote
0
answers
24
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 ...
1
vote
2
answers
95
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 ...
1
vote
1
answer
28
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 ...