razeware / emitron-Android

Android version of emitron
Apache License 2.0
55 stars 30 forks source link

Assorted issues from Customer support #261

Closed sammyd closed 4 years ago

sammyd commented 4 years ago

We received this via customer support. Please could you take a look, and split it up into issues if appropriate, and let me know if I need to get back to them. Thanks!

Hi, I noticed a few issues with the Android app version 1.0.3, I have a Pixel 2XL running Android 10. The first issue is with logging in using LastPass. Once I press "Sign In", I'm taken to the login form in a web view, I select the credentials I'd like to use in the LastPass prompt and I am immediately taken back to the initial screen with the "sign in" button. The second issue is with casting videos via chromecast. While casting, playback stops if I lock the phone, requiring me to keep the screen on. The video quality is also quite poor while casting. Please let me know if you have any questions. Thanks.

sammyd commented 4 years ago

Ticket for reference: https://razeware.freshdesk.com/a/tickets/28758

orionthewake commented 4 years ago

@filbabic Main item to look into for this issues is the second part, regarding chromecast.

filbabic commented 4 years ago

Hey @orionthewake @sammyd !

I've done a bit of research, quick Google search, as I don't have a Chromecast device, and it was weird to me that our app would somehow have an impact on casting to CC.

From this answer/question: https://support.google.com/photos/thread/1417889?hl=en I confirmed my suspicions, that the app is not the fault when casting to a TV or something else.

What casting does with Phones and most applications is that it mirrors the phone, instead of streaming on a different device. Apps like YouTube work, because they essentially don't mirror anything, they stream to another device. So the quality lock on the Chromecast is basically to 1080p which we run on Phones as max quality.

It also depends on the resolution of the device, but basically you can imagine how mirroring a 6-10" device on a 100+" TV screen would look like.

The issue about the video playback stopping if the screen is locked is intended behavior. We pause the playback in onStop(), which is triggered by locking the screen.

If you think about it, we already handle Picture In Picture mode and background playback for audio if PiP isn't available, so in that case, the only config change/lifecycle state that's left is when the phone is seemingly off - i.e. locked. And if the phone is locked, screen mirroring won't work, as it doesn't have anything to mirror.

For quick fixes, I could see about tinkering around playing the audio even if the screen is locked, but this is a very edge case for us I think.

The reasoning behind this is: if you're Chromecasting video courses to your TV, and want to have playback while the phone is locked, why not just play it on your PC, or tablet, and have it run in parallel. Or, if you're not going to use your phone anyway (because it's locked), there really isn't a lot of benefit of mirroring the phone screen while it's locked, or play the audio in the BG, as you won't see the code that's being worked on, you'll just listen to the words. And you can't learn that way.

--

So, in my opinion, the second part of the issue with casting is by design/won't fix as it's a very specific edge case and something that just doesn't work on Android out of the box. We could see about possibly implementing a whole feature on casting the video stream to a different device, but I haven't done anything like that so far, and I am not sure if Vimeo supports this, or if there's an Android feature that does that out of the box. YouTube once again works, because it's in the Google ecosystem, and as such has the ability to directly communicate to Chromecast (also from Google)!

Let me know if any of this makes sense! :]

filbabic commented 4 years ago

To follow up on this, as for the Login issues and LastPass, I am unsure what we can do here.

From what I understand, we launch an external WebView login screen/app in the Task Manager, and as soon as the task goes into some kind of Lifecycle (not sure if it's Pause or Stop), the screen dies (I guess due to security reasons), and the app is back in the LoginFragment state.

I don't know if LastPass starts a new activity to act as an overlay, or if it shows a Dialog or a Fragment, but it's probably triggering the lifecycle of Guardpost, and as such it closes and goes back to login.

I think this is also "by design", or we just can't fix this right now, as we'd have to change the way Guardpost works, or implement an in-app login feature (probably less secure).

orionthewake commented 4 years ago

@filbabic Going to close this issue and open two new ones, one for LastPass, the other for playback with screen locked. The latter is not a P1 bug, assuming users can still login. The latter is an enhancement.