onesignaldevelopers / onesignal-android-sample Goto Github PK
View Code? Open in Web Editor NEWDemo of integrating OneSignal into an Android application
Home Page: https://github.com/onesignal/onesignal-android-sdk
Demo of integrating OneSignal into an Android application
Home Page: https://github.com/onesignal/onesignal-android-sdk
We discovered a problem on Android where push notifications stopped working so we fired up the emulator to see if we can troubleshoot it. The only scenario that we can create that regularly reproduces the problem is quick booting on an android emulator. It seems that once we quick boot on the emulator push notifications stop coming in until a cold boot is performed. I'm not certain what relation this would have to actual devices.
I took the sample app, installed and ran it, confirmed push notifications, stopped and restarted the emulator in quick boot and confirmed that no messages were received, cold booted the emulator and the messages came in almost instantly.
Any insight would be appreciated.
Regards
error: cannot find symbol
OneSignal.User.pushSubscription.optIn();
^
symbol: variable User
location: class OneSignal
The latest (5.0.0) version of SDK crashes during initialization using OneSignal.initWithContext(Context, String) method
The attached crash log is extracted from my application
Steps :
Process: com.simpletherapy.android.mhealth, PID: 18149
java.lang.RuntimeException: Unable to create application com.simpletherapy.android.SimpleTherapyApplication: java.lang.NullPointerException: null cannot be cast to non-null type com.amazon.device.iap.PurchasingListener
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6955)
at android.app.ActivityThread.access$1300(ActivityThread.java:260)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1972)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7989)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:635)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1065)
Caused by: java.lang.NullPointerException: null cannot be cast to non-null type com.amazon.device.iap.PurchasingListener
at com.onesignal.core.internal.purchases.impl.TrackAmazonPurchase.start(TrackAmazonPurchase.kt:83)
at com.onesignal.core.internal.startup.StartupService.start(StartupService.kt:16)
at com.onesignal.internal.OneSignalImp.initWithContext(OneSignalImp.kt:247)
at com.onesignal.OneSignal.initWithContext(OneSignal.kt:126)
at com.simpletherapy.android.SimpleTherapyApplication.onCreate(SimpleTherapyApplication.java:187)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1192)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6949)
at android.app.ActivityThread.access$1300(ActivityThread.java:260)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1972)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7989)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:635)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1065)
Can you please tell me how can we get event for background notification.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.