Ionic flashlight native help

hi i want to create an app that will the mobile flash blinks on and off every 1 seconds time interval
and stop when i tap stop button.
please guide me.