-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
show start orbot dialog #2834
show start orbot dialog #2834
Conversation
That's the cosmetic things, the main thing is that your Did this work on your device? Here it does not, while ChatSecure's intent trigger for: |
@licaon-kter clicking on |
Obviously not. Try the other intent to not only open the app, but start the Tor router too. |
@licaon-kter just two more things:
|
|
so, @licaon-kter you mean that before moving to the add account activity, i must direct user to the settings where |
No, the user enables Tor before adding an account, but then your dialogue does not pop up. I was pointing out how you can test: install the app for the first time, use my provider, settings, enable use Tor, then add account. |
@licaon-kter I am unable to find a solution, when no account is added. Can I use the same method to check tor status as in the file you mentioned in the issue with appropriate modifications? |
You be the judge of that. |
@licaon-kter could you please review this? |
Somewhat working but not really. My experience:
I bet the timeout has something to do with this (no I won't wait 15mins for this), can you just lower it to 5secs or something? Was it triggering on your device every time its needed? |
@licaon-kter regarding the no account case, do I have to show dialog when user clicks connect or do I have to show it periodically as in |
@licaon-kter sorry to disturb you, but could you please guide? |
See the conditions when "tor network error" red text is shown in accounts, and wire those to the dialogue. |
Yeah I don't think this needs to be a full dialog that pops up and negs the user. Probably just replace the [Connect] button in the accounts screen with a start orbot button or something like that (we do this for 'open website' when registration failed for example. |
b9fc3cb
to
a018707
Compare
@iNPUTmice I have done the changes, could you please review? |
@licaon-kter could you review it please? |
So, clean app data. tested with: Orbot 16.0.0-RC-2-multi-SDK23 |
@licaon-kter do you mean that the |
Yes. Did it work for you? What Orbot version? |
Yes, it did. I was using the same orbot version @licaon-kter. Does it correct after some time, or it remains in the same |
Stays there. Does not do anything, stuck at user/pass/server view, with CANCEL/START ORBOT, while Orbot is running. |
ok, I would look into it.. also, is the Conversation Activity working fine @licaon-kter |
What do you mean by "conversation activity works fine" ? |
The |
@licaon-kter as @iNPUTmice mentioned,
The dialog won't be shown in AddAccount activity. I was talking about the |
I'll rebuild later. Thanks |
@licaon-kter sorry to disturb, but have you checked it? |
@iNPUTmice could you please review? |
Nothing new, still stuck there. Shouldn't it detect Tor as connected and replace the START ORBOT with CONNECT or something? If so, looks like you don't detect that is connected (already). |
@licaon-kter may I know the android version you are using. I can't figure it out, it works fine on my phone.. |
Oreo |
@licaon-kter Starting from noughat, android restricts finding process id of other apps, as a result it always stated the app as not started. I have made the changes to determine tor status without using shell commands. Hopefully, it would work and sorry for all the trouble you beared till now.. |
@licaon-kter could you please review it? |
@licaon-kter sorry to disturb, could you please review? |
On add account, working ok, sees Orbot not started, starts it. On account already connected, stopping Orbot, stuck with "tor network is not available". |
@licaon-kter does this refer to the case after user has created an account? |
Yes, say I'm connected for a while and my dumb ROM optimizes my battery by killing Orbot while my phone is in my pocket. |
@licaon-kter I thought, it had to be shown only for the |
Oh, ok, I for one would like for Conversations to retry to enable/start Orbot on connection retry. That's useful. |
@licaon-kter i like the idea but imo, it would be better to open an issue for that and do it a separate pull request. what do you think? |
I did not see any "dialogue" in Add account Not sure what is ConversationActivity, normal chat view? |
@licaon-kter in |
No, no dialogue at all. Also, you contradict yourself, either "For managing/editing accounts, no change would occur. It would follow the same old flow.." or "And yes, ConversationActivity is activity where all the contacts are seen."...no dialogue is ever displayed if Orbot is stopped (except the button text on Add account that is) |
@licaon-kter not sure why it is'nt working in main chat view.. works fine in lollipop and marshmellow. |
Ok, looks I was not in the correct activity, indeed it works when you already have a chat open, I was in the contacts or accounts activity. Now, the message should be rephrased, and remove Also, after pressing OK maybe add a timeout, because it takes a bit until it connects so you'll get the dialogue multiple times when you switch chats during this phase. |
@licaon-kter I have made the suggested changes... |
Ok, let me rephrase that. The problem is that before the 15 seconds pass, if you change chat or open a MUC from a bookmark you'll get the dialogue again. |
@licaon-kter I don't know why this is happening, the dialog should again show only after 15 sec. To be clear, 15 sec duration is from the opening of the dialog and not closing.. |
Yes, chat 1, dialogue, press OK, chat list, +, MUCs bookmarks, open MUC1, dialogue shown again. These steps can be done in 2 seconds... |
@licaon-kter sorry, but I could not reproduce the issue.. |
This pr tries to solve #1980. It checks the tor status availability by already present
account status
callbacks inConversationActivity
. It shows a dialog if orbot is not started, and places a gap of a hour between two dialogs to prevent spam.