- Secure Settings plug-in
- Cloud Sync plug-in such as Dropsync or Foldersync (OPTIONAL)
- Pushbullet or Join for notifying your other devices (OPTIONAL)
- Ensure that Secure Settings is set as a Device Administrator by opening the app and going to the Preferences screen. This is so the plugin has the ability to monitor unlocking attempts.
- Open Tasker, and create a new profile by clicking on the + sign on the bottom-right. Name your profile 'Discreet Picture' or whatever it is you like.
- Create a "State" context and select "Secure Settings" under the "Plugin" state category.
- Press the pencil icon to open up Secure Setting's options. Expand the "Conditions" arrow and choose the "Failed Login Attempts" option.
- Under "Maximum Failed Login Attempts" enter the number of failed login attempts that must occur before the context is fired. Also, double check that "Device Admin Enabled" is already checked. If not, go back and enable it.
- Click the save icon up top to exit configuring the Secure Settings context. When you're back in the Tasker screen, press your back key to exit setting up the context.
- Tasker will now ask you to set up a new task associated with this context. Click on "New Task" and optionally give the task a name. Before we move on, here's a picture of what the context screen should look like.
Now that you've set up the context, it's actually time to set up the task that fires when an incorrect lock-screen input is detected. For each instruction listed below, press "+" at the bottom to bring up the list of Actions you can choose from.
- Variables --> Variable Convert. Under Name type in %TIMES or select it from the list of built-in variables by pressing on the note icon. Under Function, choose "Seconds to Medium Date Time" and under Store Result In type in %date.
- Media --> Take Photo. Under Camera pick the Front camera. For the filename, type in %date. Deselect "Insert in Gallery" to ensure that the photo can't be seen in any gallery apps. Select "Discreet" to disable the shutter sound when Tasker takes the photo. For Resolution, you can pick whatever you want, however I would recommend selecting a high resolution to get a clear picture. Leave everything else as default.
- OPTIONAL: If your phone is rooted, you can toggle location services to ensure it's on by going to Secure Settings and selecting Location Mode under the System+ dropdown. You would first have to enable the System+ Module within Secure Settings before the application will allow you to select this option, however. If you are unrooted, then your only option to automate enabling location services is to use an app like AutoInput to simulate touch inputs.
- Location --> Get Location. For source, I would recommend "Any" to ensure Tasker can get an accurate lock on your location.
- OPTION A: Phone --> Send SMS. Under Number, you can choose a telephone number to send an SMS with the location to. Just put %LOC under Message and Tasker will populate the SMS Message with whatever GPS coordinates it pulled earlier.
- OPTION B: Plugin --> Pushbullet. Open Pushbullet settings, and select the device you want to push to. For the title, you can set something that will alert you. In the message, put %LOC under Message to populate the GPS coordinates.
- OPTION C: File --> Write File. Under File, type in /sdcard/DCIM/Tasker/%date.txt in order to write to a text file named with the date that the incorrect attempt was made. Under Text, type in %LOC.
- OPTION C (cont.): Plugin --> Dropsync/Foldersync. Make Tasker perform a manual sync of the /sdcard/DCIM/Tasker folder. I recommend you set up either app to upload the file then delete it from your phone.
That's it! Your phone should now notify you with a picture and a location whenever an incorrect unlock attempt has been made.