Tricks for Android App Development

July 24, 2015

Policy override

Well good practice says your UI should be fluid. What happens when you don’t care yet and just want the damn thing running? You need to tell Android not to crash your app.

StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
StrictMode.setThreadPolicy(policy);

Starting intents over ADB

When working on stuff collaboratively, you may end up working on an activity, or fragment before it is linked to…

Just use ADB to get to your activity!

am start -a com.example.ACTION_NAME -n com.package.name/com.package.name.ActivityName

Forget the XMLs

Everybody on the interwebs seems to be crazy about this XML stuff… I must be getting something wrong, but the only way I can really get productive is if I forget about that XML stuff and just do everything programatically. The only problem seems to find proper documentation to do Material design respecting applications… I may come back on that one later.