Nov 13 | 7:25 PM |
Mark M. | has entered the room |
Mark M. | turned on guest access |
Nov 13 | 7:55 PM |
Aaron | has entered the room |
Mark M. |
hello, Aaron!
|
Mark M. |
how can I help you today>
|
Mark M. |
(give or take some punctuation...)
|
Aaron |
hello again Mark, 3 questions today:
|
Aaron |
in descending order of priority
|
Aaron |
View paste
(2 more lines)
|
Mark M. |
taking them in reverse order based on simplicity...
|
Aaron |
sure
|
Mark M. |
3. do something that the user needs to acknowledge
|
Mark M. |
that could be a dialog, a snackbar with an action, or something inline in the UI of your app
|
Nov 13 | 8:00 PM |
Mark M. |
I'm also not a tremendous fan of Toast-spamming a user, repeatedly showing a Toast based on intermediate errors
|
Mark M. |
only bother the user when you give up based on your retry policy, and then use something that the user has to acknowledge
|
Mark M. |
2. please OMG please use some existing code for this
|
Mark M. |
I am a fan of ACRA, but if you prefer some commercial service (e.g., Fabric) that's OK too
|
Aaron |
OK that seems reasonable, I'll put that on my list of things to do after first release (re: getting rid of toasts)
|
Aaron |
ah, OK, it seemed like a simple enough task
|
Aaron |
why OMG, lol?
|
Mark M. |
the app is in a fairly precarious state when an exception gets to the uncaught exception handler, and so getting this right is a fair bit of work
|
Aaron |
I see
|
Mark M. |
if ACRA's delivery options don't fit the bill, you can write a plugin
|
Aaron |
I will look into ACRA
|
Mark M. |
that allows ACRA to handle all the nasty stuff and you just get the exception information where you want it to go
|
Mark M. | |
Mark M. |
and I have a chapter on in the book
|
Aaron |
OK, great
|
Mark M. |
1. fragment lifecycles are a mess
|
Mark M. |
see https://developer.android.com/images/fragment_l... for the top-downf low
|
Mark M. |
er, top-down flow
|
Nov 13 | 8:05 PM |
Mark M. |
in terms of the problem that you describe, I haven't run into that, but that may be some combination of the specific things that I have done and changes in how the support library fragments work
|
Aaron |
OK, so to put my question more simply, I'm just confused why onDestroy() and "Fragment is destroyed" are not the same box
|
Aaron |
and what is onDestroy(), then
|
Mark M. |
¯\_(ツ)_/¯
|
Aaron |
lol, fair enough
|
Mark M. |
frankly, that diagram and the overall flow makes no sense to me
|
Mark M. |
and I run into the same sorts of confusion that you do
|
Mark M. |
onDestroy() should be called after onDetach(), in a sane world
|
Aaron |
alright, thanks for the info
|
Mark M. |
they're trying to stick with an API that they created in 2011 and probably regret in places
|
Aaron |
that's all I've got for now, I'll get to work on ACRA
|
Aaron |
thanks for the help!
|
Mark M. |
OK
|
Mark M. |
you're welcome!
|
Nov 13 | 8:10 PM |
Aaron | has left the room |
Nov 13 | 8:30 PM |
Mark M. | turned off guest access |