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

If the webview is not created, firstly start the main intent and then exec the callback

parent 5b196033
Loading
Loading
Loading
Loading
+5 −0
Changes for src/android/ReceiverActivity.java: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -43,8 +43,13 @@ public class ReceiverActivity extends Activity {
            JSONObject args = new JSONObject(bundle.getString(Receiver.OPTIONS));
            Options options = new Options(getApplicationContext()).parse(args);

            if (LocalNotification.webView == null) {
                launchMainIntent();
                invokeBackgroundCallback(options);
            } else {
                invokeBackgroundCallback(options);
                launchMainIntent();
            }
        } catch (JSONException e) {}
    }