here is my way, just a suggestion:)
1. if the activity is not in active, start it and show the unread
messages;
2. if the activity in front, hook the database changes, just show a
message in the activity not the state bar.
3. switch the char window(with deffrient buddy) by popup menu(a
dialog) or system menu or tabset in one activity not many activity

On 4月4日, 下午4时32分, "Semeria Stefano"
<[EMAIL PROTECTED]> wrote:
> Well,
>
> I'll probably need to explain better my use case.
> I am working on a instant messaging application. I would like to support 
> multiple conversation.
> For handling each ongoing conversation I use different instances of the same 
> activity (let's call it ChatActivity). I have a background thread in a 
> service that receives and sends messages.
> Any time a message is received I add a persistent notification in the status 
> bar.
> The user should be able to switch between different conversation by selecting 
> the notification that is bound to that conversation. When he does so, I would 
> like a new activity to be started (if a new conversation takes place) or a 
> background activity is taken into the foreground.
> The problem is that when the notification is clicked I am currently firing an 
> Intent with ACTION_VIEW as an action and a new instance of my chat activity 
> is launched every time (so I am not able to resume old conversations)...
>
> I guess services are not useful to solve my problem...
>
> Have you got any suggestion?
>
> Thanks  a lot
>
> Stefano
>
>
>
> -----Original Message-----
> From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf 
> Of xingye
> Sent: venerdì 4 aprile 2008 10.22
> To: Android Developers
> Subject: [android-developers] Re: Resuming not visible activities using 
> intents
>
> Use service instead of activity:)
>
> On 4月4日, 下午4时16分, "Semeria Stefano"
> <[EMAIL PROTECTED]> wrote:
> > Hi all,
>
> > Is it possible to resume a background activity using an intent?
>
> > When I register a notification in the status bar and clicked on it an
> > Activity is fired, but it's always a new one... I would need a way to
> > reuse one in background already on the stack.
>
> > Please help.
>
> > Thanks a lot.- 隐藏被引用文字 -
>
> - 显示引用的文字 -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
Announcing the new M5 SDK!
http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to