Skip to content
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

app crashes after receiving push message on android. #90

Open
emreayaydin opened this issue Feb 1, 2016 · 6 comments
Open

app crashes after receiving push message on android. #90

emreayaydin opened this issue Feb 1, 2016 · 6 comments

Comments

@emreayaydin
Copy link

Hello there!
Thank you for your ane. It works on ios perfectly but on android doesn't. When I sent a push notification from server app crashes suddenly. Please help!

@mrfrasier
Copy link

I'm seeing the same on android

Image

@Laur3nt1u
Copy link

Read issue #88

@mrfrasier
Copy link

Thanks, I did after this one, but there doesn't seem to be a resolution there. I did see your post and worked to remove google services, but because it's used by more than one ANE, it's not exactly practical in our situation.

@skolesnyk
Copy link

I've managed to compile the ANE to be compatible with OneSignal. I'll make a few changes to remove project specific icons and will push to my repo.

One thing, though, it only works specifically through my rest server. For full onesignal compatibility one should purchase Milkman's ANE.

@redsparrowWang
Copy link

redsparrowWang commented Aug 31, 2016

i had recompile ANE , when receive notification i got this error

08-31 08:45:48.410 12608-12608/? E/dalvikvm: Could not find class 'android.support.v4.app.NotificationCompat$Builder', referenced from method com.freshplanet.nativeExtensions.CreateNotificationTask.onPostExecute
08-31 08:45:48.410 12608-12608/? W/dalvikvm: VFY: unable to resolve new-instance 164 (Landroid/support/v4/app/NotificationCompat$Builder;) in Lcom/freshplanet/nativeExtensions/CreateNotificationTask;
08-31 08:45:48.420 12608-12608/? W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0x41ef5438)
08-31 08:45:48.430 12608-12608/? E/AndroidRuntime: FATAL EXCEPTION: main
java.lang.NullPointerException
at com.freshplanet.nativeExtensions.CreateNotificationTask.onPostExecute(Unknown Source)
at com.freshplanet.nativeExtensions.CreateNotificationTask.onPostExecute(Unknown Source)
at android.os.AsyncTask.finish(AsyncTask.java:631)
at android.os.AsyncTask.access$600(AsyncTask.java:177)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:644)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4903)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:792)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:559)
at dalvik.system.NativeStart.main(Native Method)

@yokoboko
Copy link

yokoboko commented Apr 10, 2017

I fixed it. You can download ANE from here:
https://www.dropbox.com/s/mvjgx0tg1cmz9e1/AirPushNotification.ane?dl=0

You should send: {"contentTitle":"Title..","contentText":"Message...","tickerText":"...","priority":"2"}
*priority is optional(-2 <---> +2)
** it will not crash if you don't send all params

You will need AIR 25+

To change the icons:

  1. Rename to .zip
  2. Open with WinRar(don't extract!)
  3. Drag and drop your icons to "\META-INF\ANE\Android-ARM\res\drawable-xhdpi" to replace files
  4. Close WinRar and change file name back to .ane

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

6 participants