Unity & Unity Remote 5 Android cannot USB test - c#

I started a project on Unity and I would like to test it on an Android device, but I am unable to do so. I researched every tutorial out there and couldn't find a solution that worked for me. Note: I have been using Android Studio and I am able to launch apps both through an emulator and a USB phone.
I am pretty sure I correctly chose all the settings inside of Unity
(followed every single tutorial I could find).
Turned on developer mode on phone and tried multiple setting
variations that I could find on the web.
Made sure all the drivers are installed correctly (wouldn't be able
to do stuff through Android Studio if I haven't).
Uninstalled Unity and Unity Remote 5 multiple times.
JDK and NDK seem to be working fine. Tried turning adb server on and
off multiple times. Also I can see my device with the 'adb devices'
command.
I had some issues with MalwareBytes when installing Unity. I did try
granting permissions to every Unity folder I could find, but I think
MalwareBytes could be the culprit.
Has anyone encountered a similar issue? Is there another thing I could try? Any help is apreciated.
EDIT: I switched my VPN to a VPN that allows open source software and I also uninstalled Malwarebytes and replaced it with Avira. Did not fix the issue.

I did not run in exact same issue, but working with Unity remote might be a little tricky.
It may require to launch Unity remote first before launching Unity itself. And I hope did not forget to ProjectSettings -> Editor -> Any Android Device option to be set. I'm talking about Window OS.

I had the same issue today. I also did everything was mentioned in tutorials and nothing helped.
Then I noticed that when I press 'Play' there's a message in the console "Set-up Android SDK path to make Android remote work in Unity". After I went to 'Edit'->'Preferencies' I unchecked the 'Android SDK Tools Installed with Unity(recommended)', then closed Unity, opened it again and checked the box again.
It worked for me, I hope it will help you too :)

When you connect your phone to your PC, you may chose the file transfer option in your Android device, but charge mode worked for me, this is what I did:
1-Make sure that the "Any Android Device" option in Project Settings/Editor, is enabled and close unity.
2-Open the Unity remote app in the phone and connect it to the PC, in charge only mode.
3-Open Unity and run the game
This method worked for me, I hope it works for you too.

Related

Hologram is not shown in the hololens 2 while it's working in the desktop

I deploy my HoloLens 2 in Visual Studio through Release, ARM64, and Device. If I use the Release Machine instead of the Device, I got an error.
My desktop doesn't have the same Wi-Fi as my HoloLens. I can't connect my desktop and HoloLens to the same Wi-Fi.
My deploy is succeeded after I use the Device. My project Icon is shown in the HoloLens 2. But after I open the Icon, I can't see anything.
Please help me to find the solution. I spend a lot of time on this problem.
Maybe my explanation of Remote Machine and Device gave you some misunderstanding. I'm sorry about that. Remote Machine + WIFI and Device + USB are both officially recommended deployment methods. Since you have successfully deployed through Device, please continue to use it. If you are still a little confused about deployment you can publish a new thread.
It seems the main issue here is that when you run the deployed project, you cannot see any object. I recommend you try Remote Debugging(https://learn.microsoft.com/en-ca/windows/mixed-reality/develop/unity/preview-and-debug-your-app?tabs=openxr) in the Unity editor, which allows you to quickly preview and debug your project without deployment, and it can also be connected via USB. You can also use the official sample to Remote Debugging or deploy directly. Also, it's important to note that before you build your project in Unity, you need to add the scene to Build Settings->Scenes in Build.
Finally, I found the solution to my problem. Before I used the unity 2020.3.9. Now I changed the version to 2020.3.4. Now I can deploy and see the game objects in my hololens 2.
I had the same issue before. In the unity editor, I can see my models normally. But the models were not shown in Hololens, or only by one eye. The reason was that the models use the standard shader of Unity. After I applied the Mixed Reality Toolkit/ Standard Shaders, every model was shown.

BLE connection in Unity

I am new to Unity and BLE, so I am having trouble getting Bluetooth connection. I tried following along the solution posted here: BLE device with Unity
But, I can't work it out. I have added the WclGattClientDll to my assets folder, but can't figure out how to connect to my Bluetooth device. My Bluetooth device uses the heart rate service and works properly, since it connects to the manufacturers phone app.
Thanks in advance for any help/suggestions.
This could be down to a permission problem. It is possible to solve this issue in both Unity (pre-build) and Visual Studio (post-build). Here are both solutions:
Solution A: in Unity
Head to Edit > Project Settings > Player.
In the Inspector, open up the tab Publishing Settings.
Under the Capabilities section, make sure that Bluetooth is enabled.
Click on the .gif to expand
Solution B: in Visual Studio (2017)
In your Solution Explorer (Ctrl+Alt+L), expand your project.
Double-click the Package.appxmanifest.
Go to the Capabilities tab.
Again, make sure that Bluetooth is enabled.
Click on the .gif to expand
This will give your app the right to use Bluetooth.
https://github.com/adabru/BleWinrtDll
For my project I created a UWP-BLE wrapper as C++-dll that you can copy into Unity. It works for the Unity-Editor and the Windows standalone version. It has only the basic functions but you can extend it with the rest of the UWP-API if you are willing to write some C++.

Xamarin Live Reload Preview doesen't connect with android emulator

i started recently working on a app for mobile devices with xamarin forms. To work on the GUI fluently i tried this:
Live Reload Preview
It worked with the Visual Studio Android Emulator. But i want to work with google's emulator becaus of the more recent updates. I get in VS the message, that LiveReload is enabled but not listening. So i tried a view things with the "Hostname" and "Port" field within the settings of live reload in VS. If i use the command "adb devices" i can see the emulator and it's port (5554 in my case).
Should Hostname stay at localhost? Or did i miss something? The project worked fine with VS Android Emulator and the Live Reload extension. So i can at least exclude a mistake in my code.
Would be great if there's someone who could help :)
Thanks a lot!!

VS2017 Deploy to ARM

I can usually find resolutions to my problems here, but no one seems to have experienced the problem I'm having.
I'm using VS2017, building a UWP app for Win10 Anniversary edition. The app deploys fine to the Local Machine and the emulator. However, when I try to start debugging on the phone (MS Lumia 950), the Deploy process finishes successfully almost instantly. Then I get the "Project needs to be deployed before it can be started..." message. I'm not seeing any error messages during deployment, just the one after deployment apparently succeeds. If I try to deploy from the Build menu, I get the same rapid deployment.
The phone and PC both are updated with the Creators update. I have rebooted the pc and the phone. I have checked the 'Deploy' option in Config Manager. The phone is unlocked when I deploy. If I unplug the USB cable, I get the expected "Bootstrapping failed. Device cannot be found." message. I don't have another USB-C cable to try, but I can see and explore the phone from File Explorer in Win10. I used "WinAppDeployCmd List -ip 127.0.0.1" to make sure the app really isn't on the phone.
I've developed some other UWP apps in VS2015, this is my first go with 2017. Sorry if I was overly verbose, I want to provide as much detail as I can. I don't know what to try next.
Thanks for any insight.
Don

Debug Application with MonoDroid Trial Version

I have installad MonoDroid Trial Version.
I have create an "Hello Wolrld" application and debug it in the emulator
but any application appears in the list of application on Android Device Emulator!
The problem is the trial version or some error in my application?
Can you help me please???
The Android emulator is somewhat tricky, at least with MonoDroid. Once you execute the application and have selected the virtual device you defined for Monodroid the emulator will launch. Here comes the tricky part, you'll also get a Monodroid "Select Device" window underneath with some slight differences to what you initially had. You should go to that windows and now choose, for example, "emulator-5554" in the running devices list and press "OK". Once you have done that the application should be deployed to the emulator. Slow but it should be deployed.
For increasing Android emulator performance I recommend you to have a look at Emulator snapshots and this article at MoreWally.com.
The bug is described in the following document:
http://support.xamarin.com/customer/portal/articles/141157-ide-does-not-display-target-device
The procedure I use when starting up is:
Close development environment, SDK manager and emulated devices.
Open AVD Manager and start the emulator(s) you would like to use.
Run the command 'adb devices' (located in Android\android-sdk\platform-tools) and note which devices are listed.
If there are none, or the list is incomplete, then run 'adb kill-server' followed by 'adb start-server'. You may wish to create a batch file with these commands.
Now check the devices are visible with the command 'adb devices'.
Open development environment and everything should work.
If you kill or start a new emulated device, when you have VS2010 open, and then devices do not appear as a 'running device' in VS2010, then close VS2010 and perform steps 4 through 6. When you reopen it should now work.

Categories