Can i specially forbids switching orientation when rotating phone on my app?

by Philip » Sat, 24 Oct 2009 17:23:01 GMT

Sponsored Links
 When i chick a button on my app , the method below will be happened.
(),Settings.System.ACCELEROMETER_ROTATION, 0) == 1) {
(),Settings.System.ACCELEROMETER_ROTATION, 0);
Here i want to forbids switching orientation when rotating phone.
Also i hope the screen orientation will not be changed.
But when here is horizontal screen mode, the screen orientation will
be changed to vertical mode automatically .
That's not what i want.
Any suggestions?


Other Threads

1. How to implement HIDD on Android

Hi All,

I have a specific requirement. I need to implement HID profile in
Android bluetooh. so that it can work with HID enabled devices(can
connect disconnect and data transfer).

So If anyone implemented it. please give me some pointers on the same

Warm Regards,


2. E/dalvikvm : ERROR: Byte swap + verify failed

     I'm trying to port glibc to linux kernel v2.6.31. I am using a TI
OMAP 3503 processor.

I'm getting this error with linux-omap3-2.6.31:

E/dalvikvm(  676): ERROR: Byte swap + verify failed

Here is the full error message:

D/AndroidRuntime(  659):
D/AndroidRuntime(  659): >>>>>>>>>>>>>> AndroidRuntime START
D/AndroidRuntime(  659): CheckJNI is ON
I/        (  660): ServiceManager: 0xac38
W/AudioHardwareInterface(  660): Using stubbed audio hardware. No
sound will be produced.
I/AudioFlinger(  660): AudioFlinger's thread ready to run for output 0
I/CameraService(  660): CameraService started: pid=660
D/dalvikvm(  659): DexOpt: --- BEGIN 'core.jar' (bootstrap=1) ---
E/dalvikvm(  670): ERROR: Bad length: expected 818624000, got 3590960
E/dalvikvm(  670): ERROR: Byte swap + verify failed
E/dalvikvm(  670): Optimization failed
W/dalvikvm(  659): DexOpt: --- END 'core.jar' --- status=0xff00,
process failed
E/dalvikvm(  659): Unable to extract+optimize DEX from '/system/
D/dalvikvm(  659): Failed on '/system/framework/core.jar' (boot=1)
D/dalvikvm(  659): VM cleaning up
D/dalvikvm(  659): LinearAlloc 0x0 used 4100 of 4194304 (0%)
W/dalvikvm(  659): JNI_CreateJavaVM failed
E/AndroidRuntime(  659): JNI_CreateJavaVM failed
D/AndroidRuntime(  672):

Could someone help me figure out the root cause of this error, and a
possible resolution, please?

Best regards,


3. How to modify HTTP PROXY by using Android API?

4. Programmatically Adding a LinearLayout Error

5. Changing standin animation in camera preview

6. savedInstanceState Textview text problem.

7. Custom GridView