Problem emulating phone camera with a normal USB webcam - xamarin.forms

I'm developing a simple Xamarin Form using VS2019 and Oreo as simulated android.
I would like to use my USB Logitech Webcam 200 in order to simulate phone camera.
This basically to avoid the deploymnet of the app in the phone with USB and save time.
I've configured the ADM adding hw.camera property and enabling it. Than i've tried to set hw.back.camera to webcam0 and hw.front.camera to none, but when i open camera in the emulated device it gives an error and camera app crash, also my app doesn't work.
I've tried to check the log and mainly i've found: E/CamDev#3.2-impl(1393): open: cannot open camera 0!
My webcam is good and drivers are installed on my win10 (i use it regularly with Skype and other apps).
I also tried with VS2017 in my PC and also tried in another PC with VS2019.
Any idea?
Thank you.

Related

Xamarin.Forms/Xamarin.Android deploy app on a physical smartwatch device

My question
I would like to know if any of you know how to put a Xamarin.Forms/native Xamarin.Android application from Visual Studio on a physical smartwatch. I have consulted various sources, but have not made any progress. Also in Visual Studio, the smartwatch does not appear in the list of connected devices. The smartwatch is a Samsung Galaxy Watch4 and runs on Wear OS 3.2 (Wear OS 3 is again based on Android 11). I also connected the smartwatch to my laptop via a bluetooth connection, but despite this connection I still don't see the device listed (I tried it in both a Xamarin.Forms project and a native Xamarin.Android project). Furthermore, I activated the Developer Options on both the smartwatch and the smartphone, with USB debugging turned on. On the smartwatch I also turned on the 'Debug via Bluetooth' option just in case.
Required SDK tools are installed in Visual Studio, the smartwatch is linked to a Samsung smartphone. Transferring the Visual Studio app to the smartphone works without any problems, but how to put the app on a smartwatch is still the question.
Relevant software and hardware I use
Visual Studio 2022
Physical device: Samsung Galaxy Watch4 (runs on Wear OS 3.2 and Wear OS 3 is based on Android 11)
Samsung Galaxy S10+ (runs on Android 12, but I don't think this version number should cause any problem for the smartwatch, as I can pair them together, just don't know how to get the app on the smartwatch...)
Galaxy Wear App is used to pair the smartwatch with the smartphone
What I have already found or tried
In the documentation from Microsoft I also tried to follow the steps
Debug on a Wear Device
But when I get to step 4 then the first command works but on the second I get an error that the connection could not be established. If I try to run the same command again, I get another message saying that there is already a connection.
After that I can't get any further in the documentation, since the following commands only work if 127.0.0.1:4444 is not 'offline' but has the status 'device'.
In another Microsoft documentation for native Xamarin.Android wearable apps 'supposedly' the physical device should automatically be in the list of connected devices, but in this project the device is not listed, despite the bluetooth connection between my laptop and the smart watch..
Run the Android Wear app
I would really appreciate if any of you know how to do this..
Thanks for the help.
Update: 14-03-2022 15:20 [Issue solved]
I still don't know how to get the app from Visual Studio to the smartwatch via a bluetooth connection, despite following the documentation (if anyone does, please let me know). That's why I looked into how to make this work over a WiFi connection.
How did I fix it?
Enable 'Debugging over Wi-Fi' on your smartwatch device (after having Debugger Options enabled Enable Debugger Options. P.S. Somehow they're referring to build number, but you should press 5 times
on 'Software Version Number', not 7 times)
Download Android SDK Platform tools (to be able to use commands like 'adb')
Extract the file and save it somewhere on your computer's hard drive
Start the 'CMD' program in Windows
Go to (cd [..location....]) the folder where the 'adb.exe' is located (i.e. the location where you extracted the first file)
To confirm whether or not you are connected, you can run the following command: adb devices
Connect the smartwatch to the same WiFi network as your PC/laptop on which Visual Studio is located and check your IPv4 address on the smartwatch
If there is poor WiFi range/no WiFi nearby, you could also create a WiFi hotspot from your laptop to make this work
In Windows search for the 'Mobile Hotspot' feature
Enable the option: 'Share my internet connection with other devices'
Connect the smartwatch to this self-created network
Now that the smartwatch is connected, you can go back to the CMD screen
Take the IPv4 address of the smartwatch and run the command as follows: adb connect [insert the IPv4 address in between and remove the parentheses]
Run the command again: adb devices
You will now see that it says under 'attached' -> device, next to the name of your smartwatch device
If you now look in Visual Studio, you should see the smartwatch device and you can put the app on your smartwatch
If you want to neglect all connections, you can use the following command: adb kill-server
Now you no longer need to connect your smartphone to your laptop/PC with a USB connection or via WiFi, because you can now access the smartwatch directly via the internet connection.

Appium [Android] - Couldn't launch app on virtual device

I installed Appium and all necessary stuff for running of application via Android AVD
Then I started a virtual device and launched the Appium (sure path to application was set in Settings before launching) http://take.ms/wRG8w
I don't know whether the application should be open immediately after launching or not. Thats why I ran Inspector. Seems the device was connected and Inspector was launched BUT the only thing I saw was Android logo.. launched application wasn't presented and as a result I wasn't able to record anything, here is screenshot http://take.ms/caglt
Maybe it was caused because of super slow virtual device.. please help
It's because the andriod emulator is very slow. Best is to use android device itself. I had same issues. There options to accelerate the simulator, but they haven't worked for me
If you have any andriod tab or phone, its quite easy to get started. You need to get adb installed ( is been done from the logs I see)and the driver of the phone device.
Then do adb devices to see if the device is listed. After that you can easily start interacting with device.

App won't uninstall from Smartwatch 2

I've deployed an Android app that interfaces with the Sony Smartwatch 2, and generally, it's working well. However, I have a user reporting that when he uninstalls the app from his phone, the watch component is not uninstalled.
I understand that the un/installation of the two should be linked, and in my testing (and for most of my users), that works fine. What might this user try to force the app to uninstall from the watch?
The user could be right. I've observed the issue only once for ca. twenty (20) installing/uninstalling rounds. However I did not found the way to reproduce it and I can't state what circumstances can cause such behaviour.
Did you've got information from the user on what phone, Android release, Smart Connect or SmartWatch 2 software version this issue occurred?
The only thing he can do to remove Wearable Widgets instance from SmartWatch is to reset the watch (Settings -> Reset SmartWatch).

Always launching flash player in secondary monitor and full screen mode

I am trying to set the location of Flash Player launch location to my secondary monitor connected using a VGA cable and I want to launch it always in FullScreen mode. After couple of searches, I found one link which relates to this topic:
http://www.flashdevelop.org/community/viewtopic.php?f=7&t=6658
But it doesn't seem to work for me. How do I set the x,y co-ordinates of flash player when it is launching as a new process ?
Adobe air has a Screen class to handle this. To help you out, there is an open source project on Google code that wraps this and handles some of the basics:
http://code.google.com/p/airscreenmanageras3/

Testing Launcher icon on Nokia Qt SDK

How do you test the application icon in the Nokia Qt SDK Simulator? The one which starts when u run the the application from within the Qt Creator.
I like to see how it works & how the sizing works out, but seems there is no App Launcher process as there is in iPhone/Android. Any hints?
If what you want is to have a view of the device menu from which you can launch your app by pressing its icon the simulator doesn't provide a feature like that.
If you want to test your app in a more real enviroment or in device that you don't have maybe the Forum Nokia Remote Device Access could help you.

Resources