Skip to content
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

Cancel should set the isRunning flag to false #112

Open
coder-eb opened this issue Sep 24, 2023 · 3 comments
Open

Cancel should set the isRunning flag to false #112

coder-eb opened this issue Sep 24, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@coder-eb
Copy link

Issue:
I have a need to dial a bunch of USSDs. However, these USSDs will be canceled before the last step. The dialog is closed using the cancel() method provided. However, I noticed a weird issue. I am unable to dial a USSD manually after using the USSDController.

On checking the USSDService, I found that it is due to the isRunning flag not being updated.

Solution:

  1. Clicking the cancel method should close the dialog box and also update the isRunning flag as false.

I have considered alternatives

  1. Dialing a USSD first which will set the isRunning method to true. And then dialing the actual USSD that I had intended.
  2. Forking the repo.
@coder-eb coder-eb added the enhancement New feature or request label Sep 24, 2023
@romellfudi
Copy link
Owner

Could you please send a pull request? @coder-eb

@romellfudi
Copy link
Owner

@coder-eb the used windows depends on your Telecom service because of that they send a XML structure which android use it to generate the USSD window. I really appreciate you would send a pull request with your needs and I will generate a branch for devices like yours

@khaled-0
Copy link
Contributor

khaled-0 commented Oct 27, 2023

I had this kind of problem in Java version but I believe
This issue does not exist on the kotlin version as it seems there's a
USSDController.stopRunning() function which makes the library stop intersecting any more ussd dialogs further.

I'm calling it after callingUSSDController.cancel() and it does not try to automate dialogs anymore.

This is probably the exact behavior you want.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants