I am working on 1 application for Video chatting where I need to implement the following functionalities.
During video chat if anyone tries to capture a screenshot of the screen then he can able to take a screenshot but at that time I need to show a warning popup message and report to the admin.
But if I use "Secure Flag" then it will prevent taking screenshots but I can't able to show a warning popup message and report to a user.
Similar way if anyone tries to capture screen recording then can't able to record and we can show warning popup.
By using "Secure Flag" we can prevent taking screenshots and screen recording but we can't get any event and due to that we can't show warning popup messages.
Neither of those are possible, sorry. Your app is not informed about apps using the media projection APIs, which includes any device-supplied screenshot/screencast tools.
Related
iam developing screenlock app for android using a React Native and a little annoyed with the screen pinned dialog that always appears, is there a way to just get rid of it? so what I really want is no dialogue interaction at all with the user
enter image description here
If you're calling startLockTask() and your device isn't set up as a dedicated device with your app whitelisted, then no you can't prevent it:
Otherwise, the current task will be launched into screen pinning mode. In this case, the system will prompt the user with a dialog requesting permission to use this mode. The user can exit at any time through instructions shown on the request dialog.
The dialog is there to help users understand what's happening, give permission for the app to take over their screen, and know how to get out of it later. It's baked into Android by design, so malicious apps can't cause problems - it's just a limitation you have to deal with, unless you're working with a dedicated device (which can be set up to give apps more control and users less)
Have you thought about immersive mode instead, where you hide the nav bar? The user can get out of that too by swiping to reveal the controls, but it's less intrusive. There's no way to automatically lock the user's screen with no interaction though
I currently use RecognizerIntent to perform STT on an Android app. When a user clicks a button, the Google Voice Input screen pops up, the user can speak and it is transcribed. When it is quiet enough, the popup shuts and the input is processed.
However, the popup will not shut / process the results if there is still some background noise (despite having transcribed the necessary words).
If I click the screen, the popup disappears, but the results are not processed.
Is there a way to click the popup window (the microphone that pops up) to force the app to stop recording and process the results it has already transcribed?
Thank you in advance!
Your question is not about the Android OS but about a particular end-user app that implements the RecognizerIntent activity.
Google app v10.98.7.21 on Android v10 does not seem to have this feature that you're after. However, there is no way of knowing for sure because it's a closed source app, without detailed release notes nor end user documentation, nor does it make any commitments regarding its future behavior. A good idea for your app is not to depend on such 3rd party apps.
I made a small Google Home App and my service returns a response with a SimpleMessage + Card.
It works perfectly when running the app in the console.actions.google.com simulator. I get the card all good.
But when I test talking to the Google Home, it only sends the text, no trace of the Cards anywhere.
However If i talk to the Google home app on my phone, it does send the card correctly.
Is there something to enable to be able to receive cards sent by Google Home? Is it possible at all?
There is no way to make cards that were sent while the user is talking via Google Home visible, but there are several techniques that you, as a developer, can use if cards are necessary.
First of all - good design suggests that cards should be use to supplement the conversation, not be the focus of the conversation. Make sure the voice conversation itself is important and use the visual elements only when necessary. If your action is overly visual - it may be better suited as a mobile or web app, rather than an Action.
If your device requires a screen, then you can set this in the Action Console when you configure your question. This will, however, prevent it from being used on a Google Home device.
If you don't want to go this route, and want to allow it to be used on a smart speaker, but still take advantage of a screen where it is available, you have a few options.
First is that you can just send the cards. As you've discovered, they won't show up, but they won't cause any problems.
If you want to act slightly differently if a screen is available, you can check for the surface capabilities that the user's Assistant is capable of at that moment. If you're using the node.js library, you can have a command such as
let hasScreen = app.hasSurfaceCapability(app.SurfaceCapabilities.SCREEN_OUTPUT)
to determine if a screen is available and take action based on the variable hasScreen. If you're using JSON, you need to check the array at surface.capabilities or data.google.surface.capabilities to see if "actions.capability.SCREEN_OUTPUT" is one of the available surfaces.
If not, and you get to a point in the conversation where you feel you need to send a visual result, you can also request to continue the conversation on a device that does support screen output.
First, you'll need to make sure that they have a screen available. You'll do this with the node.js library with something like
const screenAvailable = app.hasAvailableSurfaceCapabilities(app.SurfaceCapabilities.SCREEN_OUTPUT);
or by checking the availableSurfaces.capabilities or data.google.availableSurfaces.capabilities parameters in JSON.
If one is available, you can request to continue the conversation there with something like
app.askForNewSurface(context, notif, [app.SurfaceCapabilities.SCREEN_OUTPUT]);
where context is the message that will be said on the Google Home, and notif is the notification that will appear on their mobile device (for example) to let them continue the conversation. If using JSON, you'll need to use a actions.intent.NEW_SURFACE next intent.
Either way, the user will get a notification on their mobile device. Selecting the notification will start up the Assistant on that device and your Action will be called again with parameters that let you check if they are on the new surface. If so - you can send the card.
I am getting complaints from my customers that when they load my app, they see a "Screen Overlay Detected" alert message from the system. Note that this only occurs on Android M or higher.
The alert looks something similar to below.
http://i.stack.imgur.com/BEGzf.png
From my understanding, this is caused because some "other" app on the device is requesting the "overlay" permission. I've confirmed with my customers that if they remove the app that has the "overlay" permission, then it fixes the problem but is there anything I can do on my side?
Meaning, is there some way for me to inform the system to not allow this alert dialog to be displayed? It's distracting to my customers to see this every time they load my app and it's more frustrating to "me" that there is nothing I can do to fix this.
It seems that you are using a Screen Filtering app(the brownish overlay on the screen). Turn off and it won't bug you.1
Is there any way to get notified when a screen capture is performed using the soft key or the device hard key on android? Any way that works 2.3 onwards will help greatly.
Use case:
I already block screen capture using FLAG_SECURE. I want to show a Custom Dialog to the user when this action is performed. Android supplied mechanisms vary. Sometimes a notification is seen while at others, a blank screenshot is captured with no user feedback.
Is there any way to get notified when a screen capture is performed using the soft key or the device hard key on android?
No, sorry.