Skip to main content

How to disable unlocking screen programatically


  1. I need to lock the Android phone when the user leaves a defined WiFi area

  2. I need to prevent the user from unlocking the phone when he/she is out side the defined WiFi area

  3. I need to unlock the phone when user is back to the WiFi area



I guess list items 1 and 3 can be done programatically.



Is it possible to do the 2 nd item?


Source: Tips4allCCNA FINAL EXAM

Comments

  1. I need to prevent the user from unlocking the phone when he/she is out side the defined WiFi area


    Fortunately, this is not supported, for obvious security reasons.

    You are welcome to create your own home screen that offers different behavior when inside/outside a defined area and use that in lieu of trying to prevent a phone from being unlocked. However, the user is welcome to remove that home screen by booting their device into safe mode and uninstalling your app.

    ReplyDelete
  2. I had done similar thing in past but dont have the code right now so cant help in that respect. What I did is implement the app as Car Dock that will make the Home button override unless car-dock mode is dis-abled. I hope this will help, for code google it you definitely find resources

    ReplyDelete
  3. Locking can be done using this method: How to lock screen, android
    Unlocking look here: How my app can unlock screen programatically?

    For your problem 2, i see 2 solutions

    a. If the user unlocks the screen, a message is fired: check at that moment if you are in the area and if not, instantly lock again

    b. create your own locksreen with no possibility to unlock yourself

    ReplyDelete
  4. I guess this will help you out. This is just for Disabling the Lock Programmatically.Disable Screen Lock

    ReplyDelete

Post a Comment

Popular posts from this blog

Why is this Javascript much *slower* than its jQuery equivalent?

I have a HTML list of about 500 items and a "filter" box above it. I started by using jQuery to filter the list when I typed a letter (timing code added later): $('#filter').keyup( function() { var jqStart = (new Date).getTime(); var search = $(this).val().toLowerCase(); var $list = $('ul.ablist > li'); $list.each( function() { if ( $(this).text().toLowerCase().indexOf(search) === -1 ) $(this).hide(); else $(this).show(); } ); console.log('Time: ' + ((new Date).getTime() - jqStart)); } ); However, there was a couple of seconds delay after typing each letter (particularly the first letter). So I thought it may be slightly quicker if I used plain Javascript (I read recently that jQuery's each function is particularly slow). Here's my JS equivalent: document.getElementById('filter').addEventListener( 'keyup', function () { var jsStart = (new Date).getTime()...

Is it possible to have IF statement in an Echo statement in PHP

Thanks in advance. I did look at the other questions/answers that were similar and didn't find exactly what I was looking for. I'm trying to do this, am I on the right path? echo " <div id='tabs-".$match."'> <textarea id='".$match."' name='".$match."'>". if ($COLUMN_NAME === $match) { echo $FIELD_WITH_COLUMN_NAME; } else { } ."</textarea> <script type='text/javascript'> CKEDITOR.replace( '".$match."' ); </script> </div>"; I am getting the following error message in the browser: Parse error: syntax error, unexpected T_IF Please let me know if this is the right way to go about nesting an IF statement inside an echo. Thank you.