java - Android, killing an Activity from another Activity from GCM message -


i've wrote app receives gcm message , stores in database creates alertdialog show above app new message is, problem have if new message received before current alertdialog closed don't see new message, if sit , close each message fine.

so think ive been trying ask 'is alertdialog showing...if not show message, if showing close , open new 1 new message'.

does sound feasible?

cheers mark

i recommend using notification rather alert dialog showing incoming messages. notificationmanager lets set id , tag when post notification. if later post 1 same id , tag, existing 1 updated.

on lollipop (and newer) devices can similar effect describe notification coming on top of current app using heads notifications: http://developer.android.com/guide/topics/ui/notifiers/notifications.html#heads-up


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -