我正在使用 react-native-push-notification 在我的 react-native 应用程序中显示本地通知。我想每周在上午 10 点重复通知,我编写了以下代码:
import PushNotification from 'react-native-push-notification';
import PushController from './Components/PushController';
export default class App extends Component {
constructor(props) {
super(props);
this.notify.bind(this);
}
notify = () => {
PushNotification.localNotificationSchedule({
message: 'You pushed a notification',
repeatType: 'week',
date: // what should I write here ...???
});
}
}
我如何每周显示通知。提前致谢。