Is it possible to use C# and the Xamarin runtime to create an Android RemObjects SDK client?
I’ve got an existing server I’d like to connect to and I’m able to generate an interface file to add into the Xamarin project. Adding the RemObjects.SDK package is causing me some difficulty though. There’s no obvious package available and browsing through what I’ve been able to find has led me to a set of DLLs under “PortableLibrary” which are working but which appear to contain only a small fraction of the RO components I’m used to. In particular it does not have any of the HTTP or SuperHTTP-type client components necessary for the connection I’m trying to make.
So some questions:
Am I using the wrong package here?
If so, which one(s) should I be using?
Is there any good example code available for such a client project?
yes, this should be fine with the .NET version of Remoting SDK. You will probably want to use the .NET Standard version of the library, but the regular version might work, as well (i’m not that familiar with Xamarins for Android, myself).
Portable Library builds were meant co contain the very bare minimum that should work on all supported platforms. This means that PCL does support only simple Http channel with async requests.
Still PCL build should be now considered as obsolete and in one of the next releases it will be removed altogether.
Starting this release we do ship .NET Standard 2.0 - targeted builds of Remoting SDK and Data Abstract. This means that now one has access to a much wider set of features including all client channels (Http, SuperHttp, Tcp, SuperTCP) excluding NamedPipes channel that is a strictly Windows-only feature.
Also it is now possible to send requests to the server in synchronous manner or using async/await calls.
Unfortunately I am not proficient with Xamarin to create a sample of proper quality (Xamarin specific code wise).
Just create a new .NET Standard class library project. Add there references to Remoting.SDK assemblies from the .NETStandard folder. Then import RODL of an existing server using Tools → Remoting SDK & Data Abstract menu item. Then you will be able to call Remoting SDK server as usual
Methods dealing with empty arrays, standard types (Integer, DateTime) and RO enumerations are working well, but any which deals with a ComplexType descendent generates the same exception:
“Unknown class ‘CLASSNAME’ found in stream.”
Where “CLASSNAME” is the name of the class in question.
TdteErrorCode is an enumerated type defined in the RODL.
This works exactly as expected
The correct error code (EC_NONE) is returned and the DateTime out parameter is populated by the server.