Commit d3cdd711 authored by Sebastián Katzer's avatar Sebastián Katzer
Browse files

App throwed an error at restart if a callback was registered

parent 448b220d
Loading
Loading
Loading
Loading
+2 −0
Changes for README.md: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -47,7 +47,9 @@ More informations can be found [here](https://build.phonegap.com/plugins/413).

## Release Notes
#### Version 0.7.1 (not yet released)
- [bugfix:] `ongoing` attribute was ignored.
- [bugfix:] `oncancel` wasnt fired if `autoCancel` was set to true.
- [bugfix:] App throwed an error at restart if a callback was registered.

#### Version 0.7.0 (22.01.2014)
**Note:** The new way of callback registration will be not compatible with previous versions! See #62
+4 −0
Changes for src/android/LocalNotification.java: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -275,7 +275,11 @@ public class LocalNotification extends CordovaPlugin {
     * Gibt an, ob die App im Hintergrund läuft.
     */
    private static boolean isInBackground () {
        try {
            return !context.getPackageName().equalsIgnoreCase(((ActivityManager)context.getSystemService(Context.ACTIVITY_SERVICE)).getRunningTasks(1).get(0).topActivity.getPackageName());
        } catch (Exception e) {
            return true;
        }
    }

    /**