如何获取安装在 android phone 上的所有白日梦列表
How to get list of all daydreams installed on android phone
我已设法获取 phone 上安装的所有动态壁纸的列表。但我想获得安装在我的 android phone 上的所有白日梦的列表。有人可以帮助我了解我应该用来获取此列表的意图吗?
此代码打印设备中可用的所有 Daydream:
PackageManager packageManager = getPackageManager();
Intent dreamIntent = new Intent(DreamService.SERVICE_INTERFACE);
List<ResolveInfo> resolveInfoList = packageManager.queryIntentServices(dreamIntent, PackageManager.GET_META_DATA);
for (ResolveInfo resolveInfo : resolveInfoList) {
if (resolveInfo.serviceInfo == null) {
continue;
}
Log.d(TAG, String.valueOf(resolveInfo.loadLabel(packageManager)));
}
我已设法获取 phone 上安装的所有动态壁纸的列表。但我想获得安装在我的 android phone 上的所有白日梦的列表。有人可以帮助我了解我应该用来获取此列表的意图吗?
此代码打印设备中可用的所有 Daydream:
PackageManager packageManager = getPackageManager();
Intent dreamIntent = new Intent(DreamService.SERVICE_INTERFACE);
List<ResolveInfo> resolveInfoList = packageManager.queryIntentServices(dreamIntent, PackageManager.GET_META_DATA);
for (ResolveInfo resolveInfo : resolveInfoList) {
if (resolveInfo.serviceInfo == null) {
continue;
}
Log.d(TAG, String.valueOf(resolveInfo.loadLabel(packageManager)));
}