How to make data independent of activity

by rajaramyadhav » Sat, 17 Jul 2010 02:25:35 GMT


Sponsored Links
 Hi All,

I am new to  Android development. My requirement is something like
this. I have two list activities and a service. I also have to
maintain some data in an two different arraylist which are used by the
activity to display. The data will be populated by the service. Since
adding the new elements to arraylist has to be done by the service,
the data has to be independent of the activity. So I had to put it in
an external class. Now whenever an element is added the activity
should be notified. How can I do this in a clean way? I somehow made
it to work using a static handler for activity and a static adapter .
But I dont think this is a good way to do this.  Can someone suggest
me a better way?

Any sample code snippets would help too..

Thanks in advance for your help.
Raja Ram

--



Other Threads

1. How to create a composer for QCELP

Hi,

Anybody knows how to create such the composer?
I've searched OpenCore source for a sample from  which I can do learn
to create it. But I just found the one for MPEG4. Meanwhile, It looks
like very complicated and I think it has little things relative with
Audio/QCELP. So, any hint for this issue? And does the latest OpenCore
have any composer for AAC or AMRNB(WB) ? Thanks a lot.


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

2. HOW to let PVAuthor support recording QCELP

There's no relevant spec documents indicating where to start to handle
this issue. Should there be a specific composer required? Or just deos
'ADIF/ADTS format' suffice to handle it? I'm sorry I have no sense of
this issue. Could anybody show me hints?

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

3. hardware restriction

4. how to color key 2d sprite backgound?

5. Documentation about SMS Contentprovider?

6. Backlight adjustment on Eee PC

7. task in tab from TabHost