Java tutorial
//package com.java2s; //License from project: Open Source License import android.app.Activity; import android.content.pm.ActivityInfo; public class Main { public static void unlockScreenOrientation(Activity activity) { activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_SENSOR); } }