iOS Question Deleting Photos from Gallery

Ertan

Active Member
Licensed User
hi i need to do this for a project.
I searched but could not find it.
Frankly, what I want to do is this:

We can detect it taking a screenshot on iOS. ( How Can It Be Detected?)

After taking a screenshot of this person, I want to delete the last photo from the gallery.

How do I go about doing this? or what way will I go?

Is there such an example? I would be very grateful if you could help me.

if this is not possible;
as a solution
Or how do I lock the screen after taking a screenshot? Our goal is to waste time to send the screenshot after it is taken.
 
Last edited:

Semen Matusovskiy

Well-Known Member
Licensed User
There are many enough simple ways to lock screen (exactly, to disable user interaction) after user takes a screenshot.

But if you/your customer have a lot of money, you can use commercial solutions (for example, https://screenshieldkit.com/. As I understand, similar frameworks convert views to video players with DRM support.
 
Upvote 0

Ertan

Active Member
Licensed User
There are many enough simple ways to lock screen (exactly, to disable user interaction) after user takes a screenshot.
Obviously I have a QR code that ranges between 3 and 7 seconds.
It takes about 7-8 seconds to send to a person. (via whatsapp)
I want to activate the screen lock after the user takes a screenshot. That way, the QR code will already be changed until the user sends it.
Is there a code for this? (like activating a screen lock at the press of a button).
Thank you.
 
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
If you want to disable own app, you can use OBJC

B4X:
[[UIApplication sharedApplication] beginIgnoringInteractionEvents];
[[UIApplication sharedApplication] endIgnoringInteractionEvents];

Or do the same using NativeObject.
B4X:
Dim no As NativeObject = App
no.RunMethod ("beginIgnoringInteractionEvents", Null)      ' Or no.RunMethod ("endIgnoringInteractionEvents", Null)

But this code does not disable system Home button and user can switch to another app. IMO, real solution is to use ScreenShieldKit framework.
 
Upvote 0

Ertan

Active Member
Licensed User
If you want to disable own app, you can use OBJC

B4X:
[[UIApplication sharedApplication] beginIgnoringInteractionEvents];
[[UIApplication sharedApplication] endIgnoringInteractionEvents];

Or do the same using NativeObject.
B4X:
Dim no As NativeObject = App
no.RunMethod ("beginIgnoringInteractionEvents", Null)      ' Or no.RunMethod ("endIgnoringInteractionEvents", Null)

But this code does not disable system Home button and user can switch to another app. IMO, real solution is to use ScreenShieldKit framework.
Thank you I tried the codes.
I want to do something like this;
When the user takes a screenshot, I want it to activate the apple lock screen.
DownLocker.jpg

I guess this could be on android operating systems, but I'm not sure it will happen on the iOS operating system.

I would be very grateful if you could help me with an example like this.
 
Upvote 0

Semen Matusovskiy

Well-Known Member
Licensed User
There is no public API to activate lock screen. Meanwhile the best way to keep a secret is simply do not show secret fields at least in one moment. If you want to protect QR, you can add/remove some lines to picture on the screen
 
Upvote 0
Top