[android-porting] How to use the key event to emulate the acceleration sensor to let the screen change orientation.

2010-01-06 Thread rjy...@gmail.com
Hi My hardward has not a acceleration sensor, But I need test screen change orientation function. So I need emulate this function use the key. How can I do. I seach a lot of infomation from internet, Some proposal is send the KEY_ROTATE(Key code is 99) to /dev/input/event0, But no effect. Tha

[android-porting] Re: ALSA sound: Unable to attach mixer

2009-04-16 Thread rjy...@gmail.com
This issue's reason is the /dev/snd/* device nodes permission. Android access the audio device by the audio group. So change the /dev/snd/* nodes as audio group. Can add some lines to init.rc to fixed it: # workaround to resolve current permission issue chmod 0666 /dev/binder chmod 0666 /

[android-porting] How to create two TextView without write the XML file?

2009-05-01 Thread rjy...@gmail.com
Hi I will create twi TextView in the main layout, but only last TextView can be showed. My codes: package myapp.helloworld; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; import android.graphics.Color; public class helloworld extends Activity { /*