How to lighten LED in key driver, when user press any KEY.

by linlone9 » Fri, 13 Mar 2009 01:43:05 GMT

Sponsored Links

In G1 phone, when user press any KEY, the LED that be as backlight of "HOME"
KEY, will be lightened.
I check Android source codes, and want to know how to lighten the LED in key
driver, but, don't find any clue.
I have checked following source codes:

My key question is that where in the codes of key driver, will call LED
driver to control LED on/off.



Other Threads

1. How to get Application Name from the process?

Don't use Process, use the PackageManager to look up the app info.

Dianne Hackborn
Android framework engineer

Note: please don't send private questions to me, as I don't have time to
provide private support, and so won't reply to such e-mails.  All such
questions should be posted on public forums, where I and others can see and
answer them.


2. startActivityForResult from service..

noob here. I'd like to invoke the voice recognition intent from a
The samples implementation uses startActivityForResult.

Specifically, I'd like to convert these two to be invoked from a
I cannot find a way to invoke the equivalent for
startActivityForResult from the service.
Would appreciate any help.

    private void startVoiceRecognitionActivity() {
        Intent intent = new Intent
        intent.putExtra(RecognizerIntent.EXTRA_PROMPT, "Speak your

     * Handle the results from the recognition activity.
    protected void onActivityResult(int requestCode, int resultCode,
Intent data) {
        if (requestCode == VOICE_RECOGNITION_REQUEST_CODE &&
resultCode == RESULT_OK) {
            // Fill the list view with the strings the recognizer
thought it could have heard
            ArrayList<String> matches = data.getStringArrayListExtra(
            mList.setAdapter(new ArrayAdapter<String>(this,

        super.onActivityResult(requestCode, resultCode, data);



3. how to show a webpage on part of the screen

4. process unexpectedly stopped while inserting data in data table

5. "Unable to create media player"

6. HTC Magic for development using the android source code

7. Best way to check if an alarm shall be fired