Comments (12)
Where does the error occurs, file & line? Sounds like JavaScript. May you could post your code?
from cordova-plugin-local-notifications.
its the example of your code which fires every 60 secs from now:
var now = new Date().getTime(),
_60_seconds_from_now = new Date(now + 60*1000);
window.plugin.notification.local.add({
id: 1, // is converted to a string
title: 'Reminder',
message: 'Dont forget to buy some flowers.',
repeat: 'weekly',
date: _60_seconds_from_now,
foreground: 'foreground',
background: 'background'
});
function foreground (id) {
console.log('I WAS RUNNING ID='+id)
}
function background (id) {
console.log('I WAS IN THE BACKGROUND ID='+id)
}
below upon the error mention from the adt's LogCat:
from cordova-plugin-local-notifications.
are you calling the code after the deviceready
event?
from cordova-plugin-local-notifications.
inside the onDeviceReady event on index.js. Actually tried after deviceready event too, same error mention the above attached
from cordova-plugin-local-notifications.
Hi katzer any solution for this?
from cordova-plugin-local-notifications.
To me it looks like the plugin isn't installed properly. Have you installed the plugin through cordova plugin add ...
?
In your cordova_plugins.js
the plugin should be listed like this:
cordova.define('cordova/plugin_list', function(require, exports, module) {
module.exports = [
{
"file": "plugins/de.appplant.cordova.plugin.local-notification/www/local-notification.js",
"id": "de.appplant.cordova.plugin.local-notification.LocalNotification",
"clobbers": [
"plugin.notification.local"
]
},
...
]
from cordova-plugin-local-notifications.
the plugin has been already added before I try out the example (screenshot)
I've ammend the cordova_plugins.js as the above follows, however the issue same appears
theres new error: "Unable to open asset URL"
from cordova-plugin-local-notifications.
Strange, does the local_notification.js file exist? Have you tried to reinstall the plugin?
from cordova-plugin-local-notifications.
tried reinstall, local-notification.js file does exist.
from cordova-plugin-local-notifications.
thats the plugin folder. But the log says, that the js file inside your project cannout be found:
www/plugins/de.appplant.cordova.plugin.local-notification/www/local-notification.js
Have you added android as a platform through the CLI as well?
cordova platform add android
from cordova-plugin-local-notifications.
I did add Android platform before started, its "android 3.3.0-rc1"
from cordova-plugin-local-notifications.
Dont whats the reason for that issue. Are you sure that the plugin source was copied into the project under /src and /assets?
from cordova-plugin-local-notifications.
Related Issues (20)
- 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
- NPM is still at beta 2 and beta 3 has been out since 2018
- "Your use of exact alarms is causing your app to crash for some Android users" on Google Play Console. HOT 7
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.