Ever wanted to know where in the world a particular IP address was?  Here you go, WhereIP.  I completed this a few weeks ago, but didn’t get a chance to upload the source code until now.


Check it out on GitHub -> WhereIP







Google Play In-App Billing Server Purchase Verification


My current project, PrēmoFM will feature In-App Billing.  I’ve successfully implemented Google Play In-App Billing v3, leaning a lot on the demo available at developer.android.com.  One major fallback of the example provided is on-device purchase verification (Google themselves recommend against on device purchase verification).  No matter how hard you try, Android apps are easily reverse engineered, allowing hackers to compromise your purchase verification logic.  They could spoof purchase interactions and gain access to IAB protected content and features for free.

I implemented my purchase verification using my Node.js-based API server.  When purchase data is returned from Google Play, I send it to my API server for immediate verification.  Once it’s been verified (or not) a response is sent back to the app, unlocking the content or feature.  Here is, more or less, how I verify purchases in Node.js.  It uses Node.js crypto library.


Podcasts for Android Developers

I listen to a bunch of podcasts, but there are a core few that make me better at what I love doing, writing Android apps.  Here are some of podcasts I listen to that are tailored to Android developers.  I more or less take at least one thing away that makes me a better Android developer or makes my current project, PrēmoFM, better.

Queue the Xzibit meme…


Android Developer Backstage


Link -> androidbackstage.blogspot.com

Android Developer Backstage (ADB? <— well played) is a podcast hosted by engineers who work on Android at Google.  Chet Haase leads the podcast.  They’ll often have guests on from other teams within Google, such as the tools team, Google Play Services, Android Wear, and many more.  There’s nothing like getting tips on Android development from those building the operating system and tools.



Link -> fragmentedpodcast.com

Fragmented is a recently launched podcast, hosted by Donn Felker & Kaushik Gopal.  These two often provide tips, tricks, and tools tons of Android developers would benefit from exploring, such as tools for unit testing, emulator alternatives, new libraries, etc.  The latest episode (Episode 3) includes a guest developer from Trello, Dan Lew, who offers some knowledge using RxJava on Android.



Link -> autocomplete.fm

Autocomplete has a similar feel to Fragmented.  The hosts, Jay Ohms, Jordan Beck, and Michael Novak, are all Android developers who have written apps.  I know them from their work on the beautifully designed RSS app, Press.  They tend to dive into relevant Android / Android development topics of the time.  They haven’t released an episode in a few months, but their backlog is still very relevant.

Use ints instead of enums on Android

Romain Guy, an Android framework engineer, gave a great talk at Devoxx on building Android apps in a memory conscious fashion.  See the link at the end of the post for the entire slide deck.

One thing always stood out to me, using int variables instead of enums.  As great as Java enums are (self documenting, type safety, etc), the following slide convinced me not to use them unless I really needed to.

Screenshot from 2015-03-04 19:11:44


It may seem like a trivial amount, but 1) that’s an order of magnitude smaller when you use int variables instead of enums and 2) a couple thousand bytes here and there in aggregate can lead to substantial savings.  Those memory savings matter, especially on lower end devices.

-> Android Memories

The Story of Crossy Road

Several times a week, Hall says, he receives unsolicited emails from companies hoping to help Hipster Whale with things like monetization and user acquisition and all of the marketing terms that permeate the freemium gaming sector. Hall isn’t interested, even if he suspects they’d be effective, because there’s one term they use that alienates him: “Whales.” Players who spend inordinate amounts of money in free-to-play games, often despite themselves.

“Once you realize you don’t have to hunt whales, and you can make money in this way, then hopefully people will give it a shot, and we’ll get lots of cool stuff on the app store,” he says.”

I’ve received similar offers for app marketing and monetization services.  To be honest, 99% of them seem very shady.  I’m happy that it’s still very possible to make a great product and not need to flog your users for cash or resort to “shady” tactics.  $10 million in 90 days, I’d take that in a heartbeat.

-> The Story of Cross Road