Commit eae500375aa559f470d5e040e08809c9cc37f68f
1 parent
8ba88232
1 修改开启通知权限提示文字
Showing
1 changed file
with
3 additions
and
0 deletions
moudle_pedometer/src/main/java/com/cnlive/moudle/pedometer/utils/NotificationUtil.java
| @@ -7,6 +7,8 @@ import android.provider.Settings; | @@ -7,6 +7,8 @@ import android.provider.Settings; | ||
| 7 | import android.support.v4.app.NotificationManagerCompat; | 7 | import android.support.v4.app.NotificationManagerCompat; |
| 8 | import android.widget.Toast; | 8 | import android.widget.Toast; |
| 9 | 9 | ||
| 10 | +import com.cnlive.libs.base.util.AlertUtil; | ||
| 11 | + | ||
| 10 | import static android.app.Notification.EXTRA_CHANNEL_ID; | 12 | import static android.app.Notification.EXTRA_CHANNEL_ID; |
| 11 | import static android.provider.Settings.EXTRA_APP_PACKAGE; | 13 | import static android.provider.Settings.EXTRA_APP_PACKAGE; |
| 12 | 14 | ||
| @@ -21,6 +23,7 @@ public class NotificationUtil { | @@ -21,6 +23,7 @@ public class NotificationUtil { | ||
| 21 | if (!isOpen) { | 23 | if (!isOpen) { |
| 22 | goToSettingNo(activity); | 24 | goToSettingNo(activity); |
| 23 | } | 25 | } |
| 26 | + AlertUtil.showDeftToast(activity,"通知权限未打开,请选择允许通知"); | ||
| 24 | return isOpen; | 27 | return isOpen; |
| 25 | } | 28 | } |
| 26 | 29 |