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.
Related
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.
I'm no longer able to debug my Cordova app on the iOS simulator. I get the dreaded "We're unable to find the app ... you're trying to debug." error. I've tried all the troubleshooting steps, but nothing has worked so far.
I should note that this was working just fine. I was able to debug my app multiple times, with no issues, and then suddenly this error started, and nothing I've tried has fixed it.
Interestingly, the actual build logs in Visual Studio make it look like everything went fine:
Requesting debug on remote iOS device for buildNumber 6805 on server https://<redacted>:3000/cordova...
Debugging - Successfully Debugging on the device
{webDebugPort=9221}
Anyone have any ideas?
UPDATE 1
Tried this on my local OS X device, too, and got a similar result. Here are the actual build logs:
Unable to attach to debug. Check that http://Matts-Mac-mini:9221 is accessible.
We were unable to find the app you’re trying to debug. Check that the device is connected, awake, and unlocked. Also, make sure it has Web Inspector enabled.
------ Cordova tools 6.1.1 already installed.
Requesting emulate on iOS Simulator for buildNumber 522 on server http://Matts-Mac-mini:3000/cordova...
Emulated - Successfully sent to ios Simulator
------ Cordova tools 6.1.1 already installed.
Requesting debug on remote iOS device for buildNumber 522 on server http://Matts-Mac-mini:3000/cordova...
Debugging - Successfully Debugging on the device
{webDebugPort=9221}
It looks like things fail, but then the later messages (which appear right away) make it look like things worked. And the app is indeed running in the simulator on my Mac.
After the discussion in the comments, I believe that the issue here is using a shared machine for debugging. If there are multiple iOS simulators running on a machine at the same time (Typically because there are multiple users connected to the machine each running their own simulator) then remotebuild cannot guarantee that you connect to the correct simulator. This is because we use ios-webkit-debug-proxy which assumes that only a single iOS simulator exists, and doesn't expose a way to restrict which one it connects to.
If you are trying to debug an app in the simulator and there is another user with a different simulator, you may connect to the wrong simulator where your app will not be running, and that can cause the error that you see.
I have been trying to root my nexus 5 but i am not able to connect it with laptop for that.
It shows my phone there as portable media player
Can anyone tell me how to connect nexus 5 to pc for rooting purpose?
If its a Windows laptop try the steps below.
Use a USB cable to connect the Windows PC and your phone .
Open up Device manager. You'll see the device show up in "Other Devices" as unavailable.
Download and install the Google Generic USB Driver from http://developer.android.com/sdk/win-usb.html#top .
Note down and remember the location where you install the google driver to.
Right mouse your device, select Update Driver Software…
Select "Browse for driver software on your computer"
Navigate to where you installed the Google USB Driver software
Select "Let me pick from a list of device drivers on my computer"
Select "Show all devices"
Select "Have Disk"
Navigate to where you installed the Google USB driver, select the android_winusb.inf file
In the Update Driver Software - [your deviced] dialog select "Android ADB Interface"
Ignore the "Update Driver Warning" message.
You will now see the Android Device -> Android ADB Interface in Device Manager, and [your device] will be gone from "Other Devices". You should now also be able to turn on things like USB/Mass Storage Mode on the phone so you can view files from Windows Explorer as well as debug to the device.
I ran into a similar thing using a BLU VIVO AIR - http://www.devfish.net/post/2015/07/20/android-usb-adb-drivers-for-blu-phones-vivo-air.aspx .
Healy in Tampa
This cost me some serious time. I hope it saves you the time. Frustrating. I love my BLU phones, but their level of support on this was horrible.
“Hate lawyers all you want. Unlike you, we'll never be replaced with robots. Case closed!” ― Amanda Mosher - Better to be loved than lovable ....
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.
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).