codenameone

CodenameOne - Android push notifications support, without a pro account

折月煮酒 提交于 2020-01-14 01:57:07
问题 So, I can't afford a codeameone pro account, so I implemented native push notifications for Android with GCM. After some struggle I had it working. Now GCM is deprecated and I want to migrate to FCM. However, I ran into some issues because codename one doesn't allow me to inject the right dependencies into the build.gradle file in order for the firebase app to initialize properly. I described those here: https://stackoverflow.com/questions/52278220/codenameone-firebaseapp-not-initializing

Only half of the letters of the component are seen - cn1

泪湿孤枕 提交于 2020-01-13 20:31:23
问题 I used bold ttf font and it works but only half of the letters are seen. Code: public void start() { if (current != null) { current.show(); return; } Label testLabel = new Label("Bold Font Not Working"); testLabel.setUIID("smallBold"); Form splashForm = new Form(new BorderLayout()); splashForm.add(BorderLayout.CENTER, BoxLayout.encloseY(testLabel)); splashForm.show(); splashForm.revalidate(); } UIID in theme for unselected, selected and pressed style How it looks now However without wrapping

Running app in IDE stops working

て烟熏妆下的殇ゞ 提交于 2020-01-13 20:02:43
问题 Last week I finished development on a test app and ran it successfully in all simulators. Today I decided to look at publishing the app and used "Sent Android Build". Build status "Successful". Then tried running jar from command line and got: peter@PeteSuse:~> java -jar "/home/peter/NetBeansProjects/mobile-apps/pGame/dist/pGame.jar" java.lang.ArrayIndexOutOfBoundsException: 0 at com.codename1.impl.javase.Executor$1.run(Executor.java:84) at java.awt.event.InvocationEvent.dispatch

Running app in IDE stops working

只谈情不闲聊 提交于 2020-01-13 20:02:08
问题 Last week I finished development on a test app and ran it successfully in all simulators. Today I decided to look at publishing the app and used "Sent Android Build". Build status "Successful". Then tried running jar from command line and got: peter@PeteSuse:~> java -jar "/home/peter/NetBeansProjects/mobile-apps/pGame/dist/pGame.jar" java.lang.ArrayIndexOutOfBoundsException: 0 at com.codename1.impl.javase.Executor$1.run(Executor.java:84) at java.awt.event.InvocationEvent.dispatch

Running app in IDE stops working

限于喜欢 提交于 2020-01-13 20:02:02
问题 Last week I finished development on a test app and ran it successfully in all simulators. Today I decided to look at publishing the app and used "Sent Android Build". Build status "Successful". Then tried running jar from command line and got: peter@PeteSuse:~> java -jar "/home/peter/NetBeansProjects/mobile-apps/pGame/dist/pGame.jar" java.lang.ArrayIndexOutOfBoundsException: 0 at com.codename1.impl.javase.Executor$1.run(Executor.java:84) at java.awt.event.InvocationEvent.dispatch

AES cbc padding encryption/decryption on cross platform (.net c# and codename one bouncy castle)

风流意气都作罢 提交于 2020-01-13 19:43:10
问题 Encryption/Decryption won't work in cross platform. I have used this link to encrypt/decrypt text using bouncy castle AES cipher within codename one. AES Encryption/Decryption with Bouncycastle Example in J2ME While from server side (.net) , i am using this link to implement same method. http://zenu.wordpress.com/2011/09/21/aes-128bit-cross-platform-java-and-c-encryption-compatibility/ now i am not getting any error but encrypted from codename one will not getting fully decrypted on server

Codename One - iOS build error at export step

℡╲_俬逩灬. 提交于 2020-01-13 06:10:29
问题 I'm currently developing a Codename One app using the new Google maps CN1lib, the cn1Filechooser, cn1JSON and the connectivity cn1lib. All Android builds work fine, but iOS builds crash since last week... I've got the error "IDEDistributionErrorDomain error 3" after the success of building the Archive, so the Export Failed and I can't deploy my app on iOS. I've already renewed all my iOS certificate via the CN1 certificate generator, nothing has changed... I've post the CN1 build hints and

Exception occured while dynamically changing cell values if overriding createCellConstraint(Object value, int row, int column) method of Table

人走茶凉 提交于 2020-01-06 15:13:00
问题 I have created the Table component by overriding two methods - createCell(Object value, final int row, final int column, boolean editable) method and createCellConstraint(Object value, int row, int column) . Below is the whole code I used for Table. String[][] tableData = { {"Density", "Volume Flow", "T (in)","T (out)", "Specific Heat", "Density", "Volume Flow", "T (in)","T (out)", "Specific Heat", "Duty", "UA"}, {"1","2", "3","4","5", "6", "7", "8", "9","10","11", "12", "13", "14"} }; final

Codename one - get value from text area using GUI(codename one designer) while coding using java coding on NetBeans

拥有回忆 提交于 2020-01-06 02:21:45
问题 For some reason I can't fetch value from a Text area called "txtNum1" and "txtNum2", am using "txtNum1.getText()" & "txtNum2.getText()" it can't even recognize "txtNum1" I used the GUI builder. Am I doing something wrong? protected void onMain_BtnAction(Component c, ActionEvent event) { String num1 = txtNum1.getText(); String num2 = txtNum2.getText(); calc(Integer.parseInt(num1),Integer.parseInt(num2)); } 回答1: Use: String num1 = findTextNum1(c).getText(); 来源: https://stackoverflow.com

Codename one separate class along with statemachine class

雨燕双飞 提交于 2020-01-04 06:50:50
问题 I am working a project in gui builder..As my project is growing bigger and bigger, i find it hard to search a particular forms and methods all in a statemachine class. so i wanted to create a separate class for each form. but since the gui builder create the methods automatically in statemachine which extends statemachineBase class. how can i use separate class for separate gui forms so that they automatically create methods in the designated class. for instance when i click before show event