SqLite for Uno on Native platforms - How to do it? - sqlite

I'm just starting with Uno. I'm an experienced UWP developer and have done some Mac development (With Xamarin Native).
I've created an Uno solution, and have removed the WASM, WPF and Mobile target projects (only interested in UWP and MacOS)
Now I want to use SQLite in my Uno solution, and not sure how that's achieved. I cant add nuget packages to the shared project, so Im guessing that I need to create an interface class to declare the data access requirements, and then implement that interface separately in the UWP and MacOS projects.
Is this how it's done, or have I got this wrong ?
Does anyone know where on the Uno docs I can find out how to do this
Thanks

OK, I was mostly right. After reading the docs again it seems that rather than interfaces, you need to use partial classes to implement the required class across the platforms you need.
I found out how to do it here:
https://platform.uno/docs/articles/platform-specific-csharp.html

Related

Using SDK made for Android in Xamarin

I'm currently developing a little project, i've bought a "smart lock" with works with Bluetooth and uses an open platform called TTLock. The resources are here: https://open.ttlock.com/doc/userGuide
The idea is to create my own App to control this "smart lock" using the methods created by TTLock.
The web page gives SDK resources for Android and IOS, but i want to program my App in Xamarin.Forms. My question is, can I "add" the Android SDK and the IOS SDK to my Xamarin.Forms solution and work with that methods, or i have to program first in Android Studio and later in an IOS IDE?
Thank you so much for your time and your responses. I'm learning about programming APPs on IDE, so all knowledge will be appreciated.
My question is, can I "add" the Android SDK and the IOS SDK to my Xamarin.Forms solution and work with that methods,
The answer of the first question is Yes. You could refer to Binding a .JAR document to use it in Android, and refer to Binding iOS Libraries document to use it in iOS.
or i have to program first in Android Studio and later in an IOS IDE?
The second question is depends on you. You will not need to use native IDE to do that.
For Android, there are two ways to get the native library:
Using Android Studio to download it
Going to Source repository website to download it
First method, I think you already know that, from the document you will find the sample steps:
The Second method, the shared document is chineses language. Therefore, you could find the source repository website here: https://maven.aliyun.com/mvn/search, and search by typing tongtonglock you will see the navtive libraries as follows. Then you can pick one to download.
For iOS, you could refer to its sample link to get the framework.

How to use WinPcap in Xamarin (Forms)

There are many .Net wrappers in C# for WinPcap like SharpPcap and PcapDotNet
I have tried to add these Nuget packages to my Xamarin Forms projects but it does not work. I want to create a wifi/packet scanner but I am not sure how to do this in Xamarin. Is it even possible?
When I clone the GitHub repo and build my own version of SharpPcap, the application runs, but I get the error:
System.DllNotFoundException: wpcap
The wpcap.dll is the dll that all these packages are wrapped around and use [DllImport("wpcap.dll")] to work. This wont work in Xamarin (I think).
Another way to use dll's is when you embed them as an application resource, is there any library which I can use that does that?
WinPcap consists of a driver, that extends the operating system to
provide low-level network access, and a library that is used to easily
access the low-level network layers. This library also contains the
Windows version of the well known libpcap Unix API.
Source: https://www.winpcap.org/
There is nothing impossible, however in mobile world you don't have that low level access to drivers and etc. unless you have a root on your device. It is unclear what exactly you want to build. But I know that on both iOS & Android there is an app called Fing. It scans your WiFi network for connected devices. It is written natively per platform. On Android there used to be many different applications that used MITM technique. For example DroidSheep. But I am not aware of any cross-platform solution that is able to scan the network or sniff packages.

Only UWP apps can't handle my webcam

I spotted a strange thing. I have a webcam (a4tech p-635, pretty old) which is not recognized by any UWP app, like modern skype. With standard apps, everything works like a charm. I will say even more; same code in Qt compiled with MinGW can handle this camera, but compiled as UWP, can't detect her.
Have you any ideas? I can't find anything which could be a cause. Thanks.
That is most likely caused by the camera drivers. UWP app API is great at abstracting devices and access them via the simple API, but if the webcamera is not recognized, it must be that the drivers for the camera are not providing the right interface that UWP can use.
Please check if there are newer drivers available and if you cannot install some generic driver that would make the camera work.

How to open DICOM (.dcm) images in iOS ?

Though this is a duplicate question, it would be really great if someone can help me in integrating a DICOM image viewer in my iOS application. Basically we are building a health application, where we have a requirement to showcase .DCM images. Any solutions ?
I'd tried with this and this too. But no luck :(
Imebra (c++) can be compiled for OS-X and iOS.
It comes with few objective-c helpers that convert images to UIImage or NSImage and std::string objects to/from NSString.
The documentation contains a section dedicated to building the library for Apple OSes.
Disclosure: I'm the author of Imebra
I am currently the primary maintainer of fo-dicom, which is a C# based cross-platform DICOM toolkit, available on .NET Framework, but also on Xamarin iOS, Xamarin Android as well as other platforms.
If you are considering developing in C#, fo-dicom might be a sufficient alternative.

VT500 terminal emulation Flex component

Does anybody know of an existing Flex component that does VT500 terminal emulation?
We are gradually replacing terminal-based user interfaces with an AIR-based GUI.
We would like to have a terminal emulator embedded in that new AIR GUI, in order to give our users an integrated user experience when navigating between our old and new software.
Emulation of other VT-series terminals than the VT500 could also be usefull.
Btw, I'm not interested in writing it myself (nor having it written for me) because it would only be a nice-to-have in our software architecture.
Thanks,
Pieter
Isn't the whole point of using Air and upgrading the technology is that you DON'T need to use a terminal anymore? Seems a bit redundant.
I don't think you'll find anyone that has already created the emulator, but it can't be that hard to implement if you really need the functionality. I know I've seen an AJAX implementation of it (anyterm.org) that uses the ROTE library for the virtual emulator. You might want to look into that.

Resources