Sir please help me to solve eroor
 
============================================================================
on keyStatus.java
============================================================================

DevicePolicyManager dpm;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        dpm = (DevicePolicyManager)
getSystemService(Context.DEVICE_POLICY_SERVICE);
        dpm.lockNow();

    }






============================================================================
AndroidManifest.xml
============================================================================



<uses-permission
android:name="android.permission.USES_POLICY_FORCE_LOCK"></uses-
permission>



==============================================================================

LOG CAT

=============================================================================


02-07 16:35:47.007: ERROR/AndroidRuntime(942):
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.keyStatus/com.keyStatus.keyStatus}:
java.lang.SecurityException: No active admin owned by uid 10031 for
policy #3




-- 
You received this message because you are subscribed to the Google Groups 
"Android Security Discussions" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/android-security-discuss?hl=en.

Reply via email to