以编程方式打开 Android 个通知
Opening Android Notifications programmatically
是否可以在我的应用程序中打开通知菜单?我正在寻找类似于下面打开系统设置侧栏的解决方案:
startActivityForResult(new Intent(android.provider.Settings.ACTION_SETTINGS), 0);
我找到了解决方案,看起来下面的示例可以解决问题。但是我找不到任何关于 com.android.tv.NOTIFICATIONS_PANEL 操作的文档。
Intent notificationIntent = new Intent("com.android.tv.NOTIFICATIONS_PANEL");
startActivity(notificationIntent);
我想你可能想尝试使用 toasts or notification-android-tv。
此外,请注意:
notification will appear just as recommendations and not as
"notification"
更多信息,你可以参考这个SO post。
是否可以在我的应用程序中打开通知菜单?我正在寻找类似于下面打开系统设置侧栏的解决方案:
startActivityForResult(new Intent(android.provider.Settings.ACTION_SETTINGS), 0);
我找到了解决方案,看起来下面的示例可以解决问题。但是我找不到任何关于 com.android.tv.NOTIFICATIONS_PANEL 操作的文档。
Intent notificationIntent = new Intent("com.android.tv.NOTIFICATIONS_PANEL");
startActivity(notificationIntent);
我想你可能想尝试使用 toasts or notification-android-tv。
此外,请注意:
notification will appear just as recommendations and not as "notification"
更多信息,你可以参考这个SO post。