codenameone

CodenameOne - FirebaseApp not initializing

狂风中的少年 提交于 2019-12-06 09:27:33
问题 I'm trying to swith from gcm to fcm. I've followed the steps detailed in the gcm to fcm migration guide, although the FirebaseApp doesn't initializes. I have identified couple possbile issues, however codenameone doesn't help solving them. Apparently, google-services needs to be added to the buildscript dependencies, like this: buildscript { repositories { ... } dependencies { classpath 'com.android.tools.build:gradle:2.3.3' classpath 'com.google.gms:google-services:3.0.0' // NOTE: Do not

Alternative Methods in codenameone

流过昼夜 提交于 2019-12-06 09:13:49
I have been designing an application using CodeNameOne via Netbeans and have encountered some issues, notably the "cannot find symbol" compile-error. After further research, I discovered that it was due to CNO not supporting certain libraries/misc. I was wondering if there were alternate ways to use the following libraries/perform tasks: (Read from file) import java.io.File; symbol: class File location: package java.io (Throw FileNotFoundException) import java.io.FileNotFoundException; symbol: class FileNotFoundException location: package java.io (Read data) import java.util.Scanner; symbol:

extra side menu in codename one app

北城以北 提交于 2019-12-06 08:46:39
In my app I have a right hand side menu. But there also seems to be a left hand side menu, only containing the back button. There is no menu button (with three horizontal lines), but if you touch the left edge of the screen and drag in the menu appears. I can't see why it's being created, but is that any way to disable or remove it? 来源: https://stackoverflow.com/questions/44233893/extra-side-menu-in-codename-one-app

Google material design in codenameone

心已入冬 提交于 2019-12-06 08:22:48
问题 Does codenameone has support for Google material design,if yes help me with a sample code on how to use (both icon and font) it in my app. Thanks 回答1: Not every element of Material design is supported but the fonts (roboto) etc. will be used when you pick the native: fonts in the Designer tool. You can also use all the material design icons using the FontImage class see https://www.codenameone.com/blog/material-icons-background-music-geofencing-gradle.html There are quite a few other things

Codename One - Correct use of the Picker

天大地大妈咪最大 提交于 2019-12-06 08:13:41
I'm trying to do a clear question about the use of the Picker, because my previous one in not enough clear: Codename One - addActionListener of a Picker The purpose of the Picker is to select one element from a set, such as a string of a set of strings, is it right? So, I want to give the user the opportunity to select a string from a set of strings, each of one corresponds to a language. The problem is that the use of an ActionListener added to the Picker is not correct for this purpose, because it's triggered by both "Ok" and "Cancel" buttons. I need to execute some code (to change the

Is it possible to make rounded image (via mask) on Multibutton (Codename One)

混江龙づ霸主 提交于 2019-12-06 08:10:57
I have an InfiniteScrollAdapter in which I use Multibutton to display a list featuring a photo and its description. It works well but I need to make the photo rounded. That's why I got inspired by the official guide on image masking. Unfortunately what I get is only a black round. Here is the code I used: MultiButton[] cmps = new MultiButton[reports.size()]; for (int iter = 0; iter < reports.size(); iter++) { Report currentReport = reports.get(iter); if (currentReport == null) { InfiniteScrollAdapter.addMoreComponents(this.getContentPane(), new Component[0], false); return; } String

How to read nested JSON in Codename One

£可爱£侵袭症+ 提交于 2019-12-06 07:50:47
I have been following the instructions here: https://www.codenameone.com/javadoc/com/codename1/io/JSONParser.html to retrieve a value from a json file. I have managed to read the top level value of my json content - however I cannot see how to read the value of a nested tag e.g. using this file ... { "glossary":{ "title":"example glossary", "GlossDiv":{ "title":"S", "GlossList":{ "GlossEntry":{ "ID":"SGML", "SortAs":"SGML", "GlossTerm":"Standard Generalized Markup Language", "Acronym":"SGML", "Abbrev":"ISO 8879:1986", "GlossDef":{ "para":"A meta-markup language, used to create markup languages

Implementing WebRTC on WebView with Codename One

扶醉桌前 提交于 2019-12-06 07:39:22
I'm developing an app which I need to include WebRTC using the WebView of Android. According to this article: [ https://developer.chrome.com/multidevice/webview/overview] it is fully supported since WebView v36. (I'm testing on an Android 5.1.1 / Chrome 54 / Mobile Safari 537.36. And I confirm that it works on the standalone Chrome browser). As of now, viewing of WebRTC works. However, broadcasting (capturing video from the camera and sending it to the server) does not work . Note: it works on the standalone Chrome on the same Android. I've included all these permissions in the codenameone

App freezing after several restarts

戏子无情 提交于 2019-12-06 07:24:27
I built this app that takes pictures, displays them for acceptance and uploads them to a webserver via post. It is very simple in concept and execution. But then the app is freezing in the Android handset (I have an Xperia Z3+ which i has a fairly good amount of resources, also tried in a Moto X). To try and reproduce this I take a picture (it will automatically tried the upload)... push the power button for the screen to shutdown... then when I light up the screen it takes a while for the app to start working again (I can see because I have a background animation). After some retries of these

How to remove a command added to the Toolbar using addCommandToRightBar(Command)?

风格不统一 提交于 2019-12-06 05:52:21
after having added a command to the Toolbar using addCommandToRightBar(Command), I want to remove or hide the command again (e.g. when I select/unselect on a specific tab in Tabs). In the SideMenuBar there is removeCommand(Command) for this, but I can't figure out how to do the same for Toolbar. Any suggestions how I can achieve this? Thanks removeCommand works but you should remember to revalidate() : Toolbar.setGlobalToolbar(true); Form hi = new Form("Bar"); Command cmd = hi.getToolbar().addCommandToRightBar("Bla", null, (e) -> Log.p("Bla")); hi.getToolbar().addCommandToLeftBar("Remove",