[英]How to launch to an Android TV's Settings activity?
I've created a home launcher for my Android TV using the Android TV Activity in Android Studio. 我已经使用Android Studio中的Android TV活动为Android TV创建了一个家庭启动器。
It looks like the following: 看起来如下:
What I'd like to accomplish is, if the user selects the SETTINGS
option, it will launch the specific Android TV's settings page. 我要完成的是,如果用户选择“
SETTINGS
选项,它将启动特定的Android TV的设置页面。
For example, I'm using a Ugoos-UT4 Android TV and their Settings page look like so: 例如,我使用的是Ugoos-UT4 Android TV,其“设置”页面如下所示:
I'm not looking to launch to a Settings template activity that Android Studio has, but the Settings Activity page of whichever device the apk is installed on. 我不是要启动Android Studio的“设置模板”活动,而是要安装APK的设备上的“设置活动”页面。
I'm listening to items selection using the following: 我正在使用以下方法选择项目:
private final class ItemViewSelectedListener implements OnItemViewSelectedListener
{
@Override
public void onItemSelected(Presenter.ViewHolder itemViewHolder, Object item,
RowPresenter.ViewHolder rowViewHolder, Row row)
{
// If SETTINGS option selected, launch Android TV's settings page
}
}
Is it possible? 可能吗?
Thanks 谢谢
经过研究,我发现我可以执行以下操作:
startActivityForResult(new Intent(android.provider.Settings.ACTION_SETTINGS), 0);
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.