CallLog access plugin in cordova is not working
<p>Hi I am developing a hybrid application using cordova. I am trying to access the last call that is missed in an android mobile using CallLog plugin.This is what I have tried,</p>

<pre><code>1.I installed the plugin with this command cordova plugin add https://github.com/dalyc/Cordova-CallLog-Plugin.git.
2.I am using angularJS.I have this app.js.

var app=angular.module('lmp', ['ngCordova']);
     app.controller('lmpctrl',['$scope', 'CallLogService', function($scope, CallLogService){
        $scope.data = {};
                $scope.callTypeDisplay = function(type) {
                    switch(type) {
                        case 1:
                            return 'Incoming';
                        case 2:
                            return 'Outgoing';
                        case 3:
                            return 'Missed';
                        default:
                            return 'Unknown';
                    }};

                CallLogService.list(1).then(
                    function(callLog) {
                        console.log(callLog);
                        $scope.data.lastCall = callLog[0];
                    },
                    function(error) {
                        console.error(error);
                    });
            }]);

     app.factory('CallLogService', ['$q', function($q) {
            return {
                list : function(days) {
                    var q = $q.defer();
                    // days is how many days back to go
                    window.plugins.calllog.list(days, function (response) {
                        q.resolve(response.rows);
                    }, function (error) {
                        q.reject(error)
                    });
                    return q.promise;
                },

                contact : function(phoneNumber) {
                    var q = $q.defer();
                    window.plugins.calllog.contact(phoneNumber, function (response) {
                        q.resolve(response);
                    }, function (error) {
                        q.reject(error)
                    });
                    return q.promise;
                },

                show : function(phoneNumber) {
                    var q = $q.defer();
                    window.plugins.calllog.show(phoneNumber, function (response) {
                        q.resolve(response);
                    }, function (error) {
                        q.reject(error)
                    });
                    return q.promise;
                },

                delete : function(phoneNumber) {
                    var q = $q.defer();
                    window.plugins.calllog.delete(id, function (response) {
                        q.resolve(response);
                    }, function (error) {
                        q.reject(error)
                    });
                    return q.promise;
                }
            }
        }]);

3.This is my index.html.

&lt;body ng-app="lmp"&gt;
        &lt;div ng-controller="lmpctrl"&gt;

            &lt;div class="row"&gt;
                &lt;div class="col"&gt;Last Call&lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="row"&gt;
                &lt;div class="col col-30 col-offset-10"&gt;Name&lt;/div&gt;
                &lt;div class="col"&gt;{{data.lastCall.cachedName}}&lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="row"&gt;
                &lt;div class="col col-30 col-offset-10"&gt;Number&lt;/div&gt;
                &lt;div class="col"&gt;{{data.lastCall.number}}&lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="row"&gt;
                &lt;div class="col col-30 col-offset-10"&gt;Type&lt;/div&gt;
                &lt;div class="col"&gt;{{callTypeDisplay(data.lastCall.type)}}&lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="row"&gt;
                &lt;div class="col col-30 col-offset-10"&gt;Date&lt;/div&gt;
                &lt;div class="col"&gt;{{data.lastCall.date | date}}&lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="row"&gt;
                &lt;div class="col col-30 col-offset-10"&gt;Duration&lt;/div&gt;
                &lt;div class="col"&gt;{{data.lastCall.duration}} seconds&lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="row"&gt;
                &lt;div class="col col-30 col-offset-10"&gt;Acknowledged&lt;/div&gt;
                &lt;div class="col"&gt;{{(data.lastCall.new == 1 ? 'yes' : 'no')}}&lt;/div&gt;
            &lt;/div&gt;

        &lt;/div&gt;
        &lt;script src="js/angular.min.js"&gt;&lt;/script&gt;
          &lt;script src="js/app.js"&gt;&lt;/script&gt;
        &lt;script src="js/ng-cordova.js"&gt;&lt;/script&gt;
        &lt;script type="text/javascript" src="cordova.js"&gt;&lt;/script&gt;
        &lt;script type="text/javascript" src="js/index.js"&gt;&lt;/script&gt;

4.I added this following code in my config.xml
&lt;feature name="CallLog"&gt;
                &lt;param name="android-package" value="com.ubookr.plugins.CallLogPlugin"/&gt;
            &lt;/feature&gt;
</code></pre>

<p>Am I missing something or Am I wrong by someway. Can someone please help me.thanks in advance.</p>