nicolasbrailo / PianOli

Android baby game
GNU General Public License v3.0
59 stars 18 forks source link

Multiple ways to exit #52

Open amitkot opened 1 year ago

amitkot commented 1 year ago

Thanks for this app!

Playing for a minute I found multiple ways to exit. On my phone the navigation is enabled using screen-edge swipe gestures and the bottom bar.

nicolasbrailo commented 1 year ago

Hi @amitkot, thanks for reporting. There is no way in (regular) Android to have a (regular) app completely overtake your screen: all this does is say "hi Android OS, please pin me to the screen and don't let anyone close my window". If the OS has an alternate way of letting you close that window, there is nothing the app can do. This is dependent on the specific phone and OS version, and it's usually a good thing, as you don't want an app to hijack your phone completely.

Having said that, if you find an extra API we could use to disable any of the alternate un-pin behaviours, I'd be happy to accept a PR.

cptechnik commented 1 year ago

Others device, other problem: Moto G51 5g : No way to exit! Every time I push both buttons, my device is locked, after unlock, pianoli get focus and shows the two button info, also if I tip on notifications... Then suddenly the notification bar appears, and with the settings wheel I get into "apps" and can deinstall pianoli...

juleskers commented 1 year ago

Others device, other problem

Then it shouldn't really belong in this thread, but have a separate issue.

As a note for future travelers, the way "out" of PianOli is to press the top-right "X" in the settings screen.

juleskers commented 10 months ago

On my phone the navigation is enabled using screen-edge swipe gestures and the bottom bar.

I've tried to reproduce this today, and could not exit the app in this way.

I run 'e/OS' (a.k.a. Murena), a LineageOS fork. The launcher is a bit atypical. For Swipe Navigation however, I believe it's effectively Stock.

Steps taken:

  1. Switch device to swipe navigation: Settings > System > Gestures > System Navigation > set to "gesture navigation` (Not sure about the exact translations, I run Dutch language)
  2. Bottom bar switches from previous "three buttons (back, home, app overview)" to a thin, draggable bar. Dragging this bar up goes to home-screen; Dragging it up and hold-then-release goes to app overview.; Dragging from the left or right triggers "back"
    (I'm repeating my observed behaviour, just to avoid confusion with possible custom UI behaviour)
  3. Open PianOli, which launches into pinned piano
  4. Accept the "app is pinned" OS dialog ("I understand"/"Got it")
  5. Swipe from "left/right" (due to Piano rotation, this is now top/botton, i.e. the short edges of the screen)
    => OS plays "Back" arrow animation, but piano stays in place; after a second swipe-attempt, OS shows a toast "swipe up and hold to unpin app"
  6. Swipe-up without hold shows the bottom drag-bar and a semi-transparent, but empty, notification bar, but otherwise does nothing.
  7. swipe-up-and-hold opens my lock-screen (without playing Pianoli's distinct "escape warning bell", so it must be OS-behaviour)
  8. Unlocking my phone immediately returns me to PianOli, with a new "app is pinned" dialog. (so, back to step 3+4)
  9. if, this time, I refuse the "app is pinned" dialog (clicking the "no, thank you" button), I obtain the behaviour @amitkot describes: left/right swipe (short edges) triggers "back" (in this case, to OS home screen), bottom-bar drag opens app overview.

@amitkot : Can you confirm/refute that we are talking about the same thing? If you still have the exit behaviour from above, it would be very interesting which Android Flavour you are running, to see if perhaps that has a "weird" behaviour for app-pinning.

P.S. Sorry for the lengthy delay since Januari, @amitkot. As a volunteer project, where all the maintainers have children themselves, "fast feedback" isn't exactly something we're known for :stuck_out_tongue_closed_eyes: I hope you're still interested in PianOli, and that it's still bringing joy to your child(ren).