Allow disable the back button by setting a flag in constructor#6
Closed
johanneslagos wants to merge 5 commits into
Closed
Allow disable the back button by setting a flag in constructor#6johanneslagos wants to merge 5 commits into
johanneslagos wants to merge 5 commits into
Conversation
…queue and enter the application before their turn
This could be customized from the strings.xml
AlertDialog with prompt when it try to disable the back button.
mbp
reviewed
Jan 4, 2018
| <resources> | ||
| <string name="app_name">Android SDK</string> | ||
| <string name="notification_error_ssl_cert_invalid">Invalid SSL certificate. Do you want to continue?</string> | ||
| <string name="queue_it_exiting">You are about to exiting the queue and the app, are you sure?</string> |
Contributor
There was a problem hiding this comment.
But is the text correct, I don't believe the app will be exited by using the back button? (Only if it is the last activity)
Suggestion: "You are about to exit the queue, are you sure?"
| public void onClick(DialogInterface dialog, int which) { | ||
| broadcastQueueAborted(); | ||
| if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { | ||
| finishAffinity(); |
Contributor
There was a problem hiding this comment.
I don't feel that we should exit the app. We should just return to the app.
Author
There was a problem hiding this comment.
That is also a good idea, just return to the app and clear the cache.
Contributor
|
As discussed separately, it is possible to handle the queue in a secure way without disabling the back button. Thus I am closing this. |
sarooghi
pushed a commit
that referenced
this pull request
Jul 23, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This will open a prompt when user press the back button. If the user choose to continue it will clear the cache too.