Re: [android-developers] Notifications and killed app

2013-04-24 Thread Piren
If you have the flow : main -> title detail -> player, you press Home, then
the Launcher icon for you app, it will just go back to your app with
"player" being the displayed activity.
it basically just took you back to where you were. This is because the
intent the Launcher used is the same intent used to start the app in the
first place.

If you add a notification and you want it to open the app like the launcher
does, you'll use the same intent as well. That means that if "player" is
shown, and you press the notification either the app will launch normally
(if it was removed by swipe) or will just bring the app forward like any
launcher intent does (if it was running previously and got backgrounded).

If the intent directs to "player" directly and player isn't singleInstance,
 it will create a new "player" and add it to the stack (so the flow would
be main -> title detail -> player -> player)

Now days it is actually much more complex because of the addition of
TaskStackBuilder (which btw can be used instead of propagating the
inten)... you can read more about it here:
http://developer.android.com/guide/topics/ui/notifiers/notifications.html


On Wed, Apr 24, 2013 at 3:11 PM, Larry Meadors wrote:

> On Wed, Apr 24, 2013 at 6:03 AM, Piren  wrote:
> > It's actually weird to me that it wasn't already like that... If you wish
> > the notification to bring the app forward, the intent should match the
> > launcher intent. the additional bundle flag you add will also make sure
> to
> > start activities if they weren't already there.
>
> Heh, I'm going to have to do some more research to understand what
> you're telling me here - I'm not sure I'm following you completely.
>
> Larry
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Notifications and killed app

2013-04-24 Thread Larry Meadors
On Wed, Apr 24, 2013 at 6:03 AM, Piren  wrote:
> It's actually weird to me that it wasn't already like that... If you wish
> the notification to bring the app forward, the intent should match the
> launcher intent. the additional bundle flag you add will also make sure to
> start activities if they weren't already there.

Heh, I'm going to have to do some more research to understand what
you're telling me here - I'm not sure I'm following you completely.

Larry

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Notifications and killed app

2013-04-24 Thread Piren
Yes.

It's actually weird to me that it wasn't already like that... If you wish
the notification to bring the app forward, the intent should match the
launcher intent. the additional bundle flag you add will also make sure to
start activities if they weren't already there.


On Wed, Apr 24, 2013 at 2:51 PM, Larry Meadors wrote:

> So if the flow is main -> title detail -> player, do you mean the
> MainActivity (by "the first activity")?
>
> Larry
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Notifications and killed app

2013-04-24 Thread Larry Meadors
So if the flow is main -> title detail -> player, do you mean the
MainActivity (by "the first activity")?

Larry

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Notifications and killed app

2013-04-24 Thread Piren
Change the notification intent to point to the first activity and add a 
flag to indicate you want to open the other activities (propagate through 
the activities).


On Wednesday, April 24, 2013 1:16:12 PM UTC+3, Larry Meadors wrote:
>
> On Wed, Apr 24, 2013 at 1:01 AM, Piren > 
> wrote: 
> > The "swipe" thing has a funny way of working when you have a foreground 
> > service... everything in the app gets closed (all activities are gone) 
> > except for that service... that means that if you re-launch the app you 
> need 
> > to figure out the "state" the app was before. 
> > 
> > in you case, display which files are being played and go back to showing 
> the 
> > ui in "playing" mode. 
>
> Yeah, I expected the swipe to really kill everything - so I was 
> surprised that the service survived so persistently (a good thing). 
>
> The UI worked as expected now - the only thing I can think of that 
> would make it better is if it could somehow set up the activity stack 
> when launched from the notification. Right now it goes directly to my 
> MusicPlayerActivity and back exits. If I could get it to go to 
> MusicPlayerActivity with the back stack looking like MainActivity > 
> TitleDetailActivity > MusicPlayerActivity, it would be perfect. 
>
> This'll do for 1.0, however...so close... :) 
>
> Thanks for your help, guys. 
>
> Larry 
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Notifications and killed app

2013-04-24 Thread Larry Meadors
On Wed, Apr 24, 2013 at 1:01 AM, Piren  wrote:
> The "swipe" thing has a funny way of working when you have a foreground
> service... everything in the app gets closed (all activities are gone)
> except for that service... that means that if you re-launch the app you need
> to figure out the "state" the app was before.
>
> in you case, display which files are being played and go back to showing the
> ui in "playing" mode.

Yeah, I expected the swipe to really kill everything - so I was
surprised that the service survived so persistently (a good thing).

The UI worked as expected now - the only thing I can think of that
would make it better is if it could somehow set up the activity stack
when launched from the notification. Right now it goes directly to my
MusicPlayerActivity and back exits. If I could get it to go to
MusicPlayerActivity with the back stack looking like MainActivity >
TitleDetailActivity > MusicPlayerActivity, it would be perfect.

This'll do for 1.0, however...so close... :)

Thanks for your help, guys.

Larry

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Notifications and killed app

2013-04-24 Thread Larry Meadors
On Wed, Apr 24, 2013 at 12:58 AM, Piren  wrote:
> Were you talking about the notification of the service? because that can
> obviously cannot be removed while the service is running.. it's whole point
> is to show you have a foreground service.

I was trying to remove the notification from the service after
stopping the service.

So I was calling service.stopSelf() then
notificationManager.cancelAll() in that order.

That doesn't work, I had to call service.stopForeground(true). That worked.

Larry

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Notifications and killed app

2013-04-24 Thread Piren
The "swipe" thing has a funny way of working when you have a foreground 
service... everything in the app gets closed (all activities are gone) 
except for that service... that means that if you re-launch the app you 
need to figure out the "state" the app was before.

in you case, display which files are being played and go back to showing 
the ui in "playing" mode. 

regarding the notification, see my other response.

On Tuesday, April 23, 2013 7:47:32 PM UTC+3, Larry Meadors wrote:
>
> BTW, there is a foreground service here, and that service lives on. 
>
> That's what I can't quite get my head around. The service is still 
> running and our activity starts and binds to it. 
>
> But when we call "notificationManager.cancelAll();" from the service, 
> it doesn't cancel the previously created notification. :-/ 
>
> Larry 
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Notifications and killed app

2013-04-23 Thread Piren
Were you talking about the notification of the service? because that can 
obviously cannot be removed while the service is running.. it's whole point 
is to show you have a foreground service.

On Wednesday, April 24, 2013 1:14:43 AM UTC+3, Larry Meadors wrote:
>
> OK, there was a foreground service involved. I added a call to 
> stopForeground(true) in my app when the service stops, and that seems 
> to make it behave better. 
>
> Larry 
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Notifications and killed app

2013-04-23 Thread Larry Meadors
OK, there was a foreground service involved. I added a call to
stopForeground(true) in my app when the service stops, and that seems
to make it behave better.

Larry

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Notifications and killed app

2013-04-23 Thread Larry Meadors
More interesting - if I touch the notification after killing(?) it's
owner, it still works in the sense that the activity starts and binds
back to the service that created the notification. The activity can
still control the service (it's a media player service).

However, when the activity stops the service that it binds to, the
service calls notificationManager.cancelAll(); but the notification is
still present.

/me goes to google more...

Larry

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Notifications and killed app

2013-04-23 Thread Larry Meadors
BTW, there is a foreground service here, and that service lives on.

That's what I can't quite get my head around. The service is still
running and our activity starts and binds to it.

But when we call "notificationManager.cancelAll();" from the service,
it doesn't cancel the previously created notification. :-/

Larry

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Notifications and killed app

2013-04-23 Thread Larry Meadors
On Tue, Apr 23, 2013 at 9:10 AM, Piren  wrote:
> I had the same notification issue, but i can't remember how i resolved it.. 
> heh

Now you're just teasing me. :-P

Larry

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Notifications and killed app

2013-04-23 Thread Piren
actually it does "kill" the process... as long as there's no foreground 
service (and that's debatable on the newer versions of JB). If you enter 
the app after your swipe, you'll see it is starting clean.

I had the same notification issue, but i can't remember how i resolved it.. 
heh

On Tuesday, April 23, 2013 5:28:26 PM UTC+3, Kristopher Micinski wrote:
>
> "Swiping it away" doesn't really mean killing the app, iirc.  The app 
> lives on within Android, it's just not displayed within your task 
> manager window.  (Meaning, it's not a process kill, at least for the 
> ones I've seen..) 
>
> Kris 
>
>
> On Tue, Apr 23, 2013 at 10:07 AM, Larry Meadors 
> > 
> wrote: 
> > I have an app where I create a notification that when touched jumps to a 
> > specific activity. 
> > 
> > It works reasonably well, but if I go through the steps to create the 
> > notification, then kill the app using the "recent apps" button and 
> swiping 
> > it out, the notification stays, and never goes away. 
> > 
> > Surely there is a way to clear the notification when the app is killed, 
> but 
> > I can't seem to figure it out. 
> > 
> > Any suggestions? 
> > 
> > Larry 
> > 
> > 
> > -- 
> > -- 
> > You received this message because you are subscribed to the Google 
> > Groups "Android Developers" group. 
> > To post to this group, send email to 
> > android-d...@googlegroups.com 
> > To unsubscribe from this group, send email to 
> > android-developers+unsubscr...@googlegroups.com  
> > For more options, visit this group at 
> > http://groups.google.com/group/android-developers?hl=en 
> > --- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "Android Developers" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to android-developers+unsubscr...@googlegroups.com . 
> > For more options, visit https://groups.google.com/groups/opt_out. 
> > 
> > 
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Notifications and killed app

2013-04-23 Thread Kristopher Micinski
"Swiping it away" doesn't really mean killing the app, iirc.  The app
lives on within Android, it's just not displayed within your task
manager window.  (Meaning, it's not a process kill, at least for the
ones I've seen..)

Kris


On Tue, Apr 23, 2013 at 10:07 AM, Larry Meadors  wrote:
> I have an app where I create a notification that when touched jumps to a
> specific activity.
>
> It works reasonably well, but if I go through the steps to create the
> notification, then kill the app using the "recent apps" button and swiping
> it out, the notification stays, and never goes away.
>
> Surely there is a way to clear the notification when the app is killed, but
> I can't seem to figure it out.
>
> Any suggestions?
>
> Larry
>
>
> --
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to android-developers@googlegroups.com
> To unsubscribe from this group, send email to
> android-developers+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Android Developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to android-developers+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




[android-developers] Notifications and killed app

2013-04-23 Thread Larry Meadors
I have an app where I create a notification that when touched jumps to a
specific activity.

It works reasonably well, but if I go through the steps to create the
notification, then kill the app using the "recent apps" button and swiping
it out, the notification stays, and never goes away.

Surely there is a way to clear the notification when the app is killed, but
I can't seem to figure it out.

Any suggestions?

Larry

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Android Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to android-developers+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [android-developers] Notifications on 4.1 Jelly Bean: how to check they are enabled?

2012-07-26 Thread Mark Murphy
On Wed, Jul 25, 2012 at 6:18 AM, Guillaume Perrot  wrote:
> I need to check in my application if the user disabled system notifications
> for my application.
> I can't find any information in the documentation about that.

AFAIK, there is no way for an app to find out if its notifications
have been blocked.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to Android Development_ Version 3.8 Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Notifications on 4.1 Jelly Bean: how to check they are enabled?

2012-07-25 Thread Guillaume Perrot
Hi,
I need to check in my application if the user disabled system notifications 
for my application.
I can't find any information in the documentation about that.
Regards,

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Re: [android-developers] Notifications in Notification Manager without icon in status bar

2012-03-27 Thread Mark Murphy
On Tue, Mar 27, 2012 at 9:58 AM, B.Arunkumar
 wrote:
> Is it possible to add Notifications to the Notification Manager
> without showing an icon in the status bar?

AFAIK, no.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Warescription: Three Android Books, Plus Updates, One Low Price!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Notifications in Notification Manager without icon in status bar

2012-03-27 Thread B.Arunkumar
Hi,

Is it possible to add Notifications to the Notification Manager
without showing an icon in the status bar?

Only this works:

Notification note = new Notification(R.drawable.appicon, title,
System.currentTimeMillis());

This does not work:-

Notification note = new Notification();

Thank you,
B.Arunkumar

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Notifications when App in background!

2012-03-25 Thread Mark Murphy
On Fri, Mar 23, 2012 at 7:31 PM, PinkFluffyBunny  wrote:
> I have implemented push notification for my Application using c2dm,but
> when I send a notification to the application, I need to open the app
> to see the notification alert dialog box.

Standard Android notifications are not dialogs.

> If an push notification is sent when the application is closed or
> minimized (running in background) then the notification alert will not
> pop up till we open the application window.
>
> I want the notification to pop up even when the app is running in the
> background or is stopped. It can pop the alert as a banner at the top
> that stays for sometime and goes away or it can be a alert dialog box
> that needs to be dismissed.

Please don't attack your users that way, unless they opt into it. Many
of your users will not appreciate being forcibly interrupted in the
middle of their game, their book, their movie, etc. Please allow an
option for using standard Android notifications, which the vast
majority of your users will be used to.

> Are there any parameters specific in the payload or header that need
> to be specified to achieve this?

No. Your problem has nothing to do with C2DM data. It has everything
to do with what you are doing when the C2DM broadcast arrives and what
you are then doing.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

_The Busy Coder's Guide to *Advanced* Android Development_ Version 2.5
Available!

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Notifications when App in background!

2012-03-25 Thread PinkFluffyBunny
Hi friends,

I have implemented push notification for my Application using c2dm,but
when I send a notification to the application, I need to open the app
to see the notification alert dialog box.
If an push notification is sent when the application is closed or
minimized (running in background) then the notification alert will not
pop up till we open the application window.

I want the notification to pop up even when the app is running in the
background or is stopped. It can pop the alert as a banner at the top
that stays for sometime and goes away or it can be a alert dialog box
that needs to be dismissed.

Are there any parameters specific in the payload or header that need
to be specified to achieve this?

How to acheive this ??? Please help!

Thanks!

--
Thanks ,
Vani

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] notifications of getting e-mail from third party server.(as zimbra)

2011-08-17 Thread shailendra pathak
please suggest me how can i make the application of getting
notification on my smart phone when i get a mail from third party
server (as ZIMBRA)
-- 
sp

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


Re: [android-developers] Notifications from Service

2011-03-17 Thread Mark Murphy
On Thu, Mar 17, 2011 at 9:00 AM, dashman  wrote:
> I'm creating a notification from a service to notify the main activity
> that a job is done.

Notifications notify the user, not an activity.

> The problem is when the user taps on the notification, it seems to
> create a new instance of the activity.

It will, by default. Calls to startActivity() create a new instance of
the activity, unless you take steps to the contrary.

> If i press BACK back, there's now 2.
>
> Is a way to instruction the notification object, to notify the
> existing
> activity.

Add FLAG_REORDER_TO_FRONT to your Intent that you put in the
PendingIntent that you put in the Notification that you put in the
status bar.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in London: http://bit.ly/smand1, http://bit.ly/smand2

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Notifications from Service

2011-03-17 Thread dashman
I'm creating a notification from a service to notify the main activity
that a job is done.

The problem is when the user taps on the notification, it seems to
create a new instance of the activity.

If i press BACK back, there's now 2.

Is a way to instruction the notification object, to notify the
existing
activity.

here's my code straight from the SDK reference.

int icon = R.drawable.wx2;// icon from resources
CharSequence tickerText = "Hello";  // ticker-text
long when = System.currentTimeMillis(); // notification 
time
Context context = getApplicationContext();  // application
Context
CharSequence contentTitle = "My notification";  // expanded 
message
title
CharSequence contentText = "Hello World!";  // expanded 
message
text

Intent notificationIntent = new Intent(this,
StartupActivity.class);  // << my main activity
PendingIntent contentIntent = PendingIntent.getActivity(this, 0,
notificationIntent, 0);

// the next two lines initialize the Notification, using the
configurations above
Notification notification = new Notification(icon, tickerText,
when);
notification.setLatestEventInfo(context, contentTitle, 
contentText,
contentIntent);

NotificationManager mNotificationManager = (NotificationManager)
getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.notify(1, notification);

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en


[android-developers] Notifications

2009-09-30 Thread fritzZz

I've written an activity that call a number that automatically send a
sms with some informations. So I've created a BroadcastReceiver that
handle SMS received from a specified originating address. This works
fine...
but i want to :

1. Disable notifications sound when I'm waiting for receiving this sms
(just 1 or 2 seconds)
2. Disable notifications of SMS default app and ChompSMS that handle
incoming SMS.

It's that possible?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] notifications cancelled by another notification

2009-01-24 Thread Frederic Gobry

Hi,

I try to send additional notifications for certain SMS messages based
on various critera. My goal is to have insistent ringing and vibrating
for "important" messages. I don't want to force users to disable their
usual notification SMS notification, so both happen when such an
important message arrives. My own notification happens first, for some
reason. It has the FLAG_INSISTENT set, and uses a ringtone that is set
up to loop. However, when the default notification happens immediately
after, the first notification is cancelled, defeating the
FLAG_INSISTENT and looping ringtone settings (if I disable the default
notification, mine loops just fine)

Is there a clean way to ensure that my notification is actually
insistent, or do I need to play with timers or alarms to reenable it
manually every now and then?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Notifications from a service, forced Intent.FLAG_ACTIVITY_NEW_TASK problem

2009-01-11 Thread Torgny

I am trying to create a notification in a service to notify the user
that the application's data has updated in the background. I want the
application to resume when they click the notification. When I click
the notification I get this message in DDMS:

01-11 16:16:10.574: WARN/ActivityManager(56): startActivity called
from non-Activity context; forcing Intent.FLAG_ACTIVITY_NEW_TASK for:
Intent { comp={com.example/com.example.view.ExampleActivity} }

This forces the activity to start even if it is already paused or
stopped, so it never resumes, it just creates a new instance of it,
overlapping everything, including service connections. If the
application is already running, another copy of it starts on top of
it. How do I make Android just resume the activity?

Thankful for any help!

Warm Regards,
Torgny
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Notifications

2008-11-10 Thread Christine

I use a notification to relaunch or go back to the app from an icon in
the status bar. Works fine. What I can't find is how to get the info
in the Notification back. There's a PendingIntent that contains an
Intent, I'd like to get that Intent back in order to decide what the
app is supposed to do. Right now I have a workaround, I'd like to know
how to do this properly.


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---



[android-developers] Notifications from file system

2008-09-17 Thread indra

Hi,

Is there any way out by which we can get the change/modify
notifications on file system.
I want to get notifications from SD CARD, like we do on the databases
applying ContentObservers.
Pls help.

Thanks and Regards,
Indra

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
[EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~--~~~~--~~--~--~---