Code example for DevicePolicyManager

Methods: isAdminActive, wipeData

0
                        builder.setMessage("This is not a test.  " 
                                + "This WILL erase all of your data!  " 
                                + "Are you really absolutely sure?"); 
                        builder.setPositiveButton("BOOM!", new DialogInterface.OnClickListener() { 
                            public void onClick(DialogInterface dialog, int which) { 
                                boolean active = mDPM.isAdminActive(mDeviceAdmin); 
                                if (active) { 
                                    mDPM.wipeData(0); 
                                } 
                            } 
                        }); 
                        builder.setNegativeButton("Oops, run away!", null); 
                        builder.show(); 
                    } 
                }); 
                builder.setNegativeButton("No way!", null); 
                builder.show(); 
            } 
        }; 
         
        public static DevicePolicyManager getDPM() {