1 /*
2  * Copyright (C) 2017 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License
15  */
16 
17 package com.example.sampleleanbacklauncher.notifications;
18 
19 import android.net.Uri;
20 
21 /**
22  * Constants which represent the "contract" for interacting with TV notifications.
23  */
24 
25 public final class NotificationsContract {
26     private static final String PATH_NOTIFS = "notifications";
27     private static final String PATH_NOTIFS_COUNT = PATH_NOTIFS + "/count";
28 
29     // Content provider for notifications
30     private static final String AUTHORITY =
31             "com.android.tv.notifications.NotificationContentProvider";
32 
33     public static final Uri CONTENT_URI = Uri.parse("content://" + AUTHORITY + "/" +
34             PATH_NOTIFS);
35     public static final Uri NOTIFS_COUNT_URI = Uri.parse("content://" + AUTHORITY + "/" +
36             PATH_NOTIFS_COUNT);
37 
38     public static final String ACTION_NOTIFICATION_HIDE =
39             "android.tvservice.action.NOTIFICATION_HIDE";
40 
41     public static final String ACTION_SHOW_UNSHOWN_NOTIFICATIONS =
42             "android.tvservice.action.SHOW_UNSHOWN_NOTIFICATIONS";
43 
44     public static final String ACTION_OPEN_NOTIFICATION_PANEL =
45             "com.android.tv.NOTIFICATIONS_PANEL";
46 
47     public static final String NOTIFICATION_KEY = "sbn_key";
48 
49     public static final String COLUMN_SBN_KEY = "sbn_key";
50     public static final String COLUMN_PACKAGE_NAME = "package_name";
51     public static final String COLUMN_NOTIF_TITLE = "title";
52     public static final String COLUMN_NOTIF_TEXT = "text";
53     public static final String COLUMN_AUTODISMISS = "is_auto_dismiss";
54     public static final String COLUMN_DISMISSIBLE = "dismissible";
55     public static final String COLUMN_ONGOING = "ongoing";
56     public static final String COLUMN_SMALL_ICON = "small_icon";
57     public static final String COLUMN_CHANNEL = "channel";
58     public static final String COLUMN_PROGRESS = "progress";
59     public static final String COLUMN_PROGRESS_MAX = "progress_max";
60     public static final String COLUMN_NOTIFICATION_HIDDEN = "notification_hidden";
61     public static final String COLUMN_FLAGS = "flags";
62     public static final String COLUMN_HAS_CONTENT_INTENT = "has_content_intent";
63     public static final String COLUMN_BIG_PICTURE = "big_picture";
64     public static final String COLUMN_CONTENT_BUTTON_LABEL = "content_button_label";
65     public static final String COLUMN_DISMISS_BUTTON_LABEL = "dismiss_button_label";
66     public static final String COLUMN_TAG = "tag";
67 
68     public static final String COLUMN_COUNT = "count";
69 }
70