usage-statistics

Track multiple moving averages with Apache Commons Math DescriptiveStatistics

孤人 提交于 2019-12-24 01:55:10
问题 I am using DescriptiveStatistics to track the moving average of some metrics. I have a thread that submits the metric value every minute, and I track the 10 minute moving average of the metric by using the setWindowSize(10) method on DescriptiveStatistics. This works fine for tracking a single moving average but I actually need to track multiple moving averages, i.e. the 1 minute average, the 5 minute average, and the 10 minute average. Currently I have the following options: Have 3 different

Android get UsageStatsManager in API level 21

孤人 提交于 2019-12-22 11:09:12
问题 I need to get info about recent apps usage. Before API 21 it was used getRunningTasks or getRecentTasks to get this info. These methods were deprecated in API 21 according docs. There is UsageStatsManager class now, introduced in API level 21. But! Context.getSystemService(UsageStatsService) was added only in API level 22! The question is - how to get needed data in API 21 ?? According dashboards, there is 13% of users at this API level, I don't wanna lose them. 回答1: Well Context

Android: Get Time Spent Per Activity

安稳与你 提交于 2019-12-22 08:59:19
问题 Firstly, I'm not looking for time spent on a given application. There is already "an app for that", com.android.settings/.UsageStats , and a good deal of supporting code in the AOSP frameworks/base/services/java/com/android/server/am/UsageStatsService.java , etc. The code that I've examined so far does not seem to record elapsed time spent on particular <activity> s . I have thought to get this information two ways, but feel there must be something cleaner and simpler, that leverages more

Software usage analytics in C# [closed]

大憨熊 提交于 2019-12-20 20:41:36
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I have a project i am working on currently and would like to implement some sort of software tracking in the code. ideally, stuff like how often its launched. how long it runs for, feature tracking, etc. I already use Exceptioneer for unhandled exceptions, but would like something similar for usage tracking.

Java android track usage time installed app

我们两清 提交于 2019-12-19 08:20:08
问题 I need to track usage time of all installed apps, with java, in android OS. For example, this app is very very similar: https://play.google.com/store/apps/details?id=com.agrvaibhav.AppUsageTracking Is there a way to do this? 回答1: First of all you can use the android.app.ActivityManager to retrieve phone statue and running processes. An excellent example of doing this could be found here, Java Code Examples for android.app.ActivityManager You can also monitor the foreground activity to

Best traffic / performance / usage monitoring module?

笑着哭i 提交于 2019-12-19 03:36:42
问题 Are there any open source (or I guess commercial) packages that you can plug into your site for monitoring purposes? I'd like something that we can hook up to our ASP.NET site and use to provide reporting on things like: performance over time current load page traffic SQL performance PU time monitoring Ideally in c# :) With some sexy graphs. Edit : I'd also be happy with a package that I can feed statistics and views of data to, and it would analyse trends, spot abnormal behaviour (e.g. "no

How to get list of recent apps with Android API 21 Lollipop?

末鹿安然 提交于 2019-12-18 04:19:19
问题 I'm creating a home launcher and I want to have a compatibility with the Android 5.0, Lollipop. I want to get a list of recent apps on the launcher. But since ActivityManager.getRecentTasks() no longer works in API 21, how can I do this ? 回答1: String topPackageName ; if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { UsageStatsManager mUsageStatsManager = (UsageStatsManager)getSystemService("usagestats"); long time = System.currentTimeMillis(); // We get usage stats for the last 10

How do I programmatically show data usage of all applications?

Deadly 提交于 2019-12-17 22:16:25
问题 On Android 4.0 onwards we have data usage control options in the phone. Please check the attached screen shot for further understanding. http://developer.android.com/about/versions/android-4.0-highlights.html Now I have some requirement to check these things (All Application's Data usage in specific time period/specific days) from my application. How can I achieve this? I am also using the below class for Network Usage details. http://developer.oesf.biz/em/developer/reference/eggplant/android

How to check if “android.permission.PACKAGE_USAGE_STATS” permission is given?

六月ゝ 毕业季﹏ 提交于 2019-12-17 05:03:10
问题 Background I'm trying to get app-launched statistics, and on Lollipop it's possible by using the UsageStatsManager class, as such (original post here): manifest: <uses-permission android:name="android.permission.PACKAGE_USAGE_STATS" tools:ignore="ProtectedPermissions"/> opening the activity that will let the user confirm giving you this permission: startActivity(new Intent(Settings.ACTION_USAGE_ACCESS_SETTINGS)); getting the stats, aggregated : private static final String USAGE_STATS_SERVICE

How to use UsageStatsManager?

こ雲淡風輕ζ 提交于 2019-12-17 02:07:09
问题 Background Google has deprecated the function "getRecentTasks" of "ActivityManager" class. Now all it does is to get the list of apps that the current app has opened. I've even written a post about it here on StackOverflow, but I noticed it's impossible. The problem I've made a post about it (here, and another, similar one created by someone else, here) and requested to re-consider it, and Google decided to make a new class, that seem to provide a similar functionality (more like statistics,