How do I disable screen mirroring for Flutter app? - android

I'm working on a new flutter app and the client wants to detect screen mirroring and disable it, Is there is a way to do so in Flutter using a third party package or something?
I've tried using the FLAG_SECURE in android but it disables only screenshots not screen mirroring.

There is no out of the box package for flutter. And there is also no effective way to disable mirroring for Android and iOS.
What you can do on Android is to use the DisplayManager to get all current logical displays with the method getDisplays. Then you can maybe show a pop up if the number of displays is to big for your app, in order to inform the user.
For iOS I don't think there is something available to stop or at least detect screen mirroring.

for android side we can use
int CanMirror = Settings.Secure.getInt(this.getContentResolver(), Settings.Global.DEVELOPMENT_SETTINGS_ENABLED , 0);
you can get better idea :https://stackoverflow.com/a/63971764/18340828
and ios side dont have much idea.

Related

How to mirror android screen/app to a screen programatically?

I am developing an android application and I'm trying to implement a button which initiates a screen mirror to a selected device.
I want it to be as straigth forward as possible, but the best i've been able to do is have it open the cast settings on the Settings app, which isn't a proper solution. It would be ideal to start screen mirroring with a single click.
Problem is i've tried using Googles Cast SDK but that only allows me to build custom HTML cast receivers, which isn't what I want, I just need a screen mirror from the android device to a screen/TV.
Is there any Android module/API that would allow me to do this with a single click, even if I have to use a Chromecast/Miracast device connected to the screen?
No, sorry, this is not an option AFAIK.
At least part of this is privacy/security. You seem to want to be able to start screen mirroring purely from app code ("I'm trying to implement a button", "allow me to do this with a single click"). Your button is the "single click", and so you really want to be able to do this without user involvement at all (since there is nothing forcing that button to exist). Showing the contents of the screen on another screen that might be visible to lots of people is the sort of thing that users need to approve, which is why additional clicks will be required.
In addition, there may be more than one target for screen mirroring within range, and the user needs to be able to choose which one to use, if any.
Combine all that with limited support for wireless displays across the various Android device manufacturers, and there really isn't anything here for what you want.

Mirror screen from a device to another

I am developing an app to achieve the functionality for Screen Casting from one android device to another android device.
I am developing an app which would be functional like teamviewer i.e. cast other user screen and also want to implement the functionality which identify the screen tap from the destination screen which reflect the action to host screen.
I am using below example's link for implementing the functionality. But not able to achieve the solution for screencast.
https://github.com/mmuszkow/ScreenMirroring
https://github.com/farmerbb/SecondScreen
https://github.com/JonesChi/CastScreen
https://integrate.teamviewer.com/en/develop/screen-sharing-sdk/android-tutorial/
Any help will deeply appreciated.
You can not do this Mamta. Not possible in this life.

Android, IOS force pressing on the screen

Is there any way to measure the force (weight) clicking on the screen in Android or IOS ?
For Android there is MotionEvent.getPressure().
As far as I know iOS does not have a way to get pressure information.
Speaking for iOS: there is no possibility to obtain the force employed when touching the screen.

Android non-root lock replacement

Let me begin by saying that, yes, I know that the stock Android lock screen can not be programatically replaced without rooting.
Now that that's over with, I want to make an app that contains a custom 'lock' mechanism. There are apps out there that emulate this functionality, namely LockGo. This allows a user to view information from widgets on a 'lock screen' and emulates the slide-to-unlock functionality (or whack-a-mole if the user wants to install that plugin).
Does anyone know what mechanism or Android API functionality they may have used to do this? Is it as simple as hooking into the power button to launch an activity, such as in the link below?
How to hook into the Power button in Android?
Any insight to this would be appreciated.
I've found out while researching this that, while there is currently no way to replace the stock security or keyguard lock (which I knew), it is possible to show an Activity on top of the lock using the following code in the setup for that Activity:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
This can be used with any logic needed to create a faux lock to show screens on top of the system lock(s), though the lock will still be in tact and the user will need to enter the lock to get into the device.

Personalized lock screen for Android

Hello I am looking for personalized screen locker for android phones, instead of typing numbers , user can flex fingers in a particular pattern and unlock the screen.
Any pointers/ideas are appreciated.
You might want to look at the Android source: LockPatternUtils.java and LockScreen.java for an idea of how to go about implementing your own.
Also interesting is the android.gesture package which you can use to create and save gestures.

Categories

Resources