Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make Android system force LANDSCAPE for all apk?

To get this, I've made three kind of modify in android system(v4.04).They are: 1. WindowsManagerService.java, modified the getOrientationFromWindowsLocked(); 2. Activity.java, modified the onResume(); 3. PhoneWindowManager.java, modified the setInitialDisplaySize(); They all get work, but also with some side effect. So is there a better modify for this? Any suggestion will greatly appreciated. Thanks very much.

like image 699
psj Avatar asked Dec 12 '25 20:12

psj


1 Answers

According to me you have to modified your SensorManager class in android. The method provided is onSensorChange(). In this method you can write the code for your requirement i.e for Landscape mode.

like image 200
Aarun Avatar answered Dec 14 '25 09:12

Aarun