Lock sceenshot on android - locking

I would like to lock screenshot on android. For most androids, you have to simultaneously hold the power button and the volume down button to take a screenshot. How to block or forbid this action on android.

Related

need the react native app to receive headset button event when the device is in locked state

How to run react native app in background. I need the app to accept the voice command when i click the headset button even when the device is in locked state.
Basically headset button click event should trigger the app to listen for voice. Currently my app accepting the voice command in foreground mode and works. but my requirement is even if device is locked , up on clicking the head set button i should trigger the app.
It wasn't done before but today you can by adding some libraries to create a background service. I believe you can later capture the event you want. this what you will tell us.
Follow this link to learn how to create the background service
Libraries you will need:
React Native Queue
react-native-background-task

React-Native: How to get Screen Lock time?

I need to find whether the application sent in background manually or automatically? In react-native, if the screen gets locked, the app state treats it as background. It doesn't matters if you intentionally send the app to background(by either killing the app or pressing home button) or it was sent in the background automatically(due to screen lock). Is it possible to distinguish both events? Is there any way in react-native to find out the device's screen lock time?
After a long search I found this:
https://www.npmjs.com/package/react-native-home-pressed

can we Disable taking screenshots in own app ? using objective-c,xcode?

I want to make an app in which users can't take screenshots,so is it possible in objective-c?
You can not prevent taking screenshots entirely. But You can do what Snapchat does, that will be requiring the user to be touching the screen to view whatever information you're displaying. This is because the system screenshot event interrupts touches. It's not a perfect method and you can't prevent users from taking screenshots 100% of the time.
More details: iOS Detection of Screenshot?

Lock screen notification automatically releases lock when it is tapped

I am trying to make lock screen notification that asks users to release its lock when it is clicked.
Notification using NotificationCompat.builder works fine with lock screen of pins, patterns and password. But when lock screen is set with dragging, tapping notification automatically releases device's lock and do the work right away, not asking users to drag for releasing its lock.
My code looks like below
mNotificationManager = (NotificationManager)context.getSystemService(Context.NOTIFICATION_SERVICE);
mBuilder = new Notification.Builder(mContext).setSmallIcon(R.drawable.indicator_icon);
Notification noti = mBuilder.build();
mNotificationManager.notify(NOTIFICATION_ID, noti);
I tried depreciated API Noficiation() like below
Notification notification = new Notification();
notification.icon = R.drawable.indicator_icon;
mNotificationManager.notify(NOTIFICATION_ID, noti);
This works fine! (It asks dragging for linking to my application even when screen is locked by simple dragging)
So I guess there is a difference between two codes above. I cannot use notification since I need to set remote view.
The thing is the first code also works well on some devices like Galaxy S5, but not on the other devices like Galaxy Note 4. On the Galaxy S5, it does not release its lock by itself, but a little UI difference is made when I tap the notification.(such as not showing clock or other notifications)
Could anyone give me some advice?
I solved it! The problem was setting pending intents on the remote view not builder itself. Both works, but they act differently in the different settings of all kinds of devices. I guess it is safer to set pendingIntents on the builder itself, not the remoteview...

Force showing keyboard in metro?

I'd like to be able to force the keyboard to show on screen in my Metro app. My goal is to test out different layouts/controls and get a feel for the interaction. My problem is that I'm running Win8 on a MacBook Pro (Parallels) and I don't know how to override the physical keyboard and show it on screen instead.
Similarly, I'd like to be able to force rotation if possible.
You could run your app the Simulator. You can put the Simulator in "Touch Mode" and that will interpret mouse clicks as touch events in the on screen controls like Text Boxes and you can choose to rotate the Simulator into profile as well.