Protect Floating Windows and Dynamic Content in Android Apps

Protect Dynamically Generated Windows

About: “Protect Dynamically Generated Windows” in Android apps

Prevent App Screen Sharing is used to ensure sensitive data is not recorded from the app’s screen. Screenshots, mirroring, and sharing the app’s screen is prevented. The Appdome feature Prevent App Screen Sharing prevents the sharing of screens on both Android and iOS applications. For full and complete protection, Appdome Protect Dynamically Generated Windows secures those Android UI elements that do not expose a developer-facing API, such as Android floating windows.

This Knowledge Base article describes Appdome’s Protect Dynamically Generated Windows feature and explains how to add it to a mobile app without coding. So you can protect floating windows in a few clicks.

We hope you find it useful and enjoy using Appdome!

Appdome is a no-code mobile integration platform as a service (iPaaS), supporting a wide variety of implementations for Android and iOS apps.

Using Appdome, there are no development or coding prerequisites. For example, there is no Appdome SDK, libraries, or plug-ins to implement. The Appdome technology adds Prevent App Screen Sharing and relevant standards, frameworks and more to the app automatically, with no manual development work at all.

Prevent App Screen Sharing is part of the Mobile Privacy that is included under Appdome’s Security Suite and part of Mobile Permission Control that is included under Appdome’s Mobility Suite.

When a developer sets the FLAG_SECURE for chosen Android UI elements, the underlying infrastructure of Android treats the content of the window as secure, preventing it from appearing in screenshots or from being viewed on non-secure displays. However, due to a design flaw in the Android framework, there are several exceptions. When setting the flag on an Activity or Fragment, the secured protection isn’t inherited by all of its “children” (aka small UI elements), such as various dialogs, floating windows or menus, and popups.

Appdome Protect Dynamically Generated Windows prevents those UI elements’ visibility on screen grab applications ensuring that sensitive data is not recorded from the app’s screen.

Furthermore, on many UI elements, it is fairly difficult to set the FLAG_SECURED, due to lack of a developer-facing API (f.e. Spinner or Toast). On some 3rd party UI frameworks, such as React-Native, the FLAG_SECURED cannot be passed at all without modifying the React-Native framework. Protect Dynamically Generated Windows enables you to protect even those UI elements that do not expose a developer facing API, among many others:

Prerequisites for using “Protect Dynamically Generated Windows”

How to Add “Protect Dynamically Generated Windows” to an app

Follow these step-by-step instructions to add Protect Dynamically Generated Windows to Any Mobile App.

Upload a Mobile App to Your Account

Please follow these steps to add a mobile app to your Appdome account.
If you don’t have an Appdome account, click here to create an account.

From the “Build” tab, Add Dynamically Generated Windows Protection

Select the Build Tab. Beneath the Build Tab, you will find several service options. Select the Security category.

  1. Click  Mobile Privacy to expend the bundle.
  2. Click on the toggle to enable Prevent App Screen Sharing
  3. Click on the toggle to enable Dynamically Generated Windows Protection
  4. Click Build My App

The technology behind Build My App has two major elements – (1) a microservice architecture filled with 1000s of code sets needed for mobile integrations, and (2) an adaptive code generation engine that can recognize the development environment, frameworks and methods in each app and match the app to the relevant code-sets needed to add MicroVPN to the mobile app in seconds.

Congratulations! You now have a mobile app fully integrated with Prevent App Screen Sharing and Protect Dynamically Generated Windows

How to Protect floating windows in Android

After Adding “Protect Dynamically Generated Windows” to a Mobile App on Appdome

After you have added Protect Dynamically Generated Windows to any Mobile App on Appdome, there are a few additional steps needed to complete your mobile integration project.

Add Context™ to the Appdome-Built App

Appdome is a full-featured mobile integration platform. Within Context™, Appdome users can brand the app, including adding a favicon to denote the new service added to the app.
For more information on the range of options available in Context™, please read this knowledge base article.

Sign your Appdome-Built App (Required)

In order to deploy an Appdome-Built app, it must be signed. Signing iOS app and Signing an Android app is easy using Appdome. Alternatively, you can use Private Signing, download your unsigned app and sign locally using your own signing methods.

Deploy the Appdome-Built App to a Mobile Device

Once you have signed your Appdome-Built app, you can download to deploy it using your distribution method of choice. For more information on deploying your Appdome-Built apps, please read this knowledge base.

That is it – Enjoy Appdome with Protect Dynamically Generated Windows in your app!

How Do I Learn More?

Check out Appdome for Mobile App Security page or request a demo at any time.

If you have any questions, please send them our way at or via the chat window on the Appdome platform.

Thank you!

Thanks for visiting Appdome! Our mission is to make mobile integration easy. We hope we’re living up to the mission with your project. If you don’t already have an account, you can sign up for free.

Kai Kenan

Have a question?

Ask an expert

PaulMaking your security project a success!