1
try{
            screenOn = intent.getBooleanExtra("screen_state", false);
            rotation = intent.getStringExtra("rotation");
            orientation = intent.getStringExtra("orientation");

        }catch(Exception e){}


        if (!screenOn) {



        } else {


            if(rotationChecker){
                Log.e("TAG","String orientationRotation above unlock");
                UnLocker();
            }
            rotationChecker=true;
            //
            //
            new Handler().postDelayed(new Runnable() {

                @Override
                public void run() {
                    Log.e("TAG","String orientationRotation in run");
                    // TODO Auto-generated method stub
                    rotationChecker=false;
                }
            }, TIME_DELAYED);

i want to call unlock function when time_delayed and rotationchecker is true but my code not working.I need code which can keep track of last orientation and last rotation and compare with new rotation and orientation values within TIME_DELAYED value then it should call unlock function

Swapnil
  • 654
  • 7
  • 27

0 Answers0