Skip to content

Allow disable the back button by setting a flag in constructor#6

Closed
johanneslagos wants to merge 5 commits into
queueit:masterfrom
johanneslagos:master
Closed

Allow disable the back button by setting a flag in constructor#6
johanneslagos wants to merge 5 commits into
queueit:masterfrom
johanneslagos:master

Conversation

@johanneslagos
Copy link
Copy Markdown

This will open a prompt when user press the back button. If the user choose to continue it will clear the cache too.

<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>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't feel that we should exit the app. We should just return to the app.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is also a good idea, just return to the app and clear the cache.

@mbp
Copy link
Copy Markdown
Contributor

mbp commented Jan 5, 2018

As discussed separately, it is possible to handle the queue in a secure way without disabling the back button. Thus I am closing this.

@mbp mbp closed this Jan 5, 2018
sarooghi pushed a commit that referenced this pull request Jul 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants