Productivity app for Android
When the called API throws unknown exceptions I don't think that there is other way than catching all exceptions (sometimes Throwables too). +1 Jeroen Vannevel's comment too.

Anyway, a common interface might be able to improve the code a little bit:

public interface Command {

    run() throws Exception;

    String getName();

}


Then, you can have implementations, like WifiSwitcher, and call them one after the other:

final List&lt;String&gt; errors = new ArrayList&lt;String&gt;();
for (final Command command: commands) {
    try {
        command.run();
    } catch (final Exception e) {
        errors.add("Could not perform command: " + command.getName());
        if (BuildConfig.DEBUG) {
            Log.getStackTraceString(e);
        }
    }
}

if (errors.isEmpty()) {
    return true;
}
showErrorNotification(errors);
return false;


(I haven't tested nor compiled the code above.)