Cannot resolve symbol SIGN_IN_REQUEST_CODE
Cannot resolve symbol SIGN_IN_REQUEST_CODE
I am building a chat app using Firebase, but am getting an error. Please help.
3 Answers
3
We should assign request code when startActivityForResult, So that We receive the result back in onActivityResult.
In your case, the current use is null if open app at first time. So We should create SignIn intent by calling startActivityForResult with SIGN_IN_REQUEST_CODE then we get the user details in onActivityResult override method with the respect to request code.
Every startActivityForResult call will cause the target app, call the OnActivityResult of your source app (back). When the answer is returned back we want to recognize which is return to this function. This parameter that you lack of, is a self-defined code (for example 10) that is returned to the OnActivityResult callback. So feel free to define an integer field in your activity and give an arbitrary value to it.
This is just a number, if you didn't define, you can change SIGN_IN_REQUEST_CODE
SIGN_IN_REQUEST_CODE
change SIGN_IN_REQUEST_CODE as 1 replace.
– Clay.Zhu
May 27 '17 at 1:39
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
its an request code , so create field an int with name SIGN_IN_REQUEST_CODE, and it will work
– Muhib Pirani
Mar 8 '17 at 6:03