1. Introducing Channels - a new way to chat with other Android users!
    Dismiss Notice

[Profile] [front Camera] Photo/email image of device intruder


Last Updated:

  1. SUroot

    SUroot Well-Known Member Developer This Topic's Starter

    Joined:
    May 25, 2010
    Messages:
    23,925
    Likes Received:
    5,303
    This is a mid-level complexity profile that takes a photo of someone who incorrectly enters your pattern lock (in this example) twice and emails it to you.

    This is based on multiple examples found but this is my own spin on it.

    The filename of the photo is always the same so it overwrites itself, saving space because if, like me, you often put your pattern in wrong, you'll end up with a million pictures of yourself :)

    Pre-requsites:

    1. SL4a apk - android-scripting.googlecode.com
    2. Secure settings - Google Play
    3. Folder \sdcard\sl4a\scripts containing - sendemailA.py
    4. Python - Install through SL4a as below:

      I have attached the profile exported xml, in a zip. Put this (extracted) in /sdcard/tasker/profiles/. You will still need to do the above and add your email address and password to the tasks below though, but should save some time. UNTESTED
    Creating the profile:

    Profile
    • Add (+) Profile, name "Intrusion"
    Context
    • Select State > Plugin > Secure Settings > configuration Edit > Failed Login Attempts > (set your number, Tick "Device admin" and save
    Task
    • New Task
    • + Media > Take Photo > Camera "Front" > Filename "Last-intruder" (and apply)
    • + Variable > Variable Set > name "%EMAIL_USER" to youremailaddress@here.com
    • + Variable > Variable Set > name "%EMAIL_PSWD" to youremailpassword
    • + Variable > Variable Set > name "%EMAIL_TO" to youremailaddress@here.com
    • + Variable > Variable Set > name "%EMAIL_SUBJECT" to "SGS3 INTRUSION ATTEMPT"
    • + Variable > Variable Set > name "%EMAIL_ATTACH" to "/sdcard/DCIM/Tasker/last-intruder.jpg"
    • + Script > Run SL4A Script > Name (Search icon) sendemailA.py > Pass variables " %EMAIL_USER,%EMAIL_PSWD,%EMAIL_TO,%EMAIL_ATTACH,%EMAIL_SUBJECT "
    • Apply

    [​IMG]
     

    Attached Files:


    Advertisement
  2. Rachel A

    Rachel A Well-Known Member

    Joined:
    Aug 11, 2010
    Messages:
    2,459
    Likes Received:
    869
    Nice job there SU! I've been trying to piece this together for a while, and here it is, all in one easily digestible chunk!

    One question: is SL4a installed as standard now? I have it on my tasker but cannot recollect if I installed it separately.

    Thanks!
     
    SUroot likes this.
  3. SUroot

    SUroot Well-Known Member Developer This Topic's Starter

    Joined:
    May 25, 2010
    Messages:
    23,925
    Likes Received:
    5,303
    Hmm I'm not sure. I've had this a while now and updated a few tasker versions. I had to install it but I cannot say whats included now.
     
    Rachel A likes this.
  4. Flumme

    Flumme Well-Known Member

    Joined:
    Jun 29, 2011
    Messages:
    333
    Likes Received:
    88
    Yes, it's installed as you install Tasker.
     
    SUroot likes this.
  5. SUroot

    SUroot Well-Known Member Developer This Topic's Starter

    Joined:
    May 25, 2010
    Messages:
    23,925
    Likes Received:
    5,303
    Thanks guys. Reworded but left the link for reference.
     
    Rachel A likes this.
  6. Flumme

    Flumme Well-Known Member

    Joined:
    Jun 29, 2011
    Messages:
    333
    Likes Received:
    88
    I'm sorry. :(

    On closer inspection, it is not installed as a part of Tasker, I jumped to conclusions...
     
  7. mrhomiec

    mrhomiec Well-Known Member

    Joined:
    May 16, 2010
    Messages:
    528
    Likes Received:
    60
    So I'm trying to figure out how to move the snapped picture, but don't know how to go about this.

    Trying to setup a new profile, I found event > file > file attribute change, file deleted, file moved, file closed, file modified, and file opened.

    Was thinking file modified, but it asked for a specific file name. But I have the snap picture name the file chronologically.

    Any suggestions?
     
  8. davoid

    davoid Well-Known Member

    Joined:
    Aug 3, 2011
    Messages:
    1,792
    Likes Received:
    700
    This is great! I'm going to try this out.

    Do the folders with path /sdcard need to be on the internal memory?
    I was wondering because of the /sdcard/DCIM/Tasker/ path for the photo; does Tasker save photos here by default? Asking because my DCIM folder is on extSdcard.

    I'm assuming the /scripts folder will need to be on /sdcard.
     
  9. SUroot

    SUroot Well-Known Member Developer This Topic's Starter

    Joined:
    May 25, 2010
    Messages:
    23,925
    Likes Received:
    5,303
    If you prefix the filename, can you use a wildcard?
     
  10. SUroot

    SUroot Well-Known Member Developer This Topic's Starter

    Joined:
    May 25, 2010
    Messages:
    23,925
    Likes Received:
    5,303
    Mine too. No it defaults here. Tasker (like many apps) does not know about extSdCard. Cannot find a setting.

    This profile will keep a maximum of 1 image there
     
  11. mrhomiec

    mrhomiec Well-Known Member

    Joined:
    May 16, 2010
    Messages:
    528
    Likes Received:
    60
    it didn't work.

    i named the photo "tried" with the chronological setting. this names the files "tried.2012-09-12-06-44.jpg" then in the file move profile, i tried to identify it with "tried.*.jpg" and "tried.*" and when testing via failed unlock and trying to press the play button, it didn't work.

    however from pressing the play button, i was able to see an error "file does not exist". so it sounds like it has to be an exact match.

    i also tried to just in general pay attention to the /Tasker/ folder, and still the same results.
     
  12. SUroot

    SUroot Well-Known Member Developer This Topic's Starter

    Joined:
    May 25, 2010
    Messages:
    23,925
    Likes Received:
    5,303
    You may need to write the file name to a variable or something
     
  13. biggoog

    biggoog Well-Known Member

    Joined:
    Jan 16, 2012
    Messages:
    126
    Likes Received:
    13
    Takes pic sends to my drop box but does not send me an email??Followed all the steps ?????
     
  14. SUroot

    SUroot Well-Known Member Developer This Topic's Starter

    Joined:
    May 25, 2010
    Messages:
    23,925
    Likes Received:
    5,303
    Does the send email script run? In the status bar?

    [​IMG]


    Does the sendemail python script show up in the sl4a app?

    [​IMG]
     
  15. SUroot

    SUroot Well-Known Member Developer This Topic's Starter

    Joined:
    May 25, 2010
    Messages:
    23,925
    Likes Received:
    5,303
    Attached an export of the profiles in post1
     
  16. biggoog

    biggoog Well-Known Member

    Joined:
    Jan 16, 2012
    Messages:
    126
    Likes Received:
    13
    No it does not show up in status bar. 2 it shows up in my scripts.
     
  17. SUroot

    SUroot Well-Known Member Developer This Topic's Starter

    Joined:
    May 25, 2010
    Messages:
    23,925
    Likes Received:
    5,303
    Please provide a screen shot of your tasks.
     
    biggoog likes this.
  18. biggoog

    biggoog Well-Known Member

    Joined:
    Jan 16, 2012
    Messages:
    126
    Likes Received:
    13
    I used the profile you loaded in the first post.
     
  19. biggoog

    biggoog Well-Known Member

    Joined:
    Jan 16, 2012
    Messages:
    126
    Likes Received:
    13
    Guess I got the change my password. Lol.
     
  20. SUroot

    SUroot Well-Known Member Developer This Topic's Starter

    Joined:
    May 25, 2010
    Messages:
    23,925
    Likes Received:
    5,303
    So email user (task 2) doesn't have an @gmail.com or whatever on the end.

    Take those pictures down if i were you.....
     
    biggoog likes this.
  21. biggoog

    biggoog Well-Known Member

    Joined:
    Jan 16, 2012
    Messages:
    126
    Likes Received:
    13
    Removed Pic Thank you.
    I read the Sl4A tuturial and it said not to put the @gmail.com because it wlould use @gmail.com atuomaticly.
    I had it there at first it still did not work?? :confused:
     
  22. SUroot

    SUroot Well-Known Member Developer This Topic's Starter

    Joined:
    May 25, 2010
    Messages:
    23,925
    Likes Received:
    5,303
    It's the only difference I see.

    If you press sendemailA.py from sl4a, do you get icon in status bar?
     
  23. biggoog

    biggoog Well-Known Member

    Joined:
    Jan 16, 2012
    Messages:
    126
    Likes Received:
    13
    i dont have a sl4a App. sl4a was alreadry installed on my version of tasker. Where do i press sendemailA.py ????
     
  24. biggoog

    biggoog Well-Known Member

    Joined:
    Jan 16, 2012
    Messages:
    126
    Likes Received:
    13
    download sl4a app. file is there when i try to run it from app or tasker i get this:
    "Sorry!
    The application SL$A(process com.googlecode.android_scripting) has stopped unexpectedly. Please try again."
    Wont let me take a screen shot of that screen. Looks like a System error???:confused:
    Edit:
    1. Downloaded sl4a app installed 2. Installed python 3. Added @gmail.com to email.
    4. WORKING like a charm.
    Thanks a lot SUroot for all the help anf feed back.
     
  25. SUroot

    SUroot Well-Known Member Developer This Topic's Starter

    Joined:
    May 25, 2010
    Messages:
    23,925
    Likes Received:
    5,303
    In the app, you need to install the python interpreter as per post 1, prerequisite 4
     
    biggoog likes this.

Share This Page

Loading...