title: Setting a timer for a long period of time, i.e. multiple minutes
body: <p><strong>I want to use firebase auth with react native for <code>Login</code> and <code>Signup</code> but I got a yellow error:</strong> </p>
  
  <p>Setting a timer for a long period of time, i.e. multiple minutes, is a performance and correctness issue on Android as it keeps the timer module awake, and timers can only be called when the app is in the foreground. See (<a href="https://github.com/facebook/react-native/issues/12981" rel="noreferrer">https://github.com/facebook/react-native/issues/12981</a>) for more info. (Saw setTimeout with duration 111862ms)  </p>
  
  <p><strong>How Can I Fix That?</strong><br>
  I don't want to ignore that, I want to understand this error and solve that with the best and Standard way.<br>
  And This is my Code:</p>
  
  <pre><code>  export default class Login extends Component {
          constructor(props) {
              super(props)
              this.state = {
                  email: '',
                  password: '',
                  response: ''
              }
              this.signUp = this.signUp.bind(this)
              this.login = this.login.bind(this)
          }
          async signUp() {
              try {
                  await firebase.auth().createUserWithEmailAndPassword(this.state.email, this.state.password)
                  this.setState({
                      response: 'Account Created!'
                  })
                  setTimeout(() =&gt; {
                      this.props.navigator.push({
                          id: 'App'
                      })
                  }, 1500)
              } catch (error) {
                  this.setState({
                      response: error.toString()
                  })
              }
          }
          async login() {
              try {
                  await firebase.auth().createUserWithEmailAndPassword(this.state.email, this.state.password)
                  this.setState({
                      response: 'user login in'
                  })
                  setTimeout(() =&gt; {
                      this.props.navigator.push({
                          id: 'App'
                      })
                  })
  
              } catch (error) {
                  this.setState({
                      response: error.toString()
                  })
              }
  
          }
          render() {
              return (
                  &lt;View style={styles.container}&gt;
                      &lt;View style={styles.containerInputes}&gt;
                          &lt;TextInput
                              placeholderTextColor="gray"
                              placeholder="Email"
                              style={styles.inputText}
                            //  onChangeText={(email) =&gt; this.setState({ email })}
                              onChangeText={(email) =&gt; {console.log(email);}}
                          /&gt;
                          &lt;TextInput
                              placeholderTextColor="gray"
                              placeholder="Password"
                              style={styles.inputText}
                              password={true}
                              onChangeText={(password) =&gt; this.setState({ password })}
                          /&gt;
                      &lt;/View&gt;
                      &lt;TouchableHighlight
                          onPress={this.login}
                          style={[styles.loginButton, styles.button]}
                      &gt;
                          &lt;Text
                              style={styles.textButton}
                          &gt;Login&lt;/Text&gt;
                      &lt;/TouchableHighlight&gt;
                      &lt;TouchableHighlight
                          onPress={this.signUp}
                          style={[styles.loginButton, styles.button]}
                      &gt;
                          &lt;Text
                              style={styles.textButton}
                          &gt;Signup&lt;/Text&gt;
                      &lt;/TouchableHighlight&gt;
                  &lt;/View&gt;
              )
          }
      }
  </code></pre>
  
  <p>I Reported to <strong>Google Firebase Team</strong>: (<a href="https://github.com/firebase/firebase-js-sdk/issues/97" rel="noreferrer">https://github.com/firebase/firebase-js-sdk/issues/97</a>)</p>