From 33193af1501a649dfe1cf15e2f1ca15995da929f Mon Sep 17 00:00:00 2001 From: KenChoi Date: Wed, 1 Mar 2017 09:41:57 +0800 Subject: [PATCH] example MainActivity add init --- example/android/app/src/com/pushdemo/MainActivity.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/example/android/app/src/com/pushdemo/MainActivity.java b/example/android/app/src/com/pushdemo/MainActivity.java index e7ca864f..602ba51e 100644 --- a/example/android/app/src/com/pushdemo/MainActivity.java +++ b/example/android/app/src/com/pushdemo/MainActivity.java @@ -1,5 +1,7 @@ package com.pushdemo; +import android.os.Bundle; + import com.facebook.react.*; import com.facebook.react.modules.core.DefaultHardwareBackBtnHandler; @@ -37,6 +39,12 @@ public class MainActivity extends ReactActivity implements DefaultHardwareBackBt // setContentView(mReactRootView); // } + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + JPushInterface.init(this); + } @Override protected String getMainComponentName() { return "PushDemoApp";