Skip to content

This project is an Android app that was made as a challenge from the bootcamp Decola Tech 3ª Edição - DIO - Avanade Brasil. It is a flashlight with some extra functions

Notifications You must be signed in to change notification settings

tpabarbosa/react-native-flashlight

Repository files navigation

React-Native Flashlight

This project is an Android app that was made as a challenge from the bootcamp Decola Tech 3ª Edição - DIO - Avanade Brasil. It is a flashlight with some extra functions:

  • Torch mode, where light is on

  • Camera mode, where light is on and users can take photos and also access than from smartphone gallery

  • SOS mode, where light blinks an SOS morse code (. . .,- - -,. . .)

  • Stroboscope mode, where light blinks in an adjustable frequency, between 0Hz and 10Hz

  • Screen Only mode, where light is off, screen brigthness is set to maximum and users can choose screen color

  • Shake to turn on and off, when app is in Torch, SOS or Stroboscope mode

image1 image2

Dependencies

Drawbacks

This app was not tested in IOS, some adjusts will be necessary if you want to run it in that platform.

SOS and Stroboscope mode change to Torch mode when application is running in background. This happens because they were coded using setInterval and setTimeout that stop running when app is not in foreground.

Camera mode lights off when application is running in background. This happens because light is attached to camera, and, to save battery, camera gets in standy by when it is not in foreground.

Permissions requests may not work properly, I did not put big efforts in it yet.

Todo

  • add slider to adjust brightness when app is in Screen Only mode

  • add custom colors to Screen Only mode

  • add Screen Only With Stroboscope mode

  • improve how Camera mode handles photos that were taken

  • improve Camera mode life cicle to change to Torch mode before app goes into background

  • add new dependency React Native Background Timer to prevent SOS and Stroboscope mode to stop when app is in background

  • improve permissions verifications and requests

About

This project is an Android app that was made as a challenge from the bootcamp Decola Tech 3ª Edição - DIO - Avanade Brasil. It is a flashlight with some extra functions

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published