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. RTSP streaming - how to do redirects

Hi, Android developers!

I've recently tried to make some kind of load balancer for RTSP
It worked with Quicktime player, however didn't work with android

My load balancer is quite simple - when it receives something like

OPTIONS rtsp://ip.ip.ip.ip/vod/path/file.mp4 RTSP/1.0
CSeq: 0
User-Agent: PVPlayer CORE/6.506.4.1 OpenCORE/2.02 (Linux;Android 2.2)
ClientChallenge: 9e26d33f2984236010ef6253fb1887f7
PlayerStarttime: [28/03/2003:22:50:23 00:00]
CompanyID: KnKV4M4I/B2FjJ1TToLycw==
GUID: 00000000-0000-0000-0000-000000000000

DESCRIBE rtsp://ip.ip.ip.ip/vod/path/file.mp4 RTSP/1.0
CSeq: 1
User-Agent: PVPlayer CORE/6.506.4.1 OpenCORE/2.02 (Linux;Android 2.2)
Accept: application/sdp

And my program responds:

RTSP/1.0 302 Found
Server: QTSS/5.5.5 (Build/489.16; Platform/MacOSX; Release/Darwin;
state/beta; )
Cseq: 1
Connection: Close
Location: rtsp://ip2.ip2.ip2.ip2:1915/vod/path/file2.mp4

However, that works with Quicktime and does not work with Android.
Can you suggest me the right way to do redirects?
Thank you!


2. Mount sdcard USB Storage through adb.

I can't seem to find a command that will allow me to mount/unmount the
sdcard from the adb prompt.

emulator, so I am trying with a Nexus One.

I would like to simulate the card being mounted or unmounted while my
Activity is active. I can't do this on the Nexus One through the
notification menu, because this will pause and then resume and
activity, during which time storage card broadcast notifications are
not sent.

I know other devices can and do mount the storage without leaving an
Activity, in particular because they will automount the storage
whenever the USB is plugged in (according to users, even if you tell
it not to). For that reason, this is a case I want to test.



3. GeoCode

4. Android-Froyo port for OMAP-L138 HawkBoard

5. android filesystem

6. Implement seek bar for playing videos

7. Debugging system_process