android push server instance to application

I am new to android and I have a small doubt. Like

Is it possible to push a server instance to application ? Can do it with gcm notification. At that time is it possible to do some actions if the application is live / currently using and if doesn't make a notification .

In first case no need to show any notification.

Please advise Thanks

Answers


At that time is it possible to do some actions if the application is live / currently using and if doesn't make a notification .

You can accomplish this using an event bus, where your GCM receiving code publishes the event on the event bus, then detects if nothing picked up that event and displays the Notification.

The following projects demonstrate this basic pattern (though triggered by AlarmManager instead of GCM), using:


Need Your Help

show by printf data encrypted in php with mysqli

php database mysqli printf

I have a problem with php, I am programming a php file for show by printf the data of the data base related encrypted_password. I want to pick the value and display it on screen, but does not work, I

How to remove whitespace from Model attributes?

ruby-on-rails ruby trim spaces strip

What's the simplest way to make sure models trim leading and trailing white space from string values.