codenameone

How to get my MapContainer bounding box in Codename One

早过忘川 提交于 2019-12-04 16:59:15
My Codename One app features a MapContainer. I need to show points of interest (POIs) on it which coordinates reside on the server. There can be hundreds (maybe thousands in the future) of such POIs on the server. That's why I would like to only download from the server the POIs that can be shown on the map. Consequently I need to get the map boundaries to pass them to the server. I read this for Android and this other SO question for iOS and the key seems to get the map Projection and the map bounding box. However the getProjection() method or the getBoundingBox() seem not to be exposed. A

Codename One - UITimer when the app is in backgroud or the smartphone is idle

这一生的挚爱 提交于 2019-12-04 16:33:41
This question is related to a previous one: Codename One - Notify something to the user every five minutes I discovered that UITimer doesn't work when the app is in background or when the smartphone is idle. Consider the following code (tested on Android): public void start() { if (current != null) { current.show(); return; } Form hi = new Form("Five minutes alert", BoxLayout.y()); hi.add(new Label("Alert every five minutes...")); Button button = new Button("Go to background"); button.addActionListener(l -> {Display.getInstance().minimizeApplication();}); hi.add(button); hi.show(); sound();

(Proguard) Server Build Error Codename One

主宰稳场 提交于 2019-12-04 16:27:43
After adding an Android Certificate in my project, the Codename One server started getting issues to build, then by asking the Codename One support, they told me it could be something related to the Proguard, so after disabling the Proguard by setting android.enableProguard=false which is not recommended right? So after doing it the Codename One server builds fine, but I want to keep the Proguard enable since it's the recommeded, but when I keep it enable the Codename One server gets build error with the following error log: https://s3.amazonaws.com/codenameone-build-response/d5f3c0c7-71a3

Insert data in codename one resource file in command line or directly

江枫思渺然 提交于 2019-12-04 14:12:31
I’am currently write an application and i need to put a content directly in the resource file (theme.res). How can I achieve this? What about the binary format of the resource file? Is it possible to achieve the same thing with the use of CodenameOne designer tool in command line? I want to put a localization bundle in the RES file with my custom app. Thanks! You can check the XML Team Mode flag in the designer tool and save. Once you do that you will see an XML file and a hierarchy next to it in the res directory. This will be used by the designer tool but is invisible to the build process.

How to add gradle library dependency to a codenameone project

好久不见. 提交于 2019-12-04 13:52:21
Normally in android I can just edit the build.gradle file and place my compile dependencies like this: dependencies { compile 'com.android.support:support-v4:23.+' compile 'com.google.android.gms:play-services-plus:8.3.0' compile 'com.google.android.gms:play-services-auth:8.3.0' compile 'com.google.android.gms:play-services-base:8.3.0' } How can I add a compile dependency in a codenameone project? The generated project utilizes the jcenter() repository. In order to add a compile dependency you will need to use the 'gradleDependencies' build hint, for example: gradleDependencies=" compile 'com

Google material design in codenameone

自闭症网瘾萝莉.ら 提交于 2019-12-04 12:53:55
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 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 but the question is a bit vague. 来源: https://stackoverflow.com/questions/35025849/google-material-design-in

AdMob ads not showing in iOS

独自空忆成欢 提交于 2019-12-04 12:50:26
AdMob ads are not showing for iOS builds in the last couple of days. It used to work and I didn't change anything. iOS - 9.3.5 IDE - NetBeans 8.0.2 CodenameOne Plugin - 3.5.2 OS - Windows 7 Google deprecated the old admob library and discontinued it. We need to update to the latest version for ads to keep working. We plan on updating the cn1lib within the near future, I'm assuming that is the implementation you are referring to. AdMob ads are not showing because for iOS 9 http URL’s are blocked by Apple. They show up by using the build hint ios.plistInject=<key>NSAppTransportSecurity</key>

How to make a round Progress Bar in codename one?

霸气de小男生 提交于 2019-12-04 12:44:24
I want to create a round progress bar, depicting the current status in percent in its mid. like this: now I already followed the instructions on creating a flat progress bar , but as I am not familiar with swing and I don't have any clue of Javas graphics, I have no clue how to transfer from the 'flat' to the 'round' progress bar. How could a code similiar to the progress bar look like? ps: I saw Hannahs post on the analog clock and tried it like this - but failed due to my lack in painting (and maybe mathematical) skills. pps: I don't use the GUIBuilder at all (bare bones) ppps: I want it to

CodenameOne background task for BluetoothLe connection

落爺英雄遲暮 提交于 2019-12-04 12:29:53
I am developing an app using Codename One, which connects to a Bluetooth LE proprietary external device and logs received data (on average data arrives approximately once per second). I am using the Bluetooth LE CN1 library (a wrapper for Cordova Plugin ). The app should be able to receive and log the data even when not in foreground, which I have no idea how to do in CodenameOne in a way that the system wont shut it down on its own. I've written a native Android app, where I use a service with a persistent notification for the duration of the connection with the external BTLE device - the

How Does a Codename One Update “Work”

回眸只為那壹抹淺笑 提交于 2019-12-04 11:47:54
A recent question in the Codename One discussion forum raised a question I often face when I'm waiting for a fix. Sometimes the Codename One team indicates a fix would be coming in a couple of weeks and other times they indicate that its already fixed. Some of that opacity obviously relates to the update of the cloud servers but its unclear for me whether its just the cloud server & the plugin or is there something that I'm missing. Why isn't there a single update process? I'd really like a more definitive answer like How does Codename One work? for this. Codename One is comprised of several