Cordova Android plugin for accessing UsageStatsManager API
To access to device usage history and statistics
var success = function(success){
console.log("Sucess :: " + success);
};
var error = function(error){
console.log("Error :: " + error);
};
UsageStatistics.getUsageStatistics("Daily", success, error);
If you need to prompt the user for permission
var success = function(success){
console.log("Sucess :: " + success);
};
var error = function(error){
console.log("Error :: " + error);
};
UsageStatistics.openPermissionSettings(success, error);