Skip to content

app crash when app is not currently active #1

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

Closed
omerfarukz opened this issue May 9, 2015 · 12 comments
Closed

app crash when app is not currently active #1

omerfarukz opened this issue May 9, 2015 · 12 comments

Comments

@omerfarukz
Copy link

tried some variations of this plugin. thats perfect. but i got an issue. created a new notification with 10secs delay and closed application(not exit, only pause). after 10 seconds, app crashed. logs are bellow. thanks.

E/AndroidRuntime(10937): Process: com.omr, PID: 10937
E/AndroidRuntime(10937): java.lang.Error: FATAL EXCEPTION [main]
E/AndroidRuntime(10937): Unity version : 5.0.0f4
E/AndroidRuntime(10937): Device model : asus Nexus 7
E/AndroidRuntime(10937): Device fingerprint: google/razor/flo:5.1/LMY47O/1783956:user/release-keys
E/AndroidRuntime(10937):
E/AndroidRuntime(10937): Caused by: java.lang.RuntimeException: Unable to start receiver net.agasper.unitynotification.UnityNotificationManager: java.lang.NullPointerException
E/AndroidRuntime(10937): at android.app.ActivityThread.handleReceiver(ActivityThread.java:2616)
E/AndroidRuntime(10937): at android.app.ActivityThread.access$1700(ActivityThread.java:151)
E/AndroidRuntime(10937): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1380)
E/AndroidRuntime(10937): at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(10937): at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime(10937): at android.app.ActivityThread.main(ActivityThread.java:5254)
E/AndroidRuntime(10937): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(10937): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime(10937): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
E/AndroidRuntime(10937): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
E/AndroidRuntime(10937): Caused by: java.lang.NullPointerException
E/AndroidRuntime(10937): at java.lang.Class.classForName(Native Method)
E/AndroidRuntime(10937): at java.lang.Class.forName(Class.java:309)
E/AndroidRuntime(10937): at java.lang.Class.forName(Class.java:273)
E/AndroidRuntime(10937): at net.agasper.unitynotification.UnityNotificationManager.onReceive(UnityNotificationManager.java:88)

@omerfarukz omerfarukz changed the title app crash on future notifications app crash when app is not currently active May 9, 2015
@Agasper
Copy link
Owner

Agasper commented May 10, 2015

I can't repeat this problem. Please post your manifest file

@omerfarukz
Copy link
Author

would you like to share sample project?

@Agasper
Copy link
Owner

Agasper commented May 10, 2015

Are you just edit timer in sample project and got that ?

@omerfarukz
Copy link
Author

himm, i think its mine problem. your sample project works correctly. what is my mistake? copied asset folder to my project only. what are the next steps can i do?

@Agasper
Copy link
Owner

Agasper commented May 10, 2015

Did you edit manifest file ?

@omerfarukz
Copy link
Author

no, its identical to yours

@Agasper
Copy link
Owner

Agasper commented May 10, 2015

I didn't test it on Unity 5.x, maybe problem in it
Try to change
private static string unityClass = "com.unity3d.player.UnityPlayerNativeActivity";
to
private static string unityClass = "com.unity3d.player.UnityPlayerActivity";

@omerfarukz
Copy link
Author

already upgraded your project to untiy 5. its works normally. my project going to crash when suspended or closed.

@Agasper
Copy link
Owner

Agasper commented May 10, 2015

Send me your project to [email protected], i'll take a look

@omerfarukz
Copy link
Author

removed clear notification code and the problem is solved. i,m not need it. Because notification's not duplicated when i am using same notification id. thank you very much.

@Agasper
Copy link
Owner

Agasper commented May 10, 2015

you are welcome

@zulqarnain26
Copy link

Removed clear notification but still getting the same crash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants