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.



enter image description here





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




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.

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Edmonton

Crossroads (UK TV series)