Creating Lightweight SDKs

Should Be

Must be stable
Don’t take features away
Catch all exceptions only throw if in debug mode
Should create a test app
Easy to use

Interacting with Users without Activity

Use Toasts – customized
launch browser


Avoid if possible
Check permissions in runtime

Java Docs

Use them


use @Deprecated annotation

Binary Footprint (Size)

Average game size 40MB
Average App 6MB

Reducing Size

Use ProGuard shrinks by 4% to 53% in practice
DexGuard paid service specific to android (byte code level)

Startup Time

Don’t run on main thread

Network Usage

protobuf – fast server communication 700k, 100x faster

CPU Usage

Use exponential backoff
Only log in debug mode
Monitor with — adb shell top -m 10

Battery Usage

Optimize network transfers – use bundled transfers
PhoneStateListener – onDataActivity(int) to piggy back on existing data transfers

This entry was posted in Uncategorized and tagged . Bookmark the permalink.

One Response to Creating Lightweight SDKs

  1. Winand Van Meerbeek says:

    Hi there, can you please remove the link to DexGuard from this blog? Thank you in advance!

Leave a Reply

Your email address will not be published. Required fields are marked *