Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

Can't disable autosend on 5.0.0 #280

Closed
yuriy-budiyev opened this issue Aug 18, 2017 · 9 comments
Closed

Can't disable autosend on 5.0.0 #280

yuriy-budiyev opened this issue Aug 18, 2017 · 9 comments

Comments

@yuriy-budiyev
Copy link

yuriy-budiyev commented Aug 18, 2017

Auto send is enabled by default, if context is not instance of Activity.
CrashManagerListener#shouldAutoUploadCrashes() is ignored.
But if i'll initialize CrashManager with Activity context it will not be able to save crashes when my LauncherActivity will be closed.

@yuriy-budiyev
Copy link
Author

Please add something to control auto send behavior

@yuriy-budiyev
Copy link
Author

yuriy-budiyev commented Aug 18, 2017

Btw, I found the ugly solution. Initialize CrashManager with app context when processing finished. In my app, I strictly need to ask user whether send crashes or not.

@MatkovIvan
Copy link
Contributor

Hi, @yuriy-budiyev!
Thanks for keeping in touch!
This behavior wasn't introduced in 5.0.0. (See 4.0.0 sources for example)
The cause that is: we able to show dialog from activity context only.

@MatkovIvan
Copy link
Contributor

I created PR to you can show UI for ask (in onHandleAlertView callback).

@yuriy-budiyev
Copy link
Author

I aleady done this in my app, overrided onHandleAlertView, and show alert from activity context. And it worked well, when I called initialize method with app context, and execute method with activity context. In 5.0.0 execute method does not have context argument.

@yuriy-budiyev
Copy link
Author

Also, it will be good to add to CrashManagerListener callback onNoCrashesFound, or something like this.

@MatkovIvan
Copy link
Contributor

In 5.0.0 execute method does not have context argument.

Got it. I guess this should be reverted.

Also, it will be good to add to CrashManagerListener callback onNoCrashesFound, or something like this.

Good point. Done in the same PR.

@yuriy-budiyev
Copy link
Author

I don't think reverting is necessary, simly add ability to show overriden alert dialog from app context.

@ElektrojungeAtWork
Copy link
Contributor

We just released HockeySDK 5.0.0, so I'm closing this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants