Some Launchers will launch an app at it’s LAUNCH activity on top of the last point the user was at. Imagine: 1. User opens app. 2. The Launcher Activity is designated at Activity A, so that’s what opens. 3. User navigates several Activities deep and ends up at Activity D (A > B > C […]

The behavior here isn’t quite what I expected, or gather from the documentation. If you have <activity android:name=”.SomeActivity” android:launchMode=”singleTop” /> Then you start SomeActivity multiple times:

1

2

3

4

5

6

7

8

privatevoiddoIt(){

startSomeActivity();

startSomeActivity();

}

privatevoidstartSomeActivity(){

Intent intent=newIntent(this,SomeActivity.class);

startActivity(intent);

}

You’ll get only one instance of SomeActivity at the top of the stack (as the singleTop launch mode promises), but you’ll notice that if you finish() or hit […]

Butterknife, like most things by Square and/or Jake Wharton, is a very handy, very popular library. One thing that was really nice was how small and simple it was. The latest version, however, is a lot less simple, and requires multiple gradle dependencies and the apt plugin. Not a huge lift, but not exactly as […]

This is a little tricky, and isn’t precisely a version limitation. Here’s why, and how I’ve found the most reliable way to get it. 1. Environment.isExternalStorageRemovable (without parameters) is API 9+, so has broad support. If your devices primary external storage location is removable, then this will return the location you want – done. 2. […]