mortenjust / androidtool-mac

One-click screenshots, video recordings, app installation for iOS and Android
Apache License 2.0
5.43k stars 325 forks source link

Stay in Demo Mode until explicitly disabled, across multiple screenshots #115

Open manastungare opened 7 years ago

manastungare commented 7 years ago

Hey Morten,

Thanks for an awesome tool! Here’s my experience with Demo Mode:

  1. Turn on preference to enter demo mode before taking screenshots.
  2. Press button to take a screenshot.
  3. Wait 5 seconds for Demo Mode to take effect.
  4. Notice that the screen is no longer showing what you wanted to screenshot.

And then:

  1. Wait for Demo Mode to be toggled off again.
  2. Try to take another screenshot, and note that it again takes 5 seconds to enter Demo Mode.

Instead, a better workflow would be to enable Demo Mode once, and stay in Demo Mode until the user explicitly turns it off.

This way, all screenshots will be (relatively) instant, with no need to toggle it on/off between successive screenshots.

(I’m not a Mac programmer, else I’d have looked into implementing this myself, but if I ever do get into it, I’ll send a PR your way. Until then, here’s an Issue if someone wants to pick up and run with it.)

Thanks!

mortenjust commented 7 years ago

Thanks, Manas. I agree with your description the expected behavior. It looks like a bug, maybe introduced with Android N.

For anyone wanting to take a look, the responsible class is UITweaker, instantiated from DeviceViewController. The device enters demo mode with uiTweaker.start() - and although .end() is never called, the device seems to make its way out of demo mode too soon.