大神们,有知道什么原因吗?部分低端机型会carsh。
#if CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID
JniMethodInfo minfo;
cocos2d::log("JniFun::longinWX");
bool isHave = JniHelper::getStaticMethodInfo(minfo,JAVA_CLASSNAME,"LoginWX","(Ljava/lang/String;Ljava/lang/String;)V");
if (isHave)
{
jstring jAPP_ID = minfo.env->NewStringUTF(APP_ID);
jstring jAppSecret = minfo.env->NewStringUTF(AppSecret);
minfo.env->CallStaticVoidMethod(minfo.classID, minfo.methodID,jAPP_ID,jAppSecret);
minfo.env->DeleteLocalRef(jAPP_ID);
minfo.env->DeleteLocalRef(jAppSecret);
minfo.env->DeleteLocalRef(minfo.classID);
cocos2d::log("JniFun::longinWX call LoginWX over!");
}
else
{
cocos2d::log("JniFun call LoginWX error!");
}
#endif
JNIEXPORT void JNICALL Java_org_cocos2dx_cpp_Native_WxLoginGetAccessToken (JNIEnv* env, jclass method, jstring param)
{
const char* data = env->GetStringUTFChars(param, 0);
cocos2d::log("JinCallBack :%s",data);
MissionWeiXin::Instance().Req_Access_token(data);
env->ReleaseStringUTFChars(param, data);
}
09-15 19:25:22.975: V/AlarmManager(876): Triggering alarm #0: Alarm{35178117 type 2 when 397442507 com.tencent.mm ALARM_ACTION(7093)}
09-15 19:25:23.305: D/cocos2d-x debug info(8911): 调用自动微信!
09-15 19:25:23.465: D/cocos2d-x debug info(8911): GameManagerBase::applicationWillEnterForeground
09-15 19:25:24.075: D/PowerSaveService(1821): PowerSaveReceiver EXTRA_STATUS: status = 5, lastCharging = true
09-15 19:25:24.945: D/cocos2d-x debug info(8911): 调用微信!
09-15 19:25:24.955: D/cocos2d-x debug info(8911): JniFun::longinWX
09-15 19:25:24.955: I/WXEntryActivity(8911): 开始调用
09-15 19:25:24.955: D/cocos2d-x debug info(8911): JniFun::longinWX call LoginWX over!
09-15 19:25:24.955: I/ActivityManager(876): START u0 {cmp=com.juyou.puermj/.wxapi.WXEntryActivity (has extras)} from uid 10125 and from pid 8911 on display 0
09-15 19:25:24.965: V/WindowManager(876): addAppToken: AppWindowToken{79e7ce9 token=Token{1d09d170 ActivityRecord{2e8917b3 u0 com.juyou.puermj/.wxapi.WXEntryActivity t106}}} to stack=1 task=106 at 1
09-15 19:25:24.975: D/Cocos2dxActivity(8911): onPause()
09-15 19:25:24.975: V/MicroMsg.SDK.WXApiImplV10.ActivityLifecycleCb(8911): org.cocos2dx.cpp.AppActivity onActivityPaused
09-15 19:25:24.975: E/生命周期(8911): onPause
09-15 19:25:25.045: D/MicroMsg.PaySdk.WXFactory(8911): createWXAPI, appId =wx78a643b80ceb33ff, checkSignature = true
09-15 19:25:25.045: D/MicroMsg.SDK.WXApiImplV10(8911): <init>, appId = wx78a643b80ceb33ff, checkSignature = true
09-15 19:25:25.045: D/MicroMsg.SDK.WXMsgImplComm(8911): check signature:308202eb30820254a00302010202044d36f7a4300d06092a864886f70d01010505003081b9310b300906035504061302383631123010060355040813094775616e67646f6e673111300f060355040713085368656e7a68656e31353033060355040a132c54656e63656e7420546563686e6f6c6f6779285368656e7a68656e2920436f6d70616e79204c696d69746564313a3038060355040b133154656e63656e74204775616e677a686f7520526573656172636820616e6420446576656c6f706d656e742043656e7465723110300e0603550403130754656e63656e74301e170d3131303131393134333933325a170d3431303131313134333933325a3081b9310b300906035504061302383631123010060355040813094775616e67646f6e673111300f060355040713085368656e7a68656e31353033060355040a132c54656e63656e7420546563686e6f6c6f6779285368656e7a68656e2920436f6d70616e79204c696d69746564313a3038060355040b133154656e63656e74204775616e677a686f7520526573656172636820616e6420446576656c6f706d656e742043656e7465723110300e0603550403130754656e63656e7430819f300d06092a864886f70d010101050003818d0030818902818100c05f34b231b083fb1323670bfbe7bdab40c0c0a6efc87ef2072a1ff0d60cc67c8edb0d0847f210bea6cbfaa241be70c86daf56be08b723c859e52428a064555d80db448cdcacc1aea2501eba06f8bad12a4fa49d85cacd7abeb68945a5cb5e061629b52e3254c373550ee4e40cb7c8ae6f7a8151ccd8df582d446f39ae0c5e930203010001300d06092a864886f70d0101050500038181009c8d9d7f2f908c42081b4c764c377109a8b2c70582422125ce545842d5f520aea69550b6bd8bfd94e987b75a3077eb04ad341f481aac266e89d3864456e69fba13df018acdc168b9a19dfd7ad9d9cc6f6ace57c746515f71234df3a053e33ba93ece5cd0fc15f3e389a3f365588a9fcb439e069d3629cd7732a13fff7b891499
09-15 19:25:25.045: D/MicroMsg.SDK.WXMsgImplComm(8911): pass
09-15 19:25:25.045: D/MicroMsg.SDK.WXApiImplV10(8911): registerApp, appId = wx78a643b80ceb33ff
09-15 19:25:25.045: D/MicroMsg.SDK.WXApiImplV10(8911): registerApp, appId =wx78a643b80ceb33ff
09-15 19:25:25.045: D/MicroMsg.SDK.WXApiImplV10(8911): register app com.juyou.puermj
09-15 19:25:25.045: D/MicroMsg.SDK.MMessage(8911): send mm message, intent=Intent { act=com.tencent.mm.plugin.openapi.Intent.ACTION_HANDLE_APP_REGISTER (has extras) }, perm=com.tencent.mm.permission.MM_MESSAGE
09-15 19:25:25.045: I/MicroMsg.SDK.WXApiImplV10(8911): handleIntent fail, intent not from weixin msg
09-15 19:25:25.045: D/WXEntryActivity(8911): onCreate -2058795837
09-15 19:25:25.045: D/MicroMsg.SDK.WXMsgImplComm(8911): check signature:308202eb30820254a00302010202044d36f7a4300d06092a864886f70d01010505003081b9310b300906035504061302383631123010060355040813094775616e67646f6e673111300f060355040713085368656e7a68656e31353033060355040a132c54656e63656e7420546563686e6f6c6f6779285368656e7a68656e2920436f6d70616e79204c696d69746564313a3038060355040b133154656e63656e74204775616e677a686f7520526573656172636820616e6420446576656c6f706d656e742043656e7465723110300e0603550403130754656e63656e74301e170d3131303131393134333933325a170d3431303131313134333933325a3081b9310b300906035504061302383631123010060355040813094775616e67646f6e673111300f060355040713085368656e7a68656e31353033060355040a132c54656e63656e7420546563686e6f6c6f6779285368656e7a68656e2920436f6d70616e79204c696d69746564313a3038060355040b133154656e63656e74204775616e677a686f7520526573656172636820616e6420446576656c6f706d656e742043656e7465723110300e0603550403130754656e63656e7430819f300d06092a864886f70d010101050003818d0030818902818100c05f34b231b083fb1323670bfbe7bdab40c0c0a6efc87ef2072a1ff0d60cc67c8edb0d0847f210bea6cbfaa241be70c86daf56be08b723c859e52428a064555d80db448cdcacc1aea2501eba06f8bad12a4fa49d85cacd7abeb68945a5cb5e061629b52e3254c373550ee4e40cb7c8ae6f7a8151ccd8df582d446f39ae0c5e930203010001300d06092a864886f70d0101050500038181009c8d9d7f2f908c42081b4c764c377109a8b2c70582422125ce545842d5f520aea69550b6bd8bfd94e987b75a3077eb04ad341f481aac266e89d3864456e69fba13df018acdc168b9a19dfd7ad9d9cc6f6ace57c746515f71234df3a053e33ba93ece5cd0fc15f3e389a3f365588a9fcb439e069d3629cd7732a13fff7b891499
09-15 19:25:25.045: D/MicroMsg.SDK.WXMsgImplComm(8911): pass
09-15 19:25:25.045: I/MicroMsg.SDK.WXApiImplV10(8911): sendReq, req type = 1
09-15 19:25:25.045: D/MicroMsg.SDK.MMessageAct(8911): send, targetPkgName = com.tencent.mm, targetClassName = com.tencent.mm.plugin.base.stub.WXEntryActivity
09-15 19:25:25.055: I/ActivityManager(876): START u0 {flg=0x18000000 cmp=com.tencent.mm/.plugin.base.stub.WXEntryActivity (has extras)} from uid 10125 and from pid 8911 on display 0
09-15 19:25:25.065: W/ResourcesManager(876): Asset path '/system/framework/com.android.support.jar' does not exist or contains no resources.
09-15 19:25:25.065: V/WindowManager(876): Changing focus from Window{3ad9385a u0 com.juyou.puermj/org.cocos2dx.cpp.AppActivity} to null Callers=com.android.server.wm.WindowManagerService.moveStackWindowsLocked:5430 com.android.server.wm.WindowManagerService.moveTaskToTop:5466 com.android.server.am.ActivityStack.moveToFront:587 com.android.server.am.ActivityStackSupervisor.startActivityUncheckedLocked:2926
09-15 19:25:25.065: V/WindowManager(876): addAppToken: AppWindowToken{358fea5 token=Token{2b92949c ActivityRecord{28737c0f u0 com.tencent.mm/.plugin.base.stub.WXEntryActivity t110}}} to stack=1 task=110 at 0
09-15 19:25:25.075: D/MicroMsg.SDK.MMessageAct(8911): send mm message, intent=Intent { flg=0x18000000 cmp=com.tencent.mm/.plugin.base.stub.WXEntryActivity (has extras) }
09-15 19:25:25.075: D/WXEntryActivity(8911): reqLogin
09-15 19:25:25.075: D/Cocos2dxActivity(8911): onWindowFocusChanged() hasFocus=false
09-15 19:25:25.125: D/PackageReceiver(1821): onReceive, action is: android.intent.action.OPPO_ROM_APP_CHANGE
09-15 19:25:25.125: D/OppoNetworkControl_PackageReceiver(1821): packageName = com.tencent.mm
09-15 19:25:25.125: D/OppoNetworkControl_PackageReceiver(1821): hasShow = false
09-15 19:25:25.125: D/PackageReceiver(1821): networkType = 1, getCount = 1, getColumnCount = 1
09-15 19:25:25.125: D/PackageReceiver(1821): c.getInt(0) = 1, getColumnName(0) = wifi_state
09-15 19:25:25.125: D/PackageReceiver(1821): packageName = com.tencent.mm, state = true
09-15 19:25:25.165: I/ActivityManager(876): START u0 {flg=0x14000000 cmp=com.tencent.mm/.plugin.base.stub.UIEntryStub (has extras)} from uid 10124 and from pid 6880 on display 0
09-15 19:25:25.175: V/WindowManager(876): Changing focus from null to Window{3ad9385a u0 com.juyou.puermj/org.cocos2dx.cpp.AppActivity} Callers=com.android.server.wm.WindowManagerService.moveStackWindowsLocked:5430 com.android.server.wm.WindowManagerService.moveTaskToTop:5466 com.android.server.am.ActivityStack.moveToFront:587 com.android.server.am.ActivityStackSupervisor.startActivityUncheckedLocked:2632
09-15 19:25:25.185: V/WindowManager(876): addAppToken: AppWindowToken{3e42ac46 token=Token{137fe021 ActivityRecord{36825e88 u0 com.tencent.mm/.plugin.base.stub.UIEntryStub t110}}} to stack=1 task=110 at 1
09-15 19:25:25.185: D/Cocos2dxActivity(8911): onWindowFocusChanged() hasFocus=true
09-15 19:25:25.185: D/cocos2d-x debug info(8911): GameManagerBase::applicationWillEnterForeground
09-15 19:25:25.185: W/InputMethodManagerService(876): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@1704de07 attribute=null, token = android.os.BinderProxy@3fef8005
09-15 19:25:25.215: I/ActivityManager(876): START u0 {cmp=com.tencent.mm/.plugin.webview.ui.tools.OAuthUI (has extras)} from uid 10124 and from pid 6880 on display 0
09-15 19:25:25.225: V/WindowManager(876): addAppToken: AppWindowToken{29ed46d2 token=Token{d95d5d ActivityRecord{922db34 u0 com.tencent.mm/.plugin.webview.ui.tools.OAuthUI t110}}} to stack=1 task=110 at 2
09-15 19:25:25.225: V/WindowManager(876): Based on layer: Adding window Window{37ac76a0 u0 com.tencent.mm/com.tencent.mm.plugin.base.stub.UIEntryStub} at 7 of 13
09-15 19:25:25.245: V/WindowManager(876): Changing focus from Window{3ad9385a u0 com.juyou.puermj/org.cocos2dx.cpp.AppActivity} to Window{37ac76a0 u0 com.tencent.mm/com.tencent.mm.plugin.base.stub.UIEntryStub} Callers=com.android.server.wm.WindowManagerService.relayoutWindow:3501 com.android.server.wm.Session.relayout:197 android.view.IWindowSession$Stub.onTransact:273 com.android.server.wm.Session.onTransact:130
09-15 19:25:25.325: D/Cocos2dxActivity(8911): onWindowFocusChanged() hasFocus=false
09-15 19:25:25.425: W/art(7522): Attempt to remove local handle scope entry from IRT, ignoring
09-15 19:25:25.425: W/AwContents(7522): onDetachedFromWindow called when already detached. Ignoring
09-15 19:25:25.505: I/ActivityManager(876): Config changes=480 {1.0 ?mcc?mnc zh_CN ?layoutDir sw360dp w360dp h614dp 240dpi nrml long port finger -keyb/v/h -nav/h s.71mThemeChanged = 0mThemeChangedFlags = 0mFlipFont = 0}
09-15 19:25:25.525: D/Tinker.DefaultAppLike(8466): onConfigurationChanged:{1.0 ?mcc?mnc zh_CN ?layoutDir sw360dp w360dp h614dp 240dpi nrml long port finger -keyb/v/h -nav/h s.71mThemeChanged = 0mThemeChangedFlags = 0mFlipFont = 0}
09-15 19:25:25.545: W/Adreno-EGLSUB(272): <DequeueBuffer:721>: dequeue native buffer fail: Broken pipe, buffer=0x0, handle=0x0
09-15 19:25:25.545: W/Adreno-EGL(272): <qeglDrvAPI_eglSwapBuffers:3712>: EGL_BAD_SURFACE
09-15 19:25:25.555: W/libEGL(272): EGLNativeWindowType 0x55a37cd260 disconnect failed
09-15 19:25:25.555: D/OppoDragWindowPolicy(1883): ----------- onConfigChanged newConfig.orientation = 1
09-15 19:25:25.565: D/Tinker.DefaultAppLike(8563): onConfigurationChanged:{1.0 ?mcc?mnc zh_CN ?layoutDir sw360dp w360dp h614dp 240dpi nrml long port finger -keyb/v/h -nav/h s.71mThemeChanged = 0mThemeChangedFlags = 0mFlipFont = 0}
09-15 19:25:25.565: V/ActivityManager(876): Display changed displayId=0
09-15 19:25:25.575: D/PhoneInterfaceManager(1640): [PhoneIntfMgr] getDataEnabled: subId=1 phoneId=0
09-15 19:25:25.575: D/PhoneInterfaceManager(1640): [PhoneIntfMgr] getDataEnabled: subId=1 retVal=true
09-15 19:25:25.585: E/BitmapFactory(1549): Unable to decode stream: java.io.FileNotFoundException: /data/data/com.sohu.inputmethod.sogouoem/files/.theme/sogou/res/composing_bg.png: open failed: ENOENT (No such file or directory)
09-15 19:25:25.585: V/WindowManager(876): Changing focus from Window{37ac76a0 u0 com.tencent.mm/com.tencent.mm.plugin.base.stub.UIEntryStub} to null Callers=com.android.server.wm.WindowManagerService.handleAppTransitionReadyLocked:10009 com.android.server.wm.WindowManagerService.performLayoutAndPlaceSurfacesLockedInner:10595 com.android.server.wm.WindowManagerService.performLayoutAndPlaceSurfacesLockedLoop:9388 com.android.server.wm.WindowManagerService.performLayoutAndPlaceSurfacesLocked:9330
09-15 19:25:25.585: E/BitmapFactory(1549): Unable to decode stream: java.io.FileNotFoundException: /data/data/com.sohu.inputmethod.sogouoem/files/.theme/sogou/res/composing_bg.png: open failed: ENOENT (No such file or directory)
09-15 19:25:25.595: I/InputReader(876): Reconfiguring input devices. changes=0x00000004
09-15 19:25:25.605: I/InputReader(876): Device reconfigured: id=5, name='synaptics-s3203', size 540x960, orientation 0, mode 1, display id 0
09-15 19:25:25.605: D/AudioService(876): config_camera_sound_forced= false
09-15 19:25:25.665: V/WindowManager(876): Adding window Window{1934b2f6 u0 com.tencent.mm/com.tencent.mm.plugin.webview.ui.tools.OAuthUI} at 6 of 14 (after Window{37ac76a0 u0 com.tencent.mm/com.tencent.mm.plugin.base.stub.UIEntryStub})
09-15 19:25:25.685: D/ViewRootImpl(7522): changeCanvasOpacity: opaque=true
09-15 19:25:25.735: V/WindowManager(876): Changing focus from null to Window{1934b2f6 u0 com.tencent.mm/com.tencent.mm.plugin.webview.ui.tools.OAuthUI} Callers=com.android.server.wm.WindowManagerService.relayoutWindow:3501 com.android.server.wm.Session.relayout:197 android.view.IWindowSession$Stub.onTransact:273 com.android.server.wm.Session.onTransact:130
09-15 19:25:25.775: D/PhoneInterfaceManager(1640): [PhoneIntfMgr] getDataEnabled: subId=1 phoneId=0
09-15 19:25:25.775: D/PhoneInterfaceManager(1640): [PhoneIntfMgr] getDataEnabled: subId=1 retVal=true
09-15 19:25:25.785: W/IInputConnectionWrapper(6880): showStatusIcon on inactive InputConnection
09-15 19:25:25.795: I/ActivityManager(876): Displayed com.tencent.mm/.plugin.webview.ui.tools.OAuthUI: +524ms (total +822ms)
09-15 19:25:25.795: V/MicroMsg.SDK.WXApiImplV10.ActivityLifecycleCb(8911): WXStat trigger onBackground
09-15 19:25:25.795: E/生命周期(8911): onStop
09-15 19:25:25.795: I/WindowManager(876): Screen frozen for +331ms due to Window{1934b2f6 u0 com.tencent.mm/com.tencent.mm.plugin.webview.ui.tools.OAuthUI}
09-15 19:25:25.805: D/PhoneInterfaceManager(1640): [PhoneIntfMgr] getDataEnabled: subId=1 phoneId=0
09-15 19:25:25.805: D/PhoneInterfaceManager(1640): [PhoneIntfMgr] getDataEnabled: subId=1 retVal=true
09-15 19:25:26.515: W/art(7093): Native thread exiting without having called DetachCurrentThread (maybe it's going to use a pthread_key_create destructor?): Thread[23,tid=9078,Native,Thread*=0xabbae818,peer=0x4240b0a0,"default"]
09-15 19:25:27.955: I/art(876): Explicit concurrent mark sweep GC freed 34222(1874KB) AllocSpace objects, 4(640KB) LOS objects, 33% free, 16MB/25MB, paused 1.718ms total 142.238ms
09-15 19:25:28.485: D/TaskPersister(876): removeObsoleteFile: deleting file=108_task_thumbnail.png
09-15 19:25:30.095: V/OppoProcessManager(876): kill 8911
09-15 19:25:30.095: I/Process(876): Sending signal. PID: 8911 SIG: 9
09-15 19:25:30.215: D/GpsStatusListenerHelper(876): Remote Listener died: android.location.IGpsStatusListener$Stub$Proxy@12251139