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

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


Sponsored Links
 hi,

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:
--------------------------------------
kernel/drivers/input/
kernel/drivers/leds/
---------------------------------------

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

Thanks.

--~--~---------~--~----~------------~-------~--~----~



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
hack...@android.com

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..

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

Specifically, I'd like to convert these two to be invoked from a
service.
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
(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
        intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL,
                RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
        intent.putExtra(RecognizerIntent.EXTRA_PROMPT, "Speak your
command!");
        startActivityForResult(intent,
VOICE_RECOGNITION_REQUEST_CODE);
    }

    /**
     * Handle the results from the recognition activity.
     */
    @Override
    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(
                    RecognizerIntent.EXTRA_RESULTS);
            mList.setAdapter(new ArrayAdapter<String>(this,
android.R.layout.simple_list_item_1,
                    matches));
        }

        super.onActivityResult(requestCode, resultCode, data);
    }

thanks,
-sr

--~--~---------~--~----~------------~-------~--~----~

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