Getting Xamarin Particle SDK to working sample app

I am trying to use Xamarin with @DrWatson’s port of the Particle SDK with the idea I can build one app and deploy to multiple platforms. But I’m not able to get the sample to work beyond the app login screen. I hope @DrWatson or someone who has used it (maybe like @RWB) can guide us to what steps (for a learning newbie) to take to get a working sample app to start from.

Admittedly the learning curve may just be too steep to make it practical for me personally at this point. But my hope was that from a working sample app I could learn, adjust and get to an initial working app that has been customized.

Problem: When deployed Android app fails at login screen:
“Sign Up” and “Forgot Password” appears to do nothing in the app. In Visual Studio with Xamarin I can see error exceptions. When I use an incorrect user/password I receive the “Login Error” screen so that seems to work. However, when I enter correct user/password credentials it breaks with the following message:
“Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object”

Question: Is OAuth client configuration required to run the sample app?
I noted in the readme info about OAuth client configuration and I read up about it in the guide. So will this sample app not work without me setting up a new organization and creating the OAuth configuration for myself? Or is that only required when you reach the point of managing an organization etc? (Since I can edit and run the Tinker app in Android Studio successfully without any OAuth configuration I thought the same would apply to this sample app.)

PS: If it IS required, am I correct that the places the need to be updated with the credentials are in ParticleCloud.cs, lines:
51 public string OAuthClientId { get; internal set; } = “particle”;
52 public string OAuthClientSecret { get; internal set; } = “particle”;

Other: Setup background
The dependency is not mention in the github readme but @DrWatson mentions MainHttpClient on his blog http://www.xambrew.net/?p=49
I did add it through Visual Studio components and I also installed it via the package manager. However, if it requires any update of code anywhere I have not made any code changes.

Thanks!

This is a relevant topic. Have you made any progress on the xamarin app @bloukingfisher? This would be very useful for many people as it would allow for easy publishing of apps to both windows and android with one codebase.

Wow, it’s been 8 months. Ouch.

Working with a developer I have it working on Android but have issues with iOS at this time. I’ve not tested deploying to Windows yet. I’m not sure if @DrWatson is maintaining and improving the ported repository. My intent anyway is that when I have it working in Android and iOS I may be able to do a pull request (working with my developer) if it addresses the issues I initially experienced. Otherwise, I may publish the forked base I’m working from.

Probably still a few months out to that point. Also, I’ve not yet built the sign up functionality or password reset that I don’t believe was included in the port of the Particle SDK.

PS: I’m just limping along on my own, but if anyone has strong interest in getting the basics of the code base working and are willing to contribute financially for the developer to accelerate that send me a private message. I prefer to keep it open and community effort but seems like this may require a solo effort.

Hi,
I forked the Xamarin code this morning to have a poke around, but I’ll be honest, I’m a novice in this area. When I open up EvolveApp.sln I get heaps of errors:

type or namespace name ‘IApp’ could not be found (in UITest)
type or namespace name ‘Platform’ could not be found (in UItest)
type or namespace name ‘IApp’ could not be found (in UItest)
etc… a total of 132 of these errors.

The solution with the portable class library builds fine though. Is there anything I need to do with references to fix this problem. Or Framework Target. Or elements missing in my install?

I’m new to this, but I’d like to have a crack at getting it working. Could I get a shove in the right direction.

Cheers,

Al.

Sorry, I can’t really help. I ended up hiring a developer to get it working and now the code is too proprietary to my project to share. There was a lot of fixing to get it to work in our environment.

No worries dude. Right now, I’m just trying to get a good picture of the options out there, and finding the best route to take. For my purposes, it seems that Xamarin may not be it. Although it’s a very interesting technology. I only spent a half a day reading up on it and watching a few video tutorials. There are many other very interesting ideas circulating which lead in a very different direction. Best of luck in your venture!

Something worth checking out: https://porterapp.com/
Provides a quick and easy way to essentially get to an app, and depending on your needs may be all you need, or otherwise can speed up testing and development to get a working demo app until you want to custom build your own.

Would love to hear any solutions you find, or if you can crack the Xamarin nut.