-
Notifications
You must be signed in to change notification settings - Fork 371
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
InnovacationTargetException #2146
Comments
Hello @Asalerm, could you provide more info like a stack trace, SDK version, build environment, and details on how you were calling .initWithContext()? |
I am using SDK version 5.0.0 |
@jinliu9508 and when I changed it to 5.1.8 my build crashes |
@Asalerm please try out the latest SDK, 5.1.17. If you continue to see this error please provide the full stack trace. |
Here is the latest stack trace for InvocationTargetException Fatal Exception: java.lang.reflect.InvocationTargetException: Caused by java.lang.RuntimeException: Can't create handler inside thread that has not called Looper.prepare() |
from jnius import autoclass Accessing necessary Android classesPythonActivity = autoclass('org.kivy.android.PythonActivity') Get the current Android activityactivity = PythonActivity.mActivity OneSignal.initWithContext(activity, "my_app_id") OneSignal.setLogLevel(OneSignal.LOG_LEVEL.VERBOSE, OneSignal.LOG_LEVEL.NONE) Request notification permissions (optional)OneSignal.Notifications.requestPermission() I am using version 5.1.8 The error i get: InnovacationTargetException. |
@RK-AndroidDev based on the stack trace it looks like you are running OneSignal-Android-SDK 5.1.16 which is know to have this bug. Please update to 5.1.17. |
@Asalerm could you please try updating to 5.1.17? Could you provide the full stack trace of the crash? |
Closing this issue as it has been resolved in the latest SDK version, and there are no further updates. If anyone is still experiencing this issue, please try upgrading to the latest SDK and open a new issue if the problem persists after upgrading. |
This the error I get when trying to .initwithContext().
The text was updated successfully, but these errors were encountered: