|
14 | 14 |
|
15 | 15 | package com.google.firebase.appdistribution;
|
16 | 16 |
|
| 17 | +import android.app.NotificationChannel; |
17 | 18 | import android.net.Uri;
|
18 | 19 | import androidx.annotation.NonNull;
|
19 | 20 | import androidx.annotation.Nullable;
|
| 21 | +import androidx.core.app.NotificationCompat; |
20 | 22 | import com.google.android.gms.tasks.Task;
|
21 | 23 | import com.google.firebase.FirebaseApp;
|
22 | 24 | import com.google.firebase.appdistribution.internal.FirebaseAppDistributionProxy;
|
@@ -179,6 +181,29 @@ public interface FirebaseAppDistribution {
|
179 | 181 | */
|
180 | 182 | void startFeedback(@NonNull CharSequence infoText, @Nullable Uri screenshot);
|
181 | 183 |
|
| 184 | + /** |
| 185 | + * Displays a notification that, when tapped, will take a screenshot of the current activity, then |
| 186 | + * start a new activity to collect and submit feedback from the tester along with the screenshot. |
| 187 | + * |
| 188 | + * <p>When the notification is tapped: |
| 189 | + * |
| 190 | + * <ol> |
| 191 | + * <li>If the app is open, take a screenshot of the current activity |
| 192 | + * <li>If tester is not signed in, presents the tester with a Google Sign-in UI |
| 193 | + * <li>Starts a full screen activity for the tester to compose and submit the feedback |
| 194 | + * </ol> |
| 195 | + * |
| 196 | + * <p>On platforms O and above, the notification will be created in its own notification channel. |
| 197 | + * |
| 198 | + * @param infoTextResourceId string resource ID of text to display to the tester before collecting |
| 199 | + * feedback data (e.g. Terms and Conditions) |
| 200 | + * @param importance the amount the user should be interrupted by notifications from the feedback |
| 201 | + * notification channel. See {@link NotificationChannel#setImportance}. On platforms below O, |
| 202 | + * the importance will be translated into a comparable notification priority (see {@link |
| 203 | + * NotificationCompat.Builder#setPriority}). |
| 204 | + */ |
| 205 | + void showFeedbackNotification(@NonNull int infoTextResourceId, int importance); |
| 206 | + |
182 | 207 | /** Gets the singleton {@link FirebaseAppDistribution} instance. */
|
183 | 208 | @NonNull
|
184 | 209 | static FirebaseAppDistribution getInstance() {
|
|
0 commit comments