0

So I have been searching for a while and I would just like to know how to make an app lock or a phone lock with a press of a button. I want to install a custom button to lock my phone instead of using the phone lock button. I want to make my own custom program to do this. I have researched many places but I cant find anything.

Harshad Pansuriya
  • 20,189
  • 8
  • 67
  • 95

2 Answers2

0

The API for locking the phone is not public in iOS. Hence, there is no way you can achieve this in iOS.

For Android, have a look at this, How to Lock/Unlock screen programmatically?

Community
  • 1
  • 1
7vikram7
  • 2,764
  • 1
  • 25
  • 43
0

There is no such a way to make your own custom phone lock button. In iOS it is not possible but if you want to do that in android just look this URL: http://androidsourcecode.blogspot.in/2013/08/android-home-screen-widget-temperature.html