Comments (11)
No sure if this is applicable but this is based on - https://github.com/dvtoever/phonegap-plugins/tree/master/Android/LocalNotification
There is mention of AndroidManifest.xml and adding to it.
From the other project:
"The first part tells Android to launch the AlarmReceiver class when the alarm is be triggered. This will also work when the application is not running."
from cordova-plugin-local-notifications.
The broadcast receiver is still listed in the manifest. Otherwise a notification would never popup.
I will take a look in a free minute.
from cordova-plugin-local-notifications.
Does work for me if I test your test scenario with an simulator.
from cordova-plugin-local-notifications.
Thanks for the feedback.
I tested id on HTC One V. The scenario was always the same.
I'll do some more tests and come back to you.
from cordova-plugin-local-notifications.
I have the same issue when I'm testing this on Samsung Galaxy S4 (Android 4.3). Namely, when app is running everything works as intended but when it's closed I receive an alert saying 'Unofrtunately, APPNAME has stopped.' I'm not Android developer and I'm concerned if AlertManager provides full functionality of local notifications - there is another class NotificationManager /builder which sounds more accurate. Any thoughts on this?
Please find the screenshot below.
from cordova-plugin-local-notifications.
OK, it is fixed (aacd804)
from cordova-plugin-local-notifications.
Commit aacd804 causes build failure- I've put a comment in a respective place.
But the fix is valid- the notification is there after the app is killed. Many thanks!
from cordova-plugin-local-notifications.
Have fixed it. Forgot to copy that ...
from cordova-plugin-local-notifications.
Plugin after recent fix (for Android) wakes up the application from the background and method invokeBackgroundCallback(Options options) of class ReceiverActivity.java is being fired but a line of code "LocalNotification.webView.sendJavascript(function + "(" + options.getId() + ")");" causes the error "Application Error - The connection to the server was unsuccessful. (file:///android_asset/www/index.html) ". Before the error appears there is 20 seconds of completely black screen. When I close the alert window, the target JavaScript function is being fired finally.
Screen with mentioned error:
Tested on Samsung Galaxy Nexus with Android 4.3
from cordova-plugin-local-notifications.
Same here. Same HTC One V.
from cordova-plugin-local-notifications.
I could not reproduce that message. But I think its not related to the plugin.
I guess maybe your internet connection may be to slow. Here what I found so far:
- http://dev.wavemaker.com/wiki/bin/wmdoc_6.5/PhoneGap?xpage=print#HTheconnectiontotheserverwasunsucessful28file3A2F2F2Fandroidasset2Fwww2Findexhtml29
- http://rickluna.com/wp/2012/04/solving-the-connection-to-the-server-was-unsuccessful-error-in-androidphonegap/
from cordova-plugin-local-notifications.
Related Issues (20)
- UIWebView error when submiting to the app store
- compile() deprecated since gradle 8.0 in /src/android/build/localnotification.gradle HOT 13
- When the notification is displayed the code in the subscription event 'trigger' & 'click' hasn't been executed on iOS even app running either foreground/background. HOT 1
- Getting a build error after migrating our Ionic 5 app from Cordova 10 to Cordova 11 LOCAL NOTIFICATIONS HOT 8
- Android Build for Android Platfom 10.1.2 or 11.0.0 Crashes the app. HOT 16
- iOS: Location Trigger Notification No Longer Working
- Local Notifications Trigger events Not working on Android 12 HOT 1
- Android 12 (SDK 31+): Tap on notifications only opens app when notifications are grouped. HOT 50
- bug: Gradle 7 compatibility HOT 6
- Local notifications does not subscribe to events when the notification is triggered in the background or when device is Locked on IOS Device 16.1.2 OS HOT 1
- Local Notifications Subscribe to events when app is in the background IOS: Help please
- Small Icon and Trigger Notification in Android 12
- Play custom audio files on Ionic Cordova Local Notifications IOS
- Android 12+ notification permissions not requested and showing as blocked HOT 10
- Apps Now Having Problems Adding Plugin HOT 1
- Plugin get installed, app get compiled and launched on android, but notification is just not working. HOT 1
- Notification group with actions at a particular time
- When I click notification app crashes HOT 2
- request permission is never fired at all on android 13 HOT 4
- NullPointerException from isInForeground
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-plugin-local-notifications.