JsonConvert.SerializeObject seems to be not working in xamarin forms. Or i might be missing something here. Here is the output when i serialize a simple object.
See it returns {}. I tried serializing a class also and it did return the same.
What could be the problem here?
UPDATE
Still no solution to this issue. I tried creating a simple console application and serializeObject is working on that project so i assume it is not working in xamarin forms only. Does anybody have a xamarin forms project where JSON.NET's serializeobject is working?
I am using visual studio 2017, json.net 10.0.3 and live player.
This is a known problem see https://developer.xamarin.com/guides/cross-platform/live/limitations/
Limited support for reflection (currently affects some popular NuGets, like SQLite and Json.NET). Other NuGets are still supported.
If you compile it to an APK it works fine on the actual device.
Also posted an issue here: https://github.com/JamesNK/Newtonsoft.Json/issues/1578
I tried setting up emulator on a fast machine and the serialize works! So it means it doesn't work when i run it on live player using my android phone. I will set this as an answer for now. if someone else posted on how to make it work on live player, i will set it as the correct answer
Related
I'm trying to create a simple app for Android that recognizes images using AR Foundation in Unity. Using the normal ReferenceLibrary and filling it within the editor works perfectly without any issues. The reason I want to use the RuntimeLibrary is to be able to fill it up using an api.
I've tried everything on the documentation as shown here:
https://docs.unity3d.com/Packages/com.unity.xr.arfoundation#4.1/manual/tracked-image-manager.html
I'm using AR Foundation 4.1.9 and Unity LTS 2021.
The problem is that when debugging (using LogCat or a serialized text field on the canvas) I do get a message saying the image is being added but when running the app it can't find it and instantiate a prefab on it.
Also have tried looking it up on the AR Foundation fora but no luck either.
Does anyone else have this issue or a solution for this strange behaviour?
Since a while I am working with HoloLens2. My last OS-Versions were 10.0.18362.1005 and 10.0.19041.1109. I am developing with Unity 2019.4.7. My whole code was and still is running great on those old OS-Versions. Now I updated to OS-Version 21H1 and I have huge problems with everything including networking.
For example, my Mixed-Reality-WebRTC Pluging (from Microsoft), which only supports ARM-Architecture, does not work anymore on my new Device. The app crashes after it was successfully starting.
Another thing is, that the DevicePortal does not transmit virtual inputs. Again, on my older HoloLens2´s Virtual Input works great.
Also, even if I disable WebRTC parts of my Project, I still get an Exceptions in my Networking-System which I can´t assign to any cause. In term it is useful for you, I work with windows.Networking Library and in special with DatagramSocket.
I would be really glad if anybody could help me with this. Is OS-Version 21H1 restricted to any specific Unity- or VisualStudio Version (here currently I use 16.4.5)? Or is it Restricted to specific Networking Libraries? Thanks in advance!
Now I was able to fix the Networking Exception. The reason for that is located within my UDP-Communicator which uses DatagramSocket. Since earlier .Net.Sockets was not available at HoloLens2, now it is and I coincidentally came across this information. So I switched my implementation to .Net.Sockets which already exists in my project for editor-usage and now basic networking works fine.
Also, I was able to make WebRTC work again. With one of my Provisioning-Packages I disabled the usage of microphone for mixedReality and it seems like access to those audio-informations is mandatory for MR-WebRTC.
Unfortunately, I still have the same issues with Device Portal.This really looks like a bug.
I have using the built in CSharpCodeProvider class in previous C# .NET projects and it has worked great. I see this has been removed in UWP. I've been banging my head against the wall trying to figure out if there is a way. I can't seem to find any scrap of information. But, I did come across an interesting app called #Code by Shahul Hameed on the Windows Store. This software claims to be able to compile code and be able to run it, and indeed it does. How are they achieving this, if such actions are not possible on the framework? Is it possible they're sending the code over the net to a web service of some kind and getting the returned console output? I thought so, but what about the live stdin support they've provided in the app, how would that work in a cloud compile situation?
Thanks for shedding any light
Code on Windows Store: https://www.microsoft.com/en-us/store/p/code/9nblggh4s3mf
So I am starting out to do some projects in Tango using Unity. I cloned the examples from their github (https://github.com/googlesamples/tango-examples-unity) and tried running their Experimental Augmented Reality example. So I figured out how to attach the scripts to their respective game modules.
However, everytime I try to run the program, in the ARScreen.cs script this line m_textures = m_tangoApplication.GetVideoOverlayTextureYUV(); always returns null. So I combed through google's documentation to see what causes it to return null but I could not find anything on it. Is there anyone that successfully ran the Experimental Augmented Reality example that can shed some light on this?
I just verified that my Experimental Augmented Reality example works fine.
It looks like project tango has made a new release called "release-weyl" on sept 15th. I'm not sure if there is a mandatory firmware update for this new release.
I'm using previous version release-vonmises. Just try this release. It might just work.
I want to use DatagramSockets in a WP8 app to talk to an SSDP/UDP device (a Sony ActionCam) but I can't find the Windows.Networking DLL as it's not in any of the normal places you add references from. It does seem to live in various places on my Windows 8 machine but if I try to add it from somewhere like %Windows%/system32 it tells me it's not possible (which I guess because there's no Type Library?).
So can someone please tell me what I am missing? Is there some other SDK I need to download? I've looked all through the MSDN docs and though it mentions the namespace in plenty of detail it doesn't tell me how to find or add it for a WP8 app (typical MS).
Hope someone can help me - I'm clearly missing something obvious but I don't understand what or why.
Ok, I solved it - I have absolutely no idea why this was happening but it seems like VS2012 was the culprit. In desperation I saved the code I needed, deleted the entire solution and recreated it and now I can see the Windows namespace members.... bizarre! Also very, very annoying - I have wasted hours on this, apparently all because of some internal issue with VS2012.
Thanks for your input Tico, apologies if I wasted your time!
Just to follow up on this - I had the same issue. For me, I had to select .Net Framework 4.5 instead of 4.0. Creating a new solution in 4.0 within VS2012 wouldn't allow access to the Windows.Networking library. But 4.5 worked perfectly.
Just another idea of what might have gone wrong since i myself stumbled upon that mistake right now. Instead of a windows phone class library i added a portable class library (supporting windows phone 8 and windows store 8+ with .net 4.5). Seems like that combination doesn't support Windows.Networking