New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NullPointerException calling Flow.get(this) in the onCreate method. #211
Comments
It would work with |
@Zhuinden It did not work for me =/ still crashing with NPE |
@epool you might be correct, Flow is initialized in |
@Zhuinden That worked, Thanks! |
I don't know if the behavior can change, but we should be able to do better than throwing an NPE. Plan is to document that it is unsafe to call |
Also, very curious to know why people are trying to get their hands on the Flow instance before that point. |
Go to login or go to feed in onCreate? |
Why does that need to happen in onCreate rather than onResume? Or why not calculate the default key to be login or feed before kicking things off? Actually, I think the best place to handle that kind of ACL concern is in the dispatcher itself. On each dispatch, if auth has been lost, redirect to the login screen instead of honoring the dispatch. Something like:
|
+1 to handling this in the dispatcher. |
In reponse to the confusion expressed in #211.
In reponse to the confusion expressed in #211.
In reponse to the confusion expressed in #211.
I am getting the following error when I call
Flow.get(this)
inside theonCreate()
method.The code:
Somebody can explain me why this is happening in the
onCreate()
method? If I do the same inonStart()
oronResume()
everything works well.I am not sure if this is a bug or not, but I think a wiki/documentation is required for this awesome library.
The text was updated successfully, but these errors were encountered: