Prevent remote screen recording of android app programmatically - android

I want to prevent remote screen recording of my app using third party apps like Anydesk, Quicksuppport, Teamviewer etc.
I have used below flag for activity :
getWindow().setFlags(WindowManager.LayoutParams.FLAG_SECURE, WindowManager.LayoutParams.FLAG_SECURE);
but the above flag doesn't work for all devices.
Any other work around for preventing remote screen recording?

The apps you mentioned are operating with either permission of CAPTURE_VIDEO_OUTPUT or CAPTURE_SECURE_VIDEO_OUTPUT. Unfortunately, if they own CAPTURE_SECURE_VIDEO_OUTPUT, then setting the FLAG_SECURE on your window has no effect from their viewpoint.
Sadly, I don't think there is a better (or more effective) way to achieve the desired behavior.
If you make your app a device administrator, then (on certain api levels) you will have the ability to disable screen capturing on the entire device, but setting this up is a lot of hassle, and it's probably not what you want to do in the first place.

Related

Is that possible to make timer (clock) quick access from lock screen? A calculator?

I moved from iPhone to Android (Samsung S7) and missing one feature. In iPhone I could use quick access to set clock and timer and set direct from locked screen if to press a button at quick access panel, shown at the picture with arrow. Is it possible to make a similar quick access to clock app in android from lock screen? To put it in android quick access panel or in some other way like third party app, etc: aiming to access clock app set on lock screen quick w/o logging in? Same question with Calculator app.
In Android you can do almost everything with apps.
I found here some apps that allow you to create widgets on your lockscreen, you click on them, unlock your screen, and the app launches:
https://www.maketecheasier.com/launch-apps-lockscreen-android/
I own a OnePlus so I know they have this option build in.
You can also use the Xposed module "GravityBox" or "LockscreenMods"
(it is not possible to bypass the unlockscreen through a lockscreen widget!)

Is it possible to programmatically lock the screen in Lollipop

I am building an app that will be in kiosk mode and must be over the lock screen its is possible using:
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
However, I now need to programmatically lock the screen when the app is starting, looking at this link, I see it needs administrator privileges that are a bit more complicated on the lollipop version, has anyone managed that?
For your need, you can use the Screen Pinning. It's a new functionnality added in Android 5 to limit the application a task.
Programmatically, you can use Activity.startLockTask() and Activity.stopLockTask() to pin/unpin the application.
Some things to know :
If your application is not an Admin app, a popup will appear and you'll have to manually confirm the pinning mode.
No notifications will be shown in this mode.
The Home and Recent Apps buttons will have no effects.
you can unpin the application with no confirmation, and if you have set a Keyguard screen, you'll need to unlock it to go back to your Home application.

Possible to make setSystemUiVisibility() affect the entire system, rather than just your app?

I was hoping to make an app which dimmed the soft buttons to dots on the Galaxy Nexus, using the code from this answer. For completeness, this is the code:
getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LOW_PROFILE);
Here's the question, is it possible for the app to make this setting system-wide rather than just while the app has focus? So ideally the app would run in the background and would keep View.SYSTEM_UI_FLAG_LOW_PROFILE as the default as long as it's running, for any and every app that you open (unless that app specifically overrides it, I suppose). Is this possible or does this fall outside the realm of what an Android app has permission to do?
A sample use case is this: I use the "Screen Filter" app to reduce brightness a lot for nighttime ebook reading or misc app usage, but the soft buttons are still very bright and distracting, so I wanted to make an app that would dim the soft buttons system-wide while running (like how "Screen Brightness" reduces screen brightness system-wide while running) so this wouldn't be a problem.
As CommonsWare states, it's not possible for an application to change this setting. It's an Activity based setting, that must be set for every single Activity, if you want to make it fullscreen, hide the soft keys, etc.
It's also worth pointing out that you should probably refrain from using it in all your application activities. It's really only meant for games, video players and other applications that need to enter this "low profile" state.
Feel free to accept CommonsWare's answer - I just thought I'd give you a bit of background info on the subject.
is it possible for the app to make this setting system-wide rather than just while the app has focus?
No.

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.

Android: launching flash app as a screensaver

i am new to android development and had question regarding custom screen saver.
The requirement is for a tablet which will always be plugged in so battery life wouldn't be
an issue. The required app should behave as a screensaver in that during inactivity, the tablet should launch this app which contains a flash file that displays a series of images and video. When activity is resumed then the tablet takes the user back to the program they were using.
Can this be done via an app without requiring any hacks?
cheers,
abhi
There is no concept of a "screensaver" in Android.
There is the lock screen, which can be modified via custom firmware, though AFAIK it is implemented in Java as part of the OS and therefore could not be replaced via a Flash APK.

Categories

Resources