Rajiv Kumar
Rajiv Kumar

Reputation: 1

Using Wifi Direct in android Want to lock the connected device

I'm developing an application based on WiFi Direct. So far i completed finding peers and send data to connected device and i want to add one button as lock button if, i press on that button the connected device should lock.

Any ideas?

Upvotes: 0

Views: 361

Answers (1)

Ziad Halabi
Ziad Halabi

Reputation: 866

One way to do it is the following: when the user presses the button, the device would send a packet to the other device stating to lock the phone. On the receiver side, you can check if the received packet contains for example the String "Lock" then it should lock itself.

In order to lock the phone programatically, check this question:

Lock the android device programmatically

Upvotes: 1

Related Questions