How to unlock android phone through code remotely
<p>I have written an application that locks android phone remotely. That is when a special code is sent from server then application locks the phone based on the special code. This is the code I am using.</p>

<pre><code>if (!mDPM.isAdminActive(mDeviceAdminSample)) {
        // try to become active – must happen here in this activity, to get result
        Intent intent = new Intent(DevicePolicyManager.ACTION_ADD_DEVICE_ADMIN);
        intent.putExtra(DevicePolicyManager.EXTRA_DEVICE_ADMIN,mDeviceAdminSample);
        intent.putExtra(DevicePolicyManager.EXTRA_ADD_EXPLANATION,"Admin is added to do security operation.");
        startActivityForResult(intent, 0);
        } else {
        // Already is a device administrator, can do security operations now.
        mDPM.lockNow();
        }
</code></pre>

<p>The above code is working and it's locking the phone. </p>

<p>I am able to unlock the phone by entering password from soft keypad. Is there any way to unlock it through code?</p>

<p>My question is how to unlock the phone through code.(This unlocking should be done remotely in the manner I explained for locking) </p>
