-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android] - app crashed when click on back button #83
Comments
I didn't understand: "When I open another app from my app and then click default back button to go back my app". Can you give me an example of an application being opened so I can try to reproduce the error? |
This is flow:
|
I added below code to FlutterBranchSdkPlugin.java and crash is not happen now. |
Hi @uyit14 A new release was planned tomorrow because of the new version of the SDK for iOS, I will include this fix in this release. Thanks. |
@RodrigoSMarques Thanks alot. |
Updated Native `Android` and `iOS` SDKs * Android Native SDK Update 5.0.5 - [Android Version History](https://help.branch.io/developers-hub/docs/android-version-history) * iOS Native SDK Update 1.38.0 - [iOS Version History](https://help.branch.io/developers-hub/docs/ios-version-history) * Fix issue #83 - [Android - app crashed when click on back button] (#83) * Fix deprecated API usage warning
* Updated Native `Android` and `iOS` SDKs: **Android Native SDK Update 5.0.5 - [Android Version History](https://help.branch.io/developers-hub/docs/android-version-history) **iOS Native SDK Update 1.38.0 - [iOS Version History](https://help.branch.io/developers-hub/docs/ios-version-history) * Fix issue #83 - [Android - app crashed when click on back button](#83) * Fix deprecated API usage warning
When i open another app from my app and then click default back button to go back my app -> crash
D/AndroidRuntime(26074): Shutting down VM
E/AndroidRuntime(26074): FATAL EXCEPTION: main
E/AndroidRuntime(26074): Process: com.cosmosum.nonprod.staging, PID: 26074
E/AndroidRuntime(26074): java.lang.NullPointerException: Attempt to invoke interface method 'void io.flutter.plugin.common.EventChannel$EventSink.success(java.lang.Object)' on a null object reference
E/AndroidRuntime(26074): at br.com.rsmarques.flutter_branch_sdk.FlutterBranchSdkPlugin$MainThreadEventSink$1.run(FlutterBranchSdkPlugin.java:691)
E/AndroidRuntime(26074): at android.os.Handler.handleCallback(Handler.java:883)
E/AndroidRuntime(26074): at android.os.Handler.dispatchMessage(Handler.java:100)
E/AndroidRuntime(26074): at android.os.Looper.loop(Looper.java:237)
E/AndroidRuntime(26074): at android.app.ActivityThread.main(ActivityThread.java:8129)
E/AndroidRuntime(26074): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(26074): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:496)
E/AndroidRuntime(26074): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1100)
I/System.out(26074): (HTTPLog)-Static: isSBSettingEnabled false
I/System.out(26074): (HTTPLog)-Static: isSBSettingEnabled false
The text was updated successfully, but these errors were encountered: