Can i have examples of cordova plugins which is running?

angular.module(‘FirstApp’, [‘ionic’])
 .controller(‘InAppCtrl’, function($scope) {

$scope.alertDismissed = function () {
  $scope.inAppProjects = function () {
        ‘You are the winner!’,  // message
        alertDismissed,         // callback
        ‘Game Over’,            // title
        ‘Done’                  // buttonName
.inAppProjects will be called by ng-click inside button and it is nit reacting anything on click.

Error:Error: navigator.notification is undefined
Line 18930

Are you checking in browser ??
If yes then
You should check in device. It will work in device only.

i tried on emulator but it is not responding after clicking .Any other thing you know?

Did you add the plugin ??
If not, please add first…
$ cordova plugin add org.apache.cordova.core.dialogs
 $ cordova plugin add org.apache.cordova.core.vibration

Hi Shashikant thanks for your reply ,I did install the plugin $ cordova plugin add org.apache.cordova.core.dialogs as i need to show only notification .

Acutally the problem is “navigator.notification.confirm(’ Have you shortlisted!’,alertConfirm,‘Best of luck’,‘Go,Cancel’);” this function

It showing undefined for navigator


I am not able to reproducible .
For me in device it is working…

navigator.notification.alert('Please enter valid search terms.', null, 'Error', 'OK');

Try to remove plugin and add again … may be it will start working…

Take a look in your plugin folder if the plugin is there.
Print out your navigator via console.log if there is anything found for other plugins or your notification plugin.

If not your plugin is not successfully adde or you are not running it on a mobile environment as @shashikant mentioned before.

@bengtler thanks for your reply ,
When i printed the navigator value then it showing something like this as below it mean that plugin is installed right?
Navigator {webkitPersistentStorage: DeprecatedStorageQuota, webkitTemporaryStorage: DeprecatedStorageQuota, geolocation: Geolocation, doNotTrack: null, onLine: true…}

But I don’t understand why it is not working when i am calling something ???


I am also using camera plugin and getting the same issue


Error: navigator.notification is undefined in ionic

yeah but if your camera and notification key is not found on the navigator object your plugin is not correct added.

Can you try debug using alert in notification.js file ?

Ya @bengtler I tried that as well by uninstalling the plugin but when i tried to remove the plugin then it giving me error

And another thing when I tried to add the same plugin then it showing message plugin is already installed

Even I make a new project tried the same thing but having same issue

I m using cordova 3.5 may this create a problem ???


Yeah shashikant you were right but hw can i get alert from notification.js as it is giving me error, while running the program ?

And infact i use alerts on notification.js file but nothing appeared??


what command are you using for removing plugin???

After install plugin go inside folder.
If you are using android platform…

platforms\android\assets\www\plugins\org.apache.cordova.dialogs\www\notification.js put alert and run. alert will come....

Yes I got alert from notification.js and i am using mac , but what is the solution for that , how can i get alert of notification?

Did you try alert in side-

alert: function(message, completeCallback, title, buttonLabel) {
        var _title = (title || "Alert");
        var _buttonLabel = (buttonLabel || "OK");
        exec(completeCallback, null, "Notification", "alert", [message, _title, _buttonLabel]);

Can you create github for that project? Then i can resolve you problem easily.