jroal / a2dpvolume

Automatically exported from code.google.com/p/a2dpvolume
http://jimroal.com/slist.htm
95 stars 33 forks source link

Rotating the screen when requesting permission dialog shows will change the original request for three permissions into the request for only one permission #289

Closed sjl872964789 closed 3 years ago

sjl872964789 commented 4 years ago

Describe the bug In its normal behaviors, the app will request three permissions (storage permission, location permission, and manage phone calls permission) from users. However, if the user rotates the screen when the permission requesting dialog shows at the first ime, the app will only request one permission from the user (storage permission) and lose the other two (location permission, and manage phone calls permission).

To Reproduce Steps to reproduce the behavior:

  1. Install a2dpvolume and open app
  2. The permission request box appears
  3. Rotate screen and then rotate back

Expected behavior The app should still request three permissions (storage permission, location permission, and manage phone calls permission)

Smartphone (please complete the following information):

Consequence Due to this issue, the app cannot sucessfully get the location and permissions from the user. Let me give detailed explanations on the consequences due to this bug.

If the user does not rotate the screen when the permission requesting dialog shows, he can successfully grant the three permissions. Then, the user can click the "stored location" button to jump to a map app or a browser to see the last location of the Bluetooth device (see below). no-rotate

However, if the user rotates the screen when the permission requesting dialog shows, he can only grant one permission (storage permission) and lose the chance to grant the location permission. As a result, the user cannot use the “stored location” function (i.e., clicking the "stored location" button will not take any effect). Also, the app also fails to pop up a permission requesting dialog to allow granting the location permission (see below). rotate

jroal commented 4 years ago

This comment appears to be for a different app (AmazeFileManager?).

sjl872964789 commented 4 years ago

Hello, thanks for your kind reply. I mistakenly wrote the name of the application as amaze before (As I used my error report template in amaze). I have revised the bug report, and I think it is not only a problem of rotating, but also a problem of permissions (It is necessary for the app to request permission again when using each corresponding function to prevent the user from accidentally missing the grant of some permissions). Thank you for developing this interesting app. I also hope that a2dpvolume can be better and better. Can you take a look at this bug report and open it again? In addition, from the consequence, I think this issue may directly break the app functionality, which is a severe bug (rather than a low-priority issue).

jroal commented 4 years ago

I reopened this. However, like I said with the other issues, I have no plan to work any of them. If you want this fixed I recommend that you investigate these issues, find a root cause and fix, and post the details of that root cause and fix here so I can implement it. In general I expect most don't rotate the screen while configuring this app. Seems like a strange use case as there is no need and the configuration does not take long. Obviously I have not spent time dealing with screen rotation on this app since you set it up once and never really open it again unless you have a new device to add. Unlike most apps, people will rarely open the UI of this one. Primarily it runs in the background. This is also likely one of the reasons there are not many apps like this on the Play Store since they will not generate any income. I did not create this app for income. I created it for my own use. I have also seriously lost interest in making any changes to it, or even fixing issues like these at this point. I would take the help of others to find and fix these issues though. The source code is all here and I even posted help building it in the wiki. You should be able to clone it down and build, debug, and test it. I am an amateur myself, not a professional developer. I taught myself Java and Android development from online tutorials and Stack Overflow help. Others can do the same.

sjl872964789 commented 4 years ago

OK, thank you for your quick and friendly reply

jroal commented 3 years ago

I would just disable screen rotation on the activity config. Problem solved. 👍🏻

Perfect! That is now my plan for all the rotation issues. I will simply block all rotations as they are not needed for this app anyway. Everything will now be forced portrait.

jroal commented 3 years ago

Duplicate of issue 295 based on planned fix https://github.com/jroal/a2dpvolume/issues/295