codenameone

Codename One Right side menu shadow is flipped

China☆狼群 提交于 2019-12-06 12:09:44
I've noticed using the latest build of Codename one. When my sidemenu (hamburger menu) is on the right hand side, the shadow image is flipped. Seems to be the case on the simulator and Android and iOS. I seem to remember I had to put in a work around to get this working recently, but that work-around doesn't seem to work anymore. I tried to replace the imahe using the theme constants, and also to turn it off by setting sideMenuShadowBool to false. but neither of these seem to do anything anymore. Screenshot: Code snipit (called on beforeShow for each form): private void setupTitleBar(Form f,

CodenameOne - Android push notifications support, without a pro account

♀尐吖头ヾ 提交于 2019-12-06 12:06:29
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 Also tried using some of the functionality for th pro account in order to add the right fcm dependencies

Codename one GPS provider and current location

风流意气都作罢 提交于 2019-12-06 11:39:51
问题 I am working on an iOS app with codename one. I want to get the current location and send it by SMS. I got this code from Java Android Studio, I don't know how to get the current location and also check if GPS is turned on. I tried below, but without success (I'm not sure how they start the GPS and get the location) LocationManager service = (LocationManager) getSystemService(LOCATION_SERVICE); boolean enabledGPS = service.isProviderEnabled(LocationManager.GPS_PROVIDER); if (!enabledGPS) { /

Is it possible to record audio in iOS with Codename One?

时光毁灭记忆、已成空白 提交于 2019-12-06 11:34:27
My app features a button to record audio (and another to play it back when the recording is over). I send the recorded audio files on a server. On Android the files is recorded as .amr (mime type audio/amr) and can be played back. On iOS however the file can neither be played back on the device (iPhone 4 or 4S) nor on a computer. ffmpeg -i reports [mov,mp4,m4a,3gp,3g2,mj2 @ 0x2fac120] moov atom not found 9gMjOnnmsj9JJZR3.m4a: Invalid data found when processing input Please note that VLC cannot play it either. I give the m4a extension because Voice recorder uses it (along with aac codec). Here

Will Parse4cn1 still work after Parse server retirement?

ⅰ亾dé卋堺 提交于 2019-12-06 11:24:30
I've been looking for a way to send push notifications to Android, iOS and Windows phone devices. I've come across the Parse4cn1 library. This library uses Parse. However i saw on the Parse site that they will retire soon. I have the following questions regarding the Parse4cn1 library and the retirement of Parse. Does the Parse4cn1 library still work after Parse's retirement? Do i need to setup my own open source Parse server to support the push notifications and when i do this does it also support push notifications for Windows Phone? ( http://blog.parse.com/announcements/parse-server-push

Use a Codename One app for a tv box with tv remote control

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 11:01:55
I tried to install a Codename One app on a tv box that runs Android 7. It works, except the fact that I cannot use the tv remote control to switch from a Button to another (I need to enable the mouse pointer simulation to tap the Buttons, that is not user friendly). Any idea to manage this use case? Or the problem is that I'm using a BrowserComponent? I’ve just published in the Play Store my first Codename One app for Android TV (I hope that it will be approved). I confirm that it can be used with the tv remote control if I do a simple navigabile UI, that can be tested in the Simulator using

How to use variables to refer to Components in codename one?

♀尐吖头ヾ 提交于 2019-12-06 10:35:42
I created a UI with the UIBuilder. Instead of always using the findXXXX () , I would love to do something like this in the Statemachine : public class Statemachine ... { private Container c; private Tabs t; initVars () { initAll(); } .... private initAll () { Container c = findContainer(); Tabs t = findTabs(); ... } } and use them as c.getYYY() . Is this possible? If yes, how? Yes you can do that, but not advisable. The danger of it is when you have 2 components with the same name on different forms, this may reference wrong component and may be hard to debug. If you sure can deal with the

How to get unique identifiacation number of iphone

牧云@^-^@ 提交于 2019-12-06 09:52:22
I want to get unique id of iphone.currently I am using Display.getInstance().getUdid(); but it gives different unique id each time I install an application on iphone. Can you please let me how to resolve it? You can no longer get the Unique id per device because of apples revised security policy . identifierForVendor is the best alternative you can go for. You can try UIDevice *device = [UIDevice currentDevice]; NSString *currentDeviceId = [[device identifierForVendor]UUIDString]; Abhishek B You can get it by calling this function: UIDevice.currentDevice().identifierForVendor getUDID() returns

Codenameone refresh list of images without reloading the page

情到浓时终转凉″ 提交于 2019-12-06 09:49:14
问题 I am Working on an app with requirement where we need to create a dynamic image gallery which refreshes after few minutes.When refresh happens three things should happen without reloading the page 1) Obsolete images should be removed 2) New Images should be added 3) Non Obsolete images should stay (not reload) 4) Images should be stacked next to each other as it will be mostly used on tablet I was looking at Boxlayout or FlowLayout and I can add the image but I am not sure how to delete it

Two Codename One Projects with Shared Code

谁说胖子不能爱 提交于 2019-12-06 09:32:31
I've got an app that has a pro and free version, both are almost identical and I'd like to have as much common code as possible to avoid copy & paste issues when moving from one project to the next. As far as I understand app stores recognize apps based on their package names but I understood that changing the package name of a completed app is difficult. Is there a best practice for such a situation? Currently the only thing I can think of is to try to move as much of the logic into a cn1lib file and have two separate apps. Other ideas/approaches would be appreciated. The cn1lib approach is