Learn how to play encrypted media files using Android MediaPlayer for any Android app – no coding required.
Play Protected Android Media is an extension to Appdome TOTALDataTM Encryption, which encrypts all data stored and generated by Android and iOS apps. Play Protected Android Media enables embedded and external media players (such as Android MediaPlayer) to access and play encrypted media files in Android apps.
This Knowledge Base article describes Appdome’s Play Protected Android Media feature and explains how to add it to any mobile app without any coding.
We hope you find this knowledge base useful and enjoy using Appdome!
Android and iOS MediaPlayer run on a separate process from the application. Same as most Android services, it runs as a System Service, under System user (UID 0). When Appdome TOTALDataTM Encryption is enabled, all stored data generated by the app is encrypted at runtime using industry-standard AES 256 encryption (including media files). However, when MediaPlayer attempts to read the encrypted media files, it will fail to decrypt the files because it won’t have the private key.
Appdome Play Protected Media enables capturing initial access to an encrypted media file by the application and replacing it with a temporary one-time file path. This ensures that the media player can securely access unencrypted data. This feature applies secure media files and content handoff to external and embedded media players. This secured handoff is completed on-demand and while the data is in transit.
An alternative and more time-consuming solution would be for the app developer to re-write the code to work with FileProvider (Android) or use other methods than AVURLAsset/ file:// URL (iOS), which will be “aware” of the application’s encryption. However, this a technically challenging approach and in most cases, the application architecture does not allow using Content Providers. In other cases, the developer might not have access to the mobile app’s source code. Additionally, working with FileProvider is constricting, as it allows access only to a fixed list of directories declared during development. If you later want to change the list, you need to change the code.
Appdome’s Play Protected Media allows you to use standard POSIX file I/O, without any extra development effort, as an extension of Appdome TOTALDataTM Encryption. When building the app on Appdome, the developers can add a wide variety of features, SDKs, and APIs to Android and iOS apps and can choose any architecture and file I/O API.
Appdome is a no-code mobile security and development platform that allows anybody to add a wide variety of features, SDKs, and APIs to Android and iOS apps in seconds, using a simple ‘click to add’ user interface – no code or coding required.
Using Appdome, there are no development or coding prerequisites. For example, there is no Appdome SDK, libraries, or plug-ins to implement. Likewise, there is no requirement to implement encryption libraries or intercept the writing of files to the sandbox. Using a simple ‘click to add’ user interface, Appdome enables anyone to easily implement mobile app security in any iOS or Android app – instantly, no code or coding required.
Follow these 3 easy steps to add Play Protected Android Media to Any Mobile 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! Your build is complete!
After you’ve finished building your app on Appdome, there are a few remaining steps to complete your project, which you can read about in our KB article on Completing Appdome Projects (Signing, Branding, Deploying apps) on Appdome. It explains both optional steps and required steps.
That is it – Enjoy using your newly secured app!
If you have any questions, please send them our way at email@example.com or via the chat window on the Appdome platform.
Prerequisites for adding Play Protected Android Media to a mobile app.