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. How to block unwanted call's and SMS's


I need help, i want to develop application that can block unwanted call's
and sms's
can any one help me regarding this.

Thanks in Advance,



2. Why do we need static compilation for android???

 I was working on Freescale iMX31 board, I ported android  and it was
working fine , but when it came to integration of WiFi & Bluetooth, android
forum recommended me to do static compilation for porting over android !

 Can I know why some drivers have to be statically compiled before it is
ported over android?
 It was not the case with other drivers which when integrated with android,
they worked perfectly well like serial port, usb etc..

Any info on this would be appreciated.

Best Regards,
Rajesh N

Best Regards,
Rajesh N


3. AYMSG, Building YM for Android Error 1

4. How to use buttons in Graphics?

5. What is a Panel?

6. Mapview with multiple markers

7. Android Vs J2ME