Codenameone: Adapting the app when iOS dark mode is activated - codenameone

Does anybody know if there is a way in an CN1-App to find out, if the iOS dark mode is activated?

Not at this time. It's something we'd like to add in the future possibly as a cn1lib. You can probably implement this yourself using a native interface e.g. by using something like this: https://stackoverflow.com/a/59431185/756809

Related

Is there a way to detect Android's dark/night mode?

Is there a way to detect Android's dark/night mode? Additionally, is there a way to inherit dark styles?
I see a build hint here android.theme that can be light or dark. Its description also says it might be dark in the future but no further explanation is given
Thanks
No. These are both things that we need to provide a better solution for on iOS and desktop too. I suggest filing an RFE for this.
That build hint is part of a legacy from the Android 2.x days and shouldn't be applicable.

How to lock screen orientation in Dart

How to lock screen orientation?
Tried this code, but seems, that I use it wrong... Cause it doesnt work on my android smartphone...
window.screen.orientation.lock(window.screen.orientation.type);
There is currently no way to do that in Dart.
https://github.com/flutter/flutter/issues/6381
The issue also contains links how to do that in platform native code.
You can make such native available to Dart using a plugin https://flutter.io/developing-packages/#plugin

How to Implement Fingerprint Lock Screen in Codenameone

Does anyone have an idea to implementing lock screen that uses fingerprint to unlock the screen on a codenameone app. Any ideas at all will be welcomed. Majority of ideas i have seen are basically cheat concepts that does not implement the concept. You ideas, resources, links etc are welcomed even if it requires a 3rd party service butt I think java native code may be able to do this, i just dont have a clear idea yet.
Global lock screen can't be implemented in Codename One since its very specific to Android and has no portable alternative. You might as well just write a native app.
You will need to write a native interface to access the fingerprint reader hardware:
https://www.codenameone.com/how-do-i---access-native-device-functionality-invoke-native-interfaces.html
https://www.codenameone.com/blog/integrating-3rd-party-native-sdks-part-1.html
Using the native touch ID should be pretty strait forward e.g.: http://www.devfright.com/touch-id-tutorial-objective-c/

Using libvlc on android with NDK

I am currently messing around a bit with libvlc on android using the NDK.
Well, I understand how to use native C code in an android app.
Now I would like to use the libvlc library to make a simple player which would read data from a socket.
Is it possible to use libvlc at that level? The problem I see is when it comes to set a window handler for libvlc to draw the image on.
Has anyone experienced with this that could give me some feedback?
Thank you.
You might be interested in this - https://bitbucket.org/tewilove/nyan.tv-jni/src
Edit: Looks like the nyan.tv link doesn't exist anymore. A possibly more 'official' sample is here -> https://bitbucket.org/edwardcw/libvlc-android-sample

Disable monitorOrientation in sencha touch

How to disable monitorOrientation property in sencha touch globally?
Please help.
If by disable you mean prevent the orientation from changing then it cannot be done in a clean way (at least on the iPhone platform).
You could (possibly) investigate the idea of re-oritentating the display when the orientation changes as described here, although I'm pretty sure iOS won't let you prevent it (you may have some luck with Android)
This thread poses a similar question.
You can disable, block the orientation in portrait/ landscape or other using :
For Android if you open with Eclipse: The AndroidManifest under your "Application Nodes" => Screen Orientation
For all system (IOS, Android, BlackBerry, WebOS ... ) : You can do this using Phonegap : it let you encapsule your app in a WebView using HTML5.
You just have to create a config.xml like this : https://build.phonegap.com/docs/config-xml
and add this : in the balise.
Next, you just have to compile your app using http://build.phonegap.com . It's free, easy and fast to use.
Hope this help you ;)

Resources