想在 React Native 中为 Android 实现粘性本地通知
Want to implement sticky local notification in React Native for Android
有没有什么办法可以让应用程序的通知保持在锁屏状态,并且通知会在 Android 中下拉,而不管应用程序的状态(运行 或已终止),例如天气频道应用程序。但是在本机反应中。
如果可能的话,我还想要带有操作按钮的自定义通知。
使用React native push notifications
如果你想让它变粘并且需要自定义操作,你可以像下面这样设置
PushNotification.localNotification({
ongoing:true,
actions: '["Yes", "No"]'
})
选中 Custom action handling 以处理您的自定义操作
有没有什么办法可以让应用程序的通知保持在锁屏状态,并且通知会在 Android 中下拉,而不管应用程序的状态(运行 或已终止),例如天气频道应用程序。但是在本机反应中。
如果可能的话,我还想要带有操作按钮的自定义通知。
使用React native push notifications
如果你想让它变粘并且需要自定义操作,你可以像下面这样设置
PushNotification.localNotification({
ongoing:true,
actions: '["Yes", "No"]'
})
选中 Custom action handling 以处理您的自定义操作