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.
Related
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.
I have a XF app already published on the play store and now I am targetting iOS. During developpent I made sure the app was still working on iOS, using the simulator only.
On the simulator everything works as expected, the launch screen is shown then the MainPage starts. But when I debug on an actual IPhone device, the app get stuck on the Launchscreen.storyboard for about 20 sec then the app exits. I've no debug output and it seems that the AppDelegate is never hit. Breakpoints in AppDelegate.FinishedLaunching method are not hit for instance. I tried to F11 for start in debugging mode but I don't hit anything, still hanging on the launch screen. I was expecting the transition from simulator to device to be less painful.
My plist file contains the following permission requirements
...
<key>NSLocationAlwaysUsageDescription</key>
<string>We need to use your location</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>We are using your location</string>
<key>NSPhotoLibraryUsageDescription</key>
<string>This app needs access to photos.</string>
<key>NSPhotoLibraryAddUsageDescription</key>
<string>This app needs access to the photo gallery.</string>
The only difference I saw is that location permissions are not asked on the device while in the simulator it asks for it at start. But this might be related to the fact that I can't reach AppDelegate, I am not sure yet.
The iOS project was generated via Prism templates. I am using VS 16.8.0 on Windows, XF 4.8.0.1687, Prism 8.0.0.1909, Xamarin iOS SDK 14.4.1.3 and I am set to "don't link" for linkers option. The device is an Iphone 10.
Any idea how can I find out the root cause - or get some useful logs?
Thanks in advance for your help.
EDIT:
Here are the device log output during a new installation https://taits.s3-eu-west-1.amazonaws.com/devicelogs.txt. I am trying to go through them but kinda lost.
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'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).
My window phone 8 emulator not able to start when I run program from vs2012 emulator start loading after some time emulator automatic shut down. when I see the progress of running emulator while running program in Hyper-v there showing window log and emulator stop and again start, this will happen many time and after some time emulator off and in Vs2012 showing Deployment fail.
But before I tried it works properly, when emulator run emulator that time internet is not available show I searched in Internet for solution I removed network switches and run Xdecleanup but problem is still persist.
My Machine Configuration:
Processor : Core-i7 2.20 GHz
RAM : 4gb
Graphics : 2gb
HDD : 1TB
Hypervisor : Present.
Software : Visual Studio 2012
SDK : Window Phone 8
step 1:Goto Hyper-v manager
step 2:Choose file menu and click on options. Options dialog opens in that click on delete files button. You are ready to go now.
This worked for me.