Android-Update-Checker icon indicating copy to clipboard operation
Android-Update-Checker copied to clipboard

Activity change

Open sohayb opened this issue 10 years ago • 4 comments

Hello, When the user changes the activity so the activity is destroyed or something, the app would crash and the cause is calling show_dialog_you_are_not_updated() on an activity that is already closed. Can you please add the support to show a notification with update and cancel actions rather than a dialog? Thanks

sohayb avatar Feb 01 '15 08:02 sohayb

+1

syrakozz avatar Feb 05 '15 15:02 syrakozz

If I correctly understand, that is due to the asynchronicity of the call to the dialog (it could be called in a later moment, too late for the activity which is already dead in your example) Yes, I can add support to notification, sure. But do you think that could exist some trick to bypass this problem with the dialogs? Maybe a control on the activity variable? Let me know.

danielemaddaluno avatar Feb 10 '15 23:02 danielemaddaluno

The better approach is to show an actionable notification. But regarding the dialog, if you want to show a dialog not related to the passed activity, you take the passed activity application context (when passed) and hold a reference to it, and when you finish checking, you show an activity (with a dialog theme) using an intent started with the previously held application context.

sohayb avatar Feb 11 '15 07:02 sohayb

Thanks

drbest3n avatar Apr 10 '16 12:04 drbest3n