How to show notify after restart phone


#1

i want auto run my app after i restart phone. i using local notification for notify.
constructor (public navCtrl: NavController, private alertCtrl: AlertController
,private autostart: Autostart){
showNotify();
this.autostart.enable();
}

showNotify(){
let notify = {
title: “yayaya !!!”,
text: “tich tich tich”,
at: new Date(new Date().getTime() + 1000*30)
};
LocalNotifications.schedule(notify);
BackgroundMode.enable();
}

but after i restart phone it not show notify. i wrong where ? What should I do? Thanks.


#2

Please edit your post and use the </> button above the post input field to format your code or error message or wrap it in ``` (“code fences”) manually. This will make sure your text is readable and if it recognizes the programming language it also automatically adds code syntax highlighting. Thanks.


#3

Does it autostart your app?