targetSdkVersion原本是25,打包的apk不管是Android版本多少的手機都可以出現推播的通知。
又因為google play上架,targetSdkVersion必須要調整為26以上,但調整完打包後的apk於Android 8.0或以上手機收到推播時都沒辦法出現推播通知,反而出現「APP已停止運作」。
程式專案的電腦是MAC
Cordova版本6.5.0
Ionic版本2.2.3
安裝的插件:
com-sarriaroman-photoviewer 1.1.18 “PhotoViewer”
com.phonegap.plugins.PushPlugin 2.5.0 “PushPlugin”
cordova-plugin-actionsheet 2.3.3 “ActionSheet”
cordova-plugin-app-event 1.2.0 “Application Events”
cordova-plugin-app-launcher 0.4.0 “Launcher”
cordova-plugin-app-preferences 0.99.2 “AppPreferences”
cordova-plugin-badge 0.7.2 “Badges”
cordova-plugin-brightness 0.1.5 “Brightness”
cordova-plugin-camera 2.4.1 “Camera”
cordova-plugin-clipboard-x 1.0.1 “Clipboard”
cordova-plugin-compat 1.2.0 “Compat”
cordova-plugin-console 1.0.3 “Console”
cordova-plugin-datepicker 0.9.3 “DatePicker”
cordova-plugin-device 1.1.2 “Device”
cordova-plugin-dialogs 1.3.0 “Notification”
cordova-plugin-file 4.3.3 “File”
cordova-plugin-file-transfer 1.7.1 “File Transfer”
cordova-plugin-filepath 1.0.2 “FilePath”
cordova-plugin-inappbrowser 1.5.0 “InAppBrowser”
cordova-plugin-spinner-dialog 1.3.1 “SpinnerDialog”
cordova-plugin-splashscreen 3.2.2 “Splashscreen”
cordova-plugin-statusbar 2.1.3 “StatusBar”
cordova-plugin-swift-support 3.1.1 “SwiftSupport”
cordova-plugin-whitelist 1.2.2 “Whitelist”
de.appplant.cordova.plugin.local-notification 0.8.5 “LocalNotification”
ionic-plugin-keyboard 2.2.1 “Keyboard”
phonegap-plugin-barcodescanner 6.0.8 “BarcodeScanner”
插件跟推播有關的有com.phonegap.plugins.PushPlugin、de.appplant.cordova.plugin.local-notification,版本也都更新到最新了,請插件或手機前端程式有需要做什麼修改?