How I can access to the webcamm in cn1 windows desktop build? - windows

anyone knows how to use my webcam when I capture a photo. I build my app for windows desktop in codenameone. I have a pro account and I need it for a proyect.

The desktop build just uses Java SE which is packaged with the app. Unfortunately JavaSE or JavaFX don't provide webcam access out of the box and the solutions that allow this are pretty complex.
You can use native interfaces which in the JavaSE port just invoke plain Java and try to make use of a project like this: https://github.com/sarxos/webcam-capture/
Alternatively, HTML5 does have camera capture builtin so we support this in the JavaScript port see: https://www.codenameone.com/demos-Camera.html

Related

How Qt platform plugin could be initialized in Google Colab?

I got the following error while using Google Colab:
qt.qpa.xcb: could not connect to display
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "/usr/local/lib/python3.7/site-packages/cv2/qt/plugins" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: xcb.
Please help me find a replacement for qt?
Having the same problem, and I think I found the answer.
Basically not possible to run QT on the cloud!
"QT is a GUI library that can run only on your local machine. You cannot run it in the cloud and then let it open a QT window on your machine.
You may need to find another labeling library that use web-interface instead."
check this out:
Could not connect to any X display: Google Colab Run-time
Actually you could make it work with the right platform plugin. By passing for example -platform vnc to your application you should be able to start it in "headless mode". (actually your GUI is drawn to a VNC server you can connect to)
Your error is caused by the absence of a window manager, the xcb platform is trying to access.

Converting Online Express App to an Offline App for distribution

I have been trying to convert my express app with a backend that requires specific dependencies that users need to access to be an offline app on Windows, which is currently distributed online by building a docker image out of it and deploying it to Google Cloud Run.
My plan was to use electron and let the installer force the users to install Docker Desktop since the application requires dependencies that are only available in Ubuntu (and in this way, I only need to use my Docker image to distribute it).
I know that it is a bad idea to let users install Docker. And I am here, after researching for a week, to sincerely ask for your help on what would be the right direction to convert it offline.
Do I really need to refactor my application to be Windows compatible, or is there a way where I can use my existing implementation without using Docker? **
*Edit: Specified that my app has a backend that requires specific dependencies that users need to access. Credits to #super.

Accessing the desktop API from a Universal Windows App to use a scanner

I want to be able to scan a document with my universal windows app.The problem is that The Windows.Devices.Scanners APIs are part of the desktop device family.
Is there any way to check if the app is running on a desktop, and use these API's in that case?
Any other solutions or ideas would be welcome

How to install application on real android phone

I have created one SMSapplication and i need to test it on my android phone.
i have already tried other options like enable USB debugging in manifest file and also device
but it's not working.. any other option. pls help me..
Install USB drivers on system, you can use following link for refence of steps and driver links:
http://developer.android.com/sdk/win-usb.html
If you still facing issue, see following article.
http://appsandroid.in/connect-android-phone-to-pc-laptop-computer-mac-vi-usb-cablea
Once connected to system, To install application on device see, link:
http://www.talkandroid.com/guides/beginner/install-apk-files-on-android/#.TzZn2chG2nA
first of all, you need to get the driver of your phone.
then, you need to set your phone on debugging mode as follows:
settings > applications > development > check the debugging mode box.
if you are using eclipse then, go to run > debug configurations > testing >under the target tap make it manual to be able to choose your device ....
if still not working, connect your phone to the pc as a mass storage and copy the .apk file to it and then install it.
You have to package the application to an .apk file.
About that, the best solution is probably to take a look at the developpers' documentation -- the Preparing for release section should be kind of a good start.
Then, upload that .apk to your phone (using the USB-mass storage feature, for example ; or using FTP/samba applications) like you would do for any other file.
And, finally, open that .apk using some file-explorer application ; which will propose you to install it.
Note that it is also possible to debug on a real device (instead of using the emulator) ; Using Hardware Devices should be what you'll want to read, about that.

How to port an Apple Dashboard widget to Windows?

I made visual aid type of widget (user needs to see through it) with Dashcode, now I want to port it to Windows XP & 7.
I heard that StarDock DesktopX Pro can export standalone widgets as .exe but I don't know if those are native Windows widgets.
Is there a Dashcode equivalent for Windows? (I happen not to know JavaScript !)
There is no Dashcode equivalent for Windows, the Windows "widgets" that exist currently are just packages of HTML/JS/CSS and as far as I have seen do not have a widespread adoption rate.
If you are looking to do something like an overlay then a "widget" in the Windows environment is probably not the correct route. You would be better off writing a native application.
An exported .exe from DesktopX is not a native Windows gadget. It's either a self contained application, or it require DesktopX client to be installed. ( Depending of which variant you export. )
You can however export a .gadget which will act as a Windows gadget. Here's a quick tutorial article: http://www.wincustomize.com/article/155475

Resources