codenameone

unable toncomplete build on adding android certificate

£可爱£侵袭症+ 提交于 2019-12-07 23:45:07
问题 I just finished building my app and I sent a build with no certificate and it worked...now on adding an android certificate, it reports a build error on my codename one dashboard. A help will be appreciated. FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ' :transformClassesAndResourcesWithProguardForRelease'. > java.io.IOException: Please correct the above warnings first. Warning: Exception while processing task java.io.IOException: Please correct the

Internal compiler error when UseDotNetNativeToolchain is true

妖精的绣舞 提交于 2019-12-07 23:29:31
问题 I have a UWP app that compiles successfully if I have UseDotNetNativeToolchain off. But when I turn it on, it gives me the cryptic error: Internal compiler error: Object reference not set to an instance of an object. UWPApp C:\Program Files (x86)\MSBuild\Microsoft.NetNative\x86\ilc\IlcInternals.targets 887 Build This is all it gives me. What could be causing this? How can I drill down on this. Using VS2015 Here is the full build output in case that helps: https://gist.github.com/shannah

Codename One APK Manifest for Android TV: build hints

筅森魡賤 提交于 2019-12-07 22:47:24
This question is releated to: Codename One APK Manifest for Android TV I found some documentation here: https://developer.android.com/training/tv/start/start In this documentation, it's written that If you do not include the CATEGORY_LEANBACK_LAUNCHER intent filter in your app, it is not visible to users running Google Play on TV devices. I tried to use the following two build hints (with include sources): android.xpermissions=<uses-feature android:name="android.software.leanback" android:required="false" /><uses-feature android:name="android.hardware.touchscreen" android:required="false" />

android calendar permission issue

倖福魔咒の 提交于 2019-12-07 20:16:56
问题 I am trying to access the android device calendar, which fails with this exception I added this exact build hint to the codenameone_settings.properties file: codename1.arg.android.xpermissions=<uses-permission android:name="android.permission.READ_CALENDAR"/> <uses-permission android:name="android.permission.WRITE_CALENDAR"/> Is there something I am missing? 回答1: This is caused by the new Android security permission in API level 23. You can set your app to use API level 21 by adding the build

Placeholder scaling issue with URLImage in landscape mode

本秂侑毒 提交于 2019-12-07 19:53:12
问题 I scaled the placeholder to the screen size as below. But if it is first viewed in portrait mode, it just takes the screen and doesn't cover whole screen in landscape mode. If it is 1st viewed in landscape mode, then it appears bigger than the screen size in portrait mode. How do I fix this problem. I checked in PropertyCross demo and the same issue exists there too. private EncodedImage largePlaceholder; protected void initVars(Resources res) { Image tmp = Image.createImage(Display

generate SHA1 hash function in Codename One

二次信任 提交于 2019-12-07 19:34:27
问题 I need to generate a hash function in CN1. I added the BouncyCastle library, but I don't know how to use it. After searching a lot, I found some examples and came up with this: @Override protected void onMain_ButtonSHA1Action(Component c, ActionEvent event) { String data = "XXXXXXXXXXXXX"; SHA1Digest sha1 = new SHA1Digest(); try { byte[] b = data.getBytes("UTF-8"); sha1.update(b, 0, b.length); byte[] hash = new byte[sha1.getDigestSize()]; sha1.doFinal(hash, 0); labelX.setText(hash.toString())

how can two sidemenus be used in codenameone?

五迷三道 提交于 2019-12-07 18:38:55
问题 I want to add sidemenus at both left and right side.How can it be done in codenameone ? getToolbar().addCommandToSideMenu(new Command(" Menu 1 ")); I can left sidemenu by using above code and i want to add that on right also. 回答1: The Toolbar class no longer supports the right side menu. This functionality has always been problematic and was deprecated a while back. We might re-introduce it with the new "on top" side menu rewrite but right now that functionality is too new. 来源: https:/

CodenameOne - Android app fails to start when building with android.buildToolsVersion=27

孤街醉人 提交于 2019-12-07 17:28:27
I'm using gcm and the app failed to start due to this error: AndroidRuntime: java.lang.IllegalAccessError: Method 'void android.support.v4.content.ContextCompat.()' is inaccessible to class 'com.google.android.gms.iid.zzd' (declaration of 'com.google.android.gms.iid.zzd' appears in /data/app/net.segoia.opengroups.mobile-1/base.apk:classes2.dex) This was caused by this line: InstanceID instanceID = InstanceID.getInstance(this); The problem is that when building for api level 27, support for android v4 is dropped. What solved the problem is adding these two build hints: android.supportV4=true

FileSystemStorage.delete() doesn't delete captured files on ALL android devices?

别等时光非礼了梦想. 提交于 2019-12-07 17:28:26
According to this https://github.com/codenameone/codenameone/issues/411 (April 2015) it is the expected behaviour that the captured image are not deleted via FileSystemStorage.delete() in Android 4. That's what I get with my 4.4 device (CN1 version 3.4). Is it what will happen on every Android devices ? Is there a workaround to actually delete these captured photo programmaticaly (ie from my app) ? NB : as reported in the link above it works seamlessly in the simulator. Thank you, Cheers That's an OS limitation. Apps are isolated from system services. It might be possible to do that with the

Why is Codename One on iOS recording audio as CAF?

耗尽温柔 提交于 2019-12-07 15:07:19
My question is related to this other SO question . I am trying to record audio in iOS via Capture.captureAudio() . It outputs an audio file that can be read on the computer but neither on iOS (iPhone 4S) nor on Android. ffmpeg -i yields : Input #0, caf, from 'myFile.m4a': Duration: 00:00:07.04, start: 0.000000, bitrate: 37 kb/s Stream #0:0: Audio: aac (aac / 0x20636161), 16000 Hz, mono, s16, 23 kb/s If I record a file with iOS via Voice Recorder app I get from ffmpeg : Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'Test.m4a': Metadata: major_brand : M4A minor_version : 0 compatible_brands: M4A