Develop app run in kiosk mode in android

后端 未结 2 1005

How to make our app which is act like kiosk mode app( SureLock lockdown app). I have LG E400 rooted android phone Android 2.3.6. I want to develop app like Sure

2条回答
  •  被撕碎了的回忆
    2020-12-22 20:54

    Ok ... after hours of struggling with this my self and finding nothing on net worth while....(does not require rooting of phone)

    Home button ::::

    
    

    to handle home bottom...

    Back button ::::

    @Override
    public void onBackPressed() {
        // We doing this too stop user from exiting app, normally.
        // super.onBackPressed();
    }
    

    For long press home button( recent app activity or google now) or recent app button ...

    @Override
    protected void onPause() {
        super.onPause();
    
        ActivityManager activityManager = (ActivityManager) getApplicationContext()
                .getSystemService(Context.ACTIVITY_SERVICE);
    
        activityManager.moveTaskToFront(getTaskId(), 0);
    }
    

    will need permission ...

    
    

提交回复
热议问题