android


Handling notifications in android


I would like to know what is best practice when operating with push notifications in particular GCM notifications. Where should I ignore the notification from the server side. That is to say the server only send notifications to active users or the client side where the server sends out notifications but the app ignores them based on whether the activity is open or closed.
It's always better to decide at the server side which devices have active users, and only send notifications to them.
The reasons:
You don't want to run any code in the client side if you are not going to do anything with the incoming GCM message, since that would just be a waste or battery life.
It's better to reduce the number of messages your server sends to GCM server, since this way, the devices that should recieve and display the notifications will recieve them faster.

Related Links

How do I detect when a specific item reaches top of a RecyclerView in Android?
TCP Comunication between a WiFi Module and Android App
How to receive email from system, using Intent Filter?
Android withText option does not work for action bar buttons on Huawei MediaPad (T1-A21L)
RESTful Spring for Android POST request
Where are the APIs ? [Galaxy S7] [closed]
Detecting beacons more efficiency
Android - Google analytics INSTALL_REFERRER not firing
A simple way to distinguish between a fast and a slow android device [closed]
Android and windows application communication
Phonegap app playing mp3 using Media plugin does not work
Pre fetching Images using Glide in android
Alpha testing in Google play and Authentication problems
Universal Image Loader: Get Original height and width onClick
Toolbar and DialogFragment in android
Ionic CLI error while adding plugin

Categories

HOME
embedded
cobalt
string
fpga
ecmascript-6
angular2-material
toolbox
themes
jwplayer
seo
static-site
dojo
emscripten
crystal-reports-2013
gluon-mobile
webix
spin
categorical-data
startup
nancy
intercom
alpacajs
feathersjs
symfony-console
sse
asciidoctor-pdf
springfox
systemtime
postscript
inno-download-plugin
hta
highstock
pic32
kudu
zend-debugger
kodi
login-script
classcastexception
modalviewcontroller
pdw-file-browser
latitude-longitude
odroid
hackintosh
mcustomscrollbar
dcmtk
branching-and-merging
wc
vaadin-charts
dtsearch
convex-optimization
gets
cubism.js
google-cloud-console
tinkerpop3
deep
turbo-prolog
findfirst
branch-and-bound
git-ftp
mraid
bufferedinputstream
xmltype
mmwormhole
pseudo-class
sip-server
sonarqube-5.0
with-statement
angular-carousel
jjaql
dsym
route-provider
sentestingkit
qtconcurrent
adobe-media-server
inkcanvas
multiplexing
entity-attribute-value
google-floodlight
lr
mbeans
silent
globals
interprocess
purepdf
sqlobject
firefox-3
lemmatization
pbcopy

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App