Giter Club home page Giter Club logo

Comments (12)

katzer avatar katzer commented on May 28, 2024

Where does the error occurs, file & line? Sounds like JavaScript. May you could post your code?

from cordova-plugin-local-notifications.

clonez avatar clonez commented on May 28, 2024

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:
screen shot 2014-01-03 at 1 31 19 am

from cordova-plugin-local-notifications.

katzer avatar katzer commented on May 28, 2024

are you calling the code after the devicereadyevent?

from cordova-plugin-local-notifications.

clonez avatar clonez commented on May 28, 2024

inside the onDeviceReady event on index.js. Actually tried after deviceready event too, same error mention the above attached

from cordova-plugin-local-notifications.

clonez avatar clonez commented on May 28, 2024

Hi katzer any solution for this?

from cordova-plugin-local-notifications.

katzer avatar katzer commented on May 28, 2024

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.

clonez avatar clonez commented on May 28, 2024

the plugin has been already added before I try out the example (screenshot)
screen shot 2014-01-05 at 2 20 41 am

I've ammend the cordova_plugins.js as the above follows, however the issue same appears
screen shot 2014-01-05 at 2 25 40 am

theres new error: "Unable to open asset URL"

from cordova-plugin-local-notifications.

katzer avatar katzer commented on May 28, 2024

Strange, does the local_notification.js file exist? Have you tried to reinstall the plugin?

from cordova-plugin-local-notifications.

clonez avatar clonez commented on May 28, 2024

tried reinstall, local-notification.js file does exist.
screen shot 2014-01-05 at 6 27 58 pm

from cordova-plugin-local-notifications.

katzer avatar katzer commented on May 28, 2024

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.

clonez avatar clonez commented on May 28, 2024

I did add Android platform before started, its "android 3.3.0-rc1"
screen shot 2014-01-06 at 4 12 50 pm

from cordova-plugin-local-notifications.

katzer avatar katzer commented on May 28, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.