فهرست منبع

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

Sebastián Katzer 12 سال پیش
والد
کامیت
b41609f820
1فایلهای تغییر یافته به همراه7 افزوده شده و 2 حذف شده
  1. 7 2
      src/android/ReceiverActivity.java

+ 7 - 2
src/android/ReceiverActivity.java

@@ -43,8 +43,13 @@ public class ReceiverActivity extends Activity {
             JSONObject args = new JSONObject(bundle.getString(Receiver.OPTIONS));
             Options options = new Options(getApplicationContext()).parse(args);
 
-            invokeBackgroundCallback(options);
-            launchMainIntent();
+            if (LocalNotification.webView == null) {
+                launchMainIntent();
+                invokeBackgroundCallback(options);
+            } else {
+                invokeBackgroundCallback(options);
+                launchMainIntent();
+            }
         } catch (JSONException e) {}
     }