I get a black screen with VNC for some apps

I’m getting a black screen in some apps (screens with insurance or personal info) via keysight vnc server for android.
I’m guessing this is caused by an Android security policy patch, but is there a workaround?

thanks

1 Like

This may be caused by the FLAG_SECURE property have been enabled in the app for the affected screens. This flag prevents the taking of screenshots, for security reasons. It is not clear how your are establishing your connection to the Android device, but if you are using Eggplant Functional and it is not v22.5 or later then try upgrading to v22.5 or later and see if this helps. If instead you are using the CLI version of Eggplant Gateway (EPGW) try downloading the latest version and see if that helps.

1 Like

Thanks for the answer.

I am using version 23.1. And the Android gateway is also using the latest version.

A good test for what Nige describes is to connect to the app using a physical device that you can view while you are connected. When I have encountered this in the past, I could see the specific screen on the phone directly put not as a remote connection. BTW, even the black screen is responsive, so if you can make an educated guess where the login fields are, you can still log in via the remote connection.

Thanks for the answer.

I connected with adb and checked in the connection list and got the same black screen.
I’m not sure understand about “the app using a physical device that you can view while you are connected”.

Please explain in more detail

Thanks

How are you connected to the Android device itself?For me, my device is a Samsung phone which I connect via USB cable. When I hit a security screen, the SUT window goes black, but the screen on the phone displays as normal.

Hope this helps,
Dave

I’m getting the same behavior.
I want to know how to prevent the SUT screen from going black when I click on the security screen.

Best Regards

Unfortunately, there is no way for Eggplant Gateway to “hack” around the Android security setting for Display.FLAG_SECURE. You can read more on that setting here: WindowManager.LayoutParams  |  Android Developers
Your workarounds are:

  • If the application under test is being developed by your company, the developers remove the FLAG_SECURE from that screen for non-production versions of the application.
  • View the security screen from your own phone and estimate where the controls are where you might type in, for example, a username and password. Even though the screen is black, it is still responsive if you are able to provide credentials to move to a non-secure screen.

Hope this helps,
Dave

Thanks for the detailed explanation.

The test team wants to be able to test independently without support from the development team.
For e-commerce or fintech apps, this can be an issue, making it difficult to use Eggplant.

If you have any other suggestions, please let me know.

Best Regards