Extras

What’s my thread again?

Blizzard wrote the sendRegistrationToBlizzard() method in BlizzardRegistration so that it can be used synchronously (in a background thread) or from the main thread.

Blink-182 recently came out with a new album, but I don’t think “What’s my thread again” made the cut.

Simple ADM Checking

ADM stands for Amazon Device Messaging.

This is a stupid-simple check to see if ADM exists (we are on an amazon device).

If ADM is new to you, Amazon provides documentation here.

Root Access Check

Interestingly, the Battle.net Authenticator app checks on start-up if you have root-access. It then shows a warning dialog if you do.

They had multiple conditions for determining root-access (mostly from this stack-overflow post).

I thought those were lackluster and inconclusive, but they did have this check which seemed more reliably correct.

Wrap-up

It’s a nice little internal library. There is a bit of strangeness in the APIs, but it would make it very easy to spin-up a new app with push.

It does a great deal of the work for the client including:

Determine Push provider and device platform.

Enforce and handle conventions around types of notifications

Handle battle.net push registration, cancellation, etc.

Built in category and action type to reuse.

Conventions and patterns for deep-linking, regions, ids, push services, and all sorts of other stuff that would be a pain to synchronize manually across multiple apps.

Next in the Android Decompile-Deepdive Series:

TBD — I’ll update this with a link to the next post once it’s done.

Enjoy the snippets?

Disagree with my analysis?

Have burning-hot fiery opinions about some random sentence above?

I’d love to hear from you, leave your comments below!