Monday, September 23, 2013

GCM - PushSharp

I got my first push notification working this weekend.  I found a cool library called PushSharp, where someone wrote a C# implementation of push notifications for all kinds of different platforms (Android, iOS, Blackberry, etc.)  It's really well written and easy to use.

I've got some basic Mockito working for unit testing, but I had to put setters on my business objects to allow the injection, and I had to manually inject the mock when running the unit test.  I know there is a way to do it using annotations only, but I spent too much time trying to figure it out and then moved on.

I also got my local database reads and writes working using OrmLite.  So I've got that going for me .. which is nice.

Oh yeah, on the topic of getting score data.  I am going to switch over to an MS-NBC feed that supplies structured data in JSON form.  My plan now is to have all the score collection run on the server, then push the data to the client devices.

I still need to write the logic that actually analyzes the bet tickets against the actual scores, and then update the user that a ticket is won/lost or, in the case of a parlay, dead or alive.  I would like to have a notification to the user like "Game 1 of 4 final, 3 more to go!" .  Or "Parlay ticket is dead, because Steelers did not cover"

I'm still having a lot of fun writing the app.  The thing that I battle is deciding whether to read all the Android design guidelines and best practices, or just cowboying through it with the nagging feeling that I'm doing something wrong.  I'll probably go with option B, because hey, it's a hobbyist project and that option is fun!

No comments:

Post a Comment