phonegap / phonegap-plugin-push

Register and receive push notifications
MIT License
1.94k stars 1.91k forks source link

SERVICE_NOT_AVAILBLE on Android 4.4.4 #2357

Closed angjelkom closed 6 years ago

angjelkom commented 6 years ago

Expected Behaviour

Push Plugin registers the device

Actual Behaviour

When push plugin tries to register the device a SERVICE_NOT_AVAILBLE eror is returned

Reproduce Scenario (including but not limited to)

Run the latest plugin on the latest cordova platform using fcm on Android 4.4.4 on other devices works fine

Steps to Reproduce

see above

Platform and Version (eg. Android 5.0 or iOS 9.2.1)

Android 4.4.4

(Android) What device vendor (e.g. Samsung, HTC, Sony...)

Tecent (x86)

Cordova CLI version and cordova platform version

cordova --version                                    8.0.0
cordova platform version android                    7.1.0

Plugin version

cordova plugin version | grep phonegap-plugin-push  2.2.2

E/dalvikvm(10628): Could not find class 'android.app.NotificationChannel', referenced from method com.adobe.phonegap.push.PushPlugin.createChannel W/dalvikvm(10628): VFY: unable to resolve new-instance 44 (Landroid/app/NotificationChannel;) in Lcom/adobe/phonegap/push/PushPlugin; I/dalvikvm(10628): Could not find method android.app.NotificationManager.getNotificationChannels, referenced from method com.adobe.phonegap.push.PushPlugin.createDefaultNotificationChannelIfNeeded I/dalvikvm(10628): Could not find method android.app.NotificationManager.deleteNotificationChannel, referenced from method com.adobe.phonegap.push.PushPlugin.deleteChannel I/dalvikvm(10628): Could not find method android.app.NotificationManager.getNotificationChannels, referenced from method com.adobe.phonegap.push.PushPlugin.listChannels D/dalvikvm(10628): DexOpt: unable to opt direct call 0x00ee at 0x38 in Lcom/adobe/phonegap/push/PushPlugin;.createChannel D/dalvikvm(10628): DexOpt: unable to opt direct call 0x03f1 at 0x6b in Lcom/adobe/phonegap/push/PushPlugin;.createChannel D/dalvikvm(10628): DexOpt: unable to opt direct call 0x00ee at 0x41 in Lcom/adobe/phonegap/push/PushPlugin;.createDefaultNotificationChannelIfNeeded

macdonst commented 6 years ago

@echonox this really shouldn't be happening as the calls to the methods in your stack trace should never try to be called by an Android 4.4.4 device. What is the device manufacturer?

angjelkom commented 6 years ago

@macdonst i thought the same, its chinese teclast model, i tried running sample android native app, using same minimum, target and compiled api version, and the Oreo Compatible ONLY method and code never get called

macdonst commented 6 years ago

@echonox I'm going to try and find some time over the next couple of days to spin up a 4.4.4 device to test.

macdonst commented 6 years ago

@echonox sorry I can't reproduce this issue on my devices running Android 4.4.4. I think it is a problem with the changes to the OS made by Teclast.

angjelkom commented 6 years ago

@macdonst yup i agree, tnx closing issue

lock[bot] commented 6 years ago

This thread has been automatically locked.