Display call logs


#1

hi i m new to ionic, i m implementing an app in that i want to display contacts and call logs, i succesfully getting the contacts but i did not get the call logs ,so please help any one . thanks


#2

hii i m also facing same problem


#3

This may help you: https://github.com/dalyc/Cordova-CallLog-Plugin


#4

thanks for ur reply. i am already using that plugin but i did not get any call logs


#5

Do you have any errors? Please run your app with this command to see whether you get error or not:

ionic run android -l -c


#6

hi run this command ionic run android -l -c ,i got errors as shown below

0 368148 error Uncaught ReferenceError: $provide is not defined, http://192.168.0.9:8100/js/app.js, Line: 25
1 368290 error LiveReload disabled because the browser does not seem to support web sockets


#7

Without any code, how can somebody understand you? Please share a part of your aap.js about line 25.


#8

sorry.here is my code.

$provide.decorator(‘CallLogService’, [’$delegate’, ‘$q’, function ($delegate, $q) {
if (window.plugins && window.plugins.calllog) {
return $delegate;
} else {
return {
list : function() {
var lastCall = {
cachedName: ‘apoorva’,
cachedNumberType: 2,
date: 1406720317112,
duration: 2224,
new: 1,
number: ‘0428889999’,
type: 1
};
return $q.when([lastCall]);
},
contact : function() {
return $q.when({});
},
show : function() {
return $q.when(true);
}
};
}
}]);


#9

Did you inject $provide ?


#10

same error? how to solve it


#11

how to inject $provide?