Adding iCloud support to a Xamarin app

One of the facilities in my Mobile DMX app allows the user to back up all of their workspaces (light shows) into a zip file, which can later be restored. In the currently released Android version the backup can be written to a folder on the tablet, or saved on a PC by using the Windows Companion app. Continue reading “Adding iCloud support to a Xamarin app”

Linux and Xamarin socket problems

One of the requirements I set myself for my Socket library was that it should be as robust as possible about knowing that the other end of a connection had gone away. The .net socket objects are pretty bad for this, and the only way to be certain that the connection is up is to attempt to read or write its data stream. Continue reading “Linux and Xamarin socket problems”

Dropbox support for Xamarin.Forms

The new Dropbox v2 API makes it quite straightforward to add support for Dropbox into an app running on a phone or tablet. When I decided to add Dropbox support to Mobile DMX it quickly became obvious, looking at the “SimpleTest” sample app, that the awkward part is logging in, but uploading and downloading small files would then be very easy. Continue reading “Dropbox support for Xamarin.Forms”

Xamarin.Forms Error CS0117

Now that I have completed the first release of Mobile DMX I thought would convert the project over from Xamarin Studio to Visual Studio. I wasn’t able to do this until recently because I have an “Indie Android” licence, which meant I had to use Xamarin Studio, but since MS have bought Xamarin I can now use Visual Studio (Xamarin Studio is deprecated), which is good.

Took a while, though. At first I was getting several hundred errors of the form

error CS0117: 'Resource.Attribute' does not contain a definition for 'mediaRouteSettingsDrawable'

Continue reading “Xamarin.Forms Error CS0117”

Fun with Sockets

Actually, not fun at all. This problem has been driving me nuts for hours.

There are some things I like about .net socket programming, but one thing that always causes horrible problems is shutting sockets down when I’ve finished with them. One way or another, I always end up having to trap some exceptions. Continue reading “Fun with Sockets”

Incorporating MS Identity database into an application database

I’ve just started writing my first serious .NET MVC application. It’s intended to be a slightly cut-down web version of Calibre, supporting only epub format (at least, initially). It has a SQL Server database where everything is stored, and will allow the user to upload epubs, then extract metadata from them, and put it all into database records organised by user. All properly normalised, of course, so that if, for example, two users upload the same epub file it will only store one copy. Continue reading “Incorporating MS Identity database into an application database”

The VS IDE, the FTD2XX dll, the mouse, the keyboard, and a dent in a brick wall

I’m just starting a project that involves talking to a board with an FT245R USB interface. I’ve got an XP VM set up with VS 2010 (some target machines will be running XP), the FTD2XX dll, the C# interface code published by FTDI, and some working VB6 code to get started with.

All seemed straightforward-ish. The first thing I had to do was rewrite the C# interface code to take out the message boxes it popped up when there were errors, and change it so that it throws exceptions instead of returning statuses that have to be checked for every call. It uses a somewhat bizarre and long winded way of referencing the functions in the dll, getting function pointers and marshalling them to delegates as they are used (rather than just using extern declarations), but it works so I left it.

Next thing was to create a Windows Forms app, and open the USB device using its description. Worked straight away. Excellent. Put some buttons on the form and run it again. Didn’t work – failed to open the device. That happened repeatedly, so I tried running the VB program. That worked, then running the app again worked. Then it didn’t. Continue reading “The VS IDE, the FTD2XX dll, the mouse, the keyboard, and a dent in a brick wall”