Sunday, March 30, 2014

Android Accessibility

Well, I was browsing reddit.com/r/android the other day, and someone asked "How does LastPass read and inject into fields of other apps?"  I thought to myself, "yeah, how do they do that"?

When you install LastPass on Android, it asks for these permissions:
http://imgur.com/H9zm95D

That got me thinking, maybe I can read the screen from the William Hill app without requiring the user to take a screenshot and then send the photo to my app.  That would be a way nicer user experience.

So, that led me to discover the AccessibilityService, and today I'm going to see if I can figure out how to make this thing work.

It's March Madness right now, probably the 2nd best thing to football, which got me thinking about my app again.  I've also been giving more thought to taking the image recognition logic off of the phone and putting it on a server somewhere.

Anyway, just thought I'd post an update here.  That's all for now.

Thursday, January 9, 2014

Dormant

Well, I think it's pretty clear from the inactivity on this blog that I lost much momentum.  I haven't looked at the code for the Trakker project in months.  The NFL football season is coming to an end, and my Bengals suffered an embarrassing loss to the Chargers for another 1st round exit from the playoffs.

My son Benny is doing great.  Being a father has been amazing so far, and I know it's only the beginning of a long adventure.  It has proven much more difficult to get long stretches of uninterrupted time at home however, but I think that's just the way it goes.  I certainly don't want to be the kind of father who is always absorbed in something other than his children.

The tech space is so fun to be in.  There are so many options for things to learn and ideas to build.  I have made an effort recently to shore up my weaknesses on the web side and try to learn javascript and some frameworks.  I like Durandal so far, and I backed it on Kickstarter because the author of the framework seemed genuine and he's kind of doing a David & Goliath thing battling Google and AngularJS.

My tech goals as we kick off 2014:


  • Get an app on the Google Play store.  Even if it's trivial
  • Get more of a presence on GitHub so that I have a functional resume, rather than just the traditional one
  • Come up with more ideas that appeal to me because I am passionate about the domain and the problem being solved.  If it involves my interests like golf, guitar, sports, etc I am much more inclined to work these projects rather than contrived sample applications.
I don't know if I'll continue this blog or not, but I enjoy getting my thoughts out so I will continue to author posts like these in one form or another.

Here's to a great 2014!

Sunday, November 24, 2013

Dormant

Well, it has been over a month since I've posted here.  My wife and I had our first child, and I grossly underestimated the demands on my time. But, it's been amazing and I don't regret putting my hobbies on hold.

The football season is more than half way over.  I love betting on football, and I still believe there is a need for helping to track bets. That's why I love working on this app, because scratching your own itch is when writing software is the most rewarding.

I've come a long way with the application, and I still intend to get into usable shape.  But, you know, priorities, and life, and stuff.


Saturday, October 19, 2013

private repos

I think Hall & Oates had a song called Private Dancer.  Nope, just googled it and it's Tina Turner.  Anyway...

Ok, I know github.com is all the rage, but dammit, I'm not ready to share all my hard work with the world.  So I've decided to go private.  This post sums up my sentiments:

http://somatose.com/2011/10/from-github-to-bitbucket-in-60-seconds.html

So we live in a world where people won't pay $7/month if there is a free alternative.  What can I say.  It's a slippery slope, because as soon as I go with a private github repo, then travis ci wants to charge to integrate with a private github repo.  Now it's almost $20 a month!  That's like 4 beers at Great Basin Brewery!

I'm embarking on these projects mostly because I get off on developing, and especially on learning new stuff.  But I also like to control my assets.  I know that listing a public github repo on a resume makes it really easy for a potential employer to look over your "portfolio", but oh well, I'm gonna go with the proverbial "available upon request".

I'd like to get an app on the app store anyway, and let the finished product speak for itself.

As for dev details, I dusted off the Tapster project after having lunch with my friend/former colleague Nick W. last week. It was his idea to mount a phone to a keg and make it do cool stuff to begin with.  That codebase is surprisingly in good shape.  It was my first Android project and I learned quite a bit.  Some things I did different on AR/Trakker versus Tapster:

Tapster:  All external dependencies I went and found the jar file, put it in a libs folder, and checked it into source control
Trakker:  I discovered Maven.  Nuff said.

Tapster: I actually used Dagger for Di
Trakker:  I fiddled with Dagger again and chose RoboGuice because it seemed easier.  Weird when your former self could figure out something your present self couldn't

Tapster:  Wrote my own data access layer in the "standard" Android way.  No ORM tools.  Old fashioned SQL statements.
Trakker:  Went with OrmLite.  Did I mention I hate SQL?

Tapster:  Had my college roommate Big Bill design me a sweet pint glass for an icon.
Trakker:  Still using stock icon.  Need to make pretty.

Tapster:  No CI
Trakker:  Travis CI.  Although, as mentioned above, I am about to turn my workstation into my own CI server and ditch paid services. At least until if/when this turns into more than a hobby.

Learning and experience are awesome.  Want more.


Sunday, October 13, 2013

Root

Well, my wife and I had a big week.  Our son was born on Wednesday, Oct 9th, 2013. I took a week off work and I'm hanging out with my son...pretty awesome.  He's laying in his bassinet next to me now as I try to sneak in a little dev time.

My current challenge is that Google Play Services does not play well with the android emulator.  Ok fine, use a physical device for development.  Ok, but when I try to adb to the device and browse to the data folder, I get a permission denied.

So I'm rooting my phone so that I have a nice "dev" device.  It's not my main phone, but it's a Nexus S 4G that I bought off ebay a couple years ago for my Tapster project.

So that's what I'm up to.  Learning to be a dad, and rooting android phones.  We are in week 6 of the NFL season so I would like to get the basics in place and get version 1.0 onto the app store, if possible.

Stay tuned!

Thursday, October 3, 2013

The burden of CI

Man, I'm hooked on the ease of Maven dependencies now.  You just add a little snippet of xml and you're golden.  So my new dependencies are google-play-services (for Gcm) and compatibility-v4 (for WakefulBroadcastReceiver).

There is a cool project that will just put these into your local maven repo, so that you can add your little xml bit to pom.xml, it's called maven android sdk deployer (https://github.com/mosabua/maven-android-sdk-deployer)

So, now I'm fiddling with my travis.yml file to make sure that it downloads the proper bits and puts things in the right places.  My unix shell skills are rusty, but i'm shaking off the cobwebs!

Tuesday, October 1, 2013

Android / Azure

Well, I created a simple azure website and published it out to Azure hosting.  I am able to use PushSharp on the backend to send my Gcm notifications to my phone.  Life is good.

I still need to get the android app to register with Gcm & my server when it starts up.   There is some good sample code available to demonstrate this, so it shouldn't be too much trouble.  The thing I'm struggling with a little bit is understanding Android application entry point.

I have an Activity that is registered to receive share intent from photo gallery.  This is not the same Activity that is marked as my startup Activity.  All the sample code for using GcmRegistrar to set up the client phone with Gcm shows it happening in an activity.  It would seem to make more sense to me to do it in the Application class, as that code seems guaranteed to run everytime, regardless of which Activity is the startup activity.  Anyway, it would probably be better to post this to SO or some place that I can get some help, rather than talking about it in my own private blog that no one reads :)

In non-dev related news:  my wife and I will be go from DINKS (dual income no kids) to parents next week, so that should be an interesting life transition.  It's not a new chapter, it's a whole new book!