Overaly image functionality for cn1-codescan lib - codenameone

I am using this lib https://github.com/codenameone/cn1-codescan to scan QR codes in my application.
As I understand there is no functionality to change scanning/camera view right now in this lib
Currently, scanning view for Android it is just fullscreen camera view and for iOS smth like this http://zbar.sourceforge.net/iphone/userguide/scanning.html
Is there any way to add an overall image or change that camera view? Or is there any plans to add some LayredPane to the camera view in this lib?

This won't work for cn1-codescan since that library is implemented as an external native view. So we're effectively leaving Codename One to perform the scan. You can implement this natively within the library.
Alternatively you can build a library that uses a widget approach instead of moving to a separate activity/view like the current solution. If it uses a peer component (like the camera kit or the Google Maps cn1libs) then you can implement overlays in Codename One.
Notice that we only use zbar on iOS and on Android we use an activity which uses an external app to do the scanning. There's a 3rd party QR scanner (from Little Monkey) which embeds an Android implementation into the cn1lib. I'm not sure about the overlay implementation there.

Related

using libchromiumcontent to render user interfaces

I would like to be able to render user interfaces for cross-platform audio plug-ins (VST, audiounit) on desktop machines using HTML UI, in a similar approach to this project https://github.com/russellmcc/audiounitjs
Unfortunately native web views are significantly different [and particularly limited on windows].
I'm investigating whether I can use libchromiumcontent from the electron project to do this, but I can't find a basic tutorial that looks appropriate e.g. a basic c++ app rendering a UI using HTML. I'm not even sure if that's gonna be possible. Perhaps I have to wait for mozilla's servo? because I am developing audio plug-ins, the plug-in host controls the main application loop. Does this means I cannot use libchromiumcontent?
thanks

How to embed the camera screen in the part of the main form?

I've some trouble regarding camera feature in codenameone.
I can use camera as full screen as follow:
com.codename1.capture.Capture.capturePhoto();
This opens full camera screen, however, I want it to be embedded in special part(e.g. square) of the main form.
I've heard native interface is needed for this. But I couldn't know the detail source code.
Is there any way to do this or to get any source code?
(PS: I'm looking for the solution for iOS/Android.)
This is now possible with a new cn1lib: https://github.com/codenameone/CameraKitCodenameOne
Original answer below:
Codename One didn't support z-ordering of peer components until recently so this was not reasonably possible until a couple of months ago when we introduced that feature.
This is now available in all supported Codename One platforms and thus it should be possible to create a cn1lib that will allow you to do just that.
We hope to build such a cn1lib ourselves but with our current workload I'm not sure when we'll get around to do it.

how can i implement first person controller movement touch keys for android devices in unity 4.5

i'm new to Unity . i have a simple Terrain in my unity project. what is the simplest way to implement touch joystick buttons to my project so mobile users can move around with?
something like this
mobile movement joystick example image
when i export my project for PC it works fine by keyboard keys but what about android/iPhone users?
You need a Virtual JoyStick. Simply posting code here is not enough to get you started. Watch this video, it shows how to make one from start to finish.
For more examples about moving the character, look at the code in this question. The question contains code for moving the character with the keyboard and the answer explains how to move it with touch (Virtual JoyStick) on Android.
I think that you have a built-in way to do this. Alternatively, you can take a look at the Asset Store, it's a great place to look for piece of codes, assets and stuff.
For example you can use in your project these free assets: CN Controls , Standalone Multi-Touch Input Module

Rotating a map using leaflet js library

I need a map rotation feature just like the one available from openLayers 3 (check example below):
http://ol3js.org/en/master/examples/drag-rotate-and-zoom.html
Is there a way to do the same thing using the leafletjs library, or perhaps, using a custom plugin?
Leaflet doesn't currently support map rotation, because it wouldn't be supported by its full range of browsers. This also isn't supported by plugins, since rotation logic would need to be implemented in Leaflet core.

Appcelerator Titanium external libraries

I am using appcelerator titanium and i am trying to build a mobile app that allows you to change an imageview brightness and contrast by using touch events.
It is not possible by using Titanium standard features, so i am guessing if i can import some external libraries like pixastic that can help me do so.
is it possible? how can i do that?
Thanks
sure. pixastic is a javascript library so just include it with
Ti.include("path/to/pixastic");
if you intent to write a native code for your algorithms you can enrich your project with a objective-c module (or java module).

Resources