是否可以从应用程序打开Android Wear开始屏幕/菜单?

是否可以从应用程序打开Android Wear开始屏幕/菜单?,android,wear-os,Android,Wear Os,我想从我的应用程序中打开Android Wear开始屏幕(带有红色G图标和文本“立即发言”)。这可能吗 谢谢。 w不可能启动这个精确的屏幕(没有API) 但是,您可以轻松地自己重新创建一个类似的屏幕 此代码列出了启动器中可用的活动: final PackageManager packageManager = getPackageManager(); Intent intent = new Intent(Intent.ACTION_MAIN, null); intent.addCategory(I

我想从我的应用程序中打开Android Wear开始屏幕(带有红色G图标和文本“立即发言”)。这可能吗

谢谢。
w

不可能启动这个精确的屏幕(没有API)

但是,您可以轻松地自己重新创建一个类似的屏幕

此代码列出了启动器中可用的活动:

final PackageManager packageManager = getPackageManager();
Intent intent = new Intent(Intent.ACTION_MAIN, null);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
List<ResolveInfo> resInfos = packageManager.queryIntentActivities(intent, 0);
//using hashset so that there will be no duplicate packages, 
//if no duplicate packages then there will be no duplicate apps
HashSet<String> packageNames = new HashSet<String>(0);
List<ApplicationInfo> appInfos = new ArrayList<ApplicationInfo>(0);

//getting package names and adding them to the hashset
for(ResolveInfo resolveInfo : resInfos) {
    packageNames.add(resolveInfo.activityInfo.packageName);
}

//now we have unique packages in the hashset, so get their application infos
//and add them to the arraylist
for(String packageName : packageNames) {
    try {
        appInfos.add(packageManager.getApplicationInfo(packageName, PackageManager.GET_META_DATA));
    } catch (NameNotFoundException e) {
        //Do Nothing
    }
}

//to sort the list of apps by their names
Collections.sort(appInfos, new ApplicationInfo.DisplayNameComparator(packageManager));
final-PackageManager-PackageManager=getPackageManager();
意图=新意图(Intent.ACTION\u MAIN,空);
intent.addCategory(intent.CATEGORY_启动器);
List resinfo=packageManager.querytentActivities(intent,0);
//使用hashset,这样就不会有重复的包,
//如果没有重复的软件包,则不会有重复的应用程序
HashSet-packageNames=新的HashSet(0);
名单

资料来源:

你真的需要这个特定的屏幕,还是只想添加语音控制/识别?@Snow如果可能的话,我真的很想打开这个特定的屏幕。