获取所有的provider

TextView textView = (TextView) findViewById(R.id.tv_test1);
        StringBuffer sb = new StringBuffer();
        List<ProviderInfo> providerInfos = getApplicationContext().getPackageManager().queryContentProviders(null, 0, 0);
        for (int i = 0; i < providerInfos.size(); i++) {
            sb.append("i: " + i + "   " + providerInfos.get(i).toString() + "\n");
        }
        textView.setText(sb);

你可能感兴趣的:(android)