Created a service and connected it to the MainActivity. Flashlight is started through the service now