Notification assistance.

by Damien Cooke » Sun, 12 Dec 2010 12:14:13 GMT

Sponsored Links
 Hi All,
I am crossing from iOS to Android development and am after a small amount of 
help with a concept.  In ios I can post notifications that can be listed for by 
other objects.  These are not seen by the user, they are totally internal to 
the application.  Is this type of systemic messaging available or do I need to 
more closely couple my classes?  or even completely rethink my design?

Thanks and sorry for the dumb question


Re: Notification assistance.

by DanH » Sun, 12 Dec 2010 13:03:58 GMT

 In Android the same basic function is accomplished with "intents".


Sponsored Links

Re: Re: Notification assistance.

by Dianne Hackborn » Mon, 13 Dec 2010 00:10:08 GMT


Well.  If this is all just in your app, I would generally just recommend
doing normal direct callbacks.  There isn't a generic "local callback
registry" API in Android, but this is trivial to build yourself -- just make
a class with an ArrayList<Callback> and functions to add and remove
callbacks, and perform a call on all callbacks.  It's 20 lines of code max.
 If you want to make it async, it's a couple more lines of code to have a
Handler that you post a Runnable on to, to do the callbacks.

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.


Re: Notification assistance.

by Phil Endecott » Mon, 13 Dec 2010 03:20:52 GMT

 Hi Damien,

Write your own replacement.  On iOS I use my own simple notification
system, because Apple's version is overcomplicated.  For most cases
it's almost trivial to do; it only gets complicated if you need to
worry about threads, queuing, merging multiple notifications and
things like that.


Other Threads

1. Net monitor

Is there any Library and classes that enables writing a NetMonitor
application for 3G & Wifi like in Symbian phones ..? and seems haven't enogh functions to do

Are Android Kernal developers willing to set such Network
functionalities as Symbian & Windows Mobile have



2. <string-array> resource into a string array

I've searched high and lo for this but I might be missing something
that is staring me in the face, but for the life of me I can't find
it. I just want to read <string-array> resource elements into a String
array. I don't want to make a view or anything and mess with adapters
-  just want to transfer the elements. Is there a built in class for
this? Or do I need to treat the resource file as a regular file?


3. dex failure

4. Port dalvik runtime to Symbian

5. Adding submenus in XML

6. Gears Settings not working, also reset browser to defaults seems to fail?

7. how to add "--core-library" to Eclipse ?