Is it possible to call methods of a Activity from service.

by Reghu » Mon, 27 Apr 2009 22:08:36 GMT


Sponsored Links
 Hello,

Is it possible to call methods of a Activity from service.

I am running a thread from a service and i listening to some external
event from that thread.
I am not able to call methods  from that thread. Is there any way to
call methods from a thread.

Thank you

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



Is it possible to call methods of a Activity from service.

by Justin (Google Employee) » Tue, 28 Apr 2009 00:46:59 GMT


 Look into android.os.Handler.

Cheers,
Justin
Android Team @ Google



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


Sponsored Links


Is it possible to call methods of a Activity from service.

by Reghu » Thu, 30 Apr 2009 12:16:16 GMT


 Thank you

i made it ....



On Apr 27, 9:46pm, "Justin (Google Employee)" <j...@google.com>



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



Other Threads

1. ListView and onItemSelected

Hello everyone!

What is wrong with this code? I cannot intercept ListView
onItemSelected (no effect and no log output. Nothing happens!). Advice
appreciated!

        ListView mylist=(ListView)findViewById(android.R.id.list);

        mylist.setOnItemSelectedListener(new OnItemSelectedListener()
        {

            @Override
            public void onItemSelected(AdapterView<?> parent, View v,
int position, long id)
            {
                v.setBackgroundColor(0xFFFF0000);
                Log.d("ListViewItem selected!", "");
            }

            @Override
            public void onNothingSelected(AdapterView<?>  arg0)
            {

            }
           }
        );

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

2. We can't add the resources in framework???

Hi,

i have requirement to implement button in lockscreen.
So i have added new image here *frameworks\base\core\res\res\drawable.*
And i have modified the Keyguard_screen_lock.xml. Here i have added the
ImageButton view.
And i have even modified the strings.xml to display different string.

As in the following discussion it has told like this.

*You must not add public resources because it would change the public
API and thus make your Android phone/device potentially incompatible
with other Android devicesYou must not add public resources because it would
change the public
API and thus make your Android phone/device potentially incompatible
with other Android devices.*
**
*Please find the previous discussion in the bellow link*

(

3. Android on HTC shift

4. 鍥炲: how to make a little ti me stop between two works

5. Task launch event - finishOnTaskLaunch Problem

6. Getting selected data from spinner using getSelectedItem() results in error

7. How to add an icon in the List view?