Android的那个工程模式,应用数据统计里的数据能否获取到
Android的那个工程模式,使用数据统计里的数据能否获取到?
就是拨号界面输入*#*#4636#*#*之后,会有一个使用情况统计数据,在写android程序的时候,有什么办法可以得到这些数据吗??
------解决方案--------------------
建议你看源码。。。。
就是拨号界面输入*#*#4636#*#*之后,会有一个使用情况统计数据,在写android程序的时候,有什么办法可以得到这些数据吗??
------解决方案--------------------
建议你看源码。。。。
/**
* Copyright (C) 2007 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package com.android.settings;
import com.android.internal.app.IUsageStats;
import com.android.settings.R;
import android.app.Activity;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.os.Bundle;
import android.os.RemoteException;
import android.os.ServiceManager;
import com.android.internal.os.PkgUsageStats;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.BaseAdapter;
import android.widget.ListView;
import android.widget.Spinner;
import android.widget.TextView;
import android.widget.AdapterView.OnItemSelectedListener;
/**
* Activity to display package usage statistics.
*/
public class UsageStats extends Activity implements OnItemSelectedListener {
private static final String TAG="UsageStatsActivity";
private static final boolean localLOGV = false;
private Spinner mTypeSpinner;
private ListView mListView;
private IUsageStats mUsageStatsService;
private LayoutInflater mInflater;
private UsageStatsAdapter mAdapter;
private PackageManager mPm;
public static class AppNameComparator implements Comparator<PkgUsageStats> {