Permalink
Browse files

fix bug with android not sending cached message

Scenario: User taps the push notification when the app is not running.  The push notification is not being sent after the app is launched.
  • Loading branch information...
keithdmoore committed Apr 29, 2014
1 parent 857b438 commit 95db7d91610fdf410b0be544b43ef5bbeb63d749
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/android/org/jboss/aerogear/cordova/push/PushPlugin.java
@@ -20,7 +20,6 @@
import android.content.SharedPreferences;
import android.os.Bundle;
import android.util.Log;
-import android.webkit.ValueCallback;
import com.google.android.gcm.GCMRegistrar;
import org.apache.cordova.*;
import org.jboss.aerogear.android.Callback;
@@ -96,10 +95,9 @@ public void run() {
register(callbackContext);
}
});
-
- return true;
} catch (JSONException e) {
callbackContext.error(e.getMessage());
+ return false;
}
if (cachedMessage != null) {
@@ -108,6 +106,7 @@ public void run() {
cachedMessage = null;
}
+ return true;
} else if (UNREGISTER.equals(action)) {
unRegister(callbackContext);

0 comments on commit 95db7d9

Please sign in to comment.