android


How do I display the notification message in android what I get from the server


public class PushReceiver extends BroadcastReceiver {
#Override
public void onReceive(Context context, Intent intent) {
{
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(context);
mBuilder.setContentTitle("Notification Alert");
mBuilder.setContentText("Medicine has not been taken");
mBuilder.setSmallIcon(android.R.drawable.ic_dialog_info);
mBuilder.setDefaults(Notification.DEFAULT_ALL);
mBuilder.setPriority(Notification.PRIORITY_HIGH);
NotificationManager mNotificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
mNotificationManager.notify(1, mBuilder.build());
}
}
This is my code. How do I display the message what I get from the server and not what I type here?
All the data you sent from via push can be retrieved from the intent itself.
check here

Related Links

Activity <Name> has leaked ServiceConnection com.google.android.vending.licensing.LicenseChecker that was originally bound here
How to ensure to stop async task when service is killed
Android navigation: get the distance yet to travel
Fetching ListView Values [closed]
Start a fragmentActivity from activity using intents
Android GCM: Not getting registration token on onCreate() method
coverflow not showing on xml layout in android
Fastest way to search through strings stored in sqlite database
why content uri is not working in this case
Start child activity from listview Button click in android
activity mainactivity is not responding
How can I change the Read/Write Permissions of /mnt/SDcard folder on Kindle Fire?
Obtain the screen height and width
C2DM in Android 4.0
how to resize physical android screen from terminal/shell
Tab bar: on click go to home screen

Categories

HOME
cygwin
xml
adal
string
mjml
angular-formly
yahoo-finance
opendj
rom
hugo
square
settings
data-visualization
opengl-3
reactive-programming
github-enterprise
text-mining
why3
code-generation
magnetic-cards
xmonad
oledb
asp.net-core-webapi
poedit
xunit
froala
inversion-of-control
sqlpackage
powershell-ise
zend-debugger
database-comparison
dsx-desktop
ideascript
apache-stanbol
knime
x++
flask-restful
ntvs
term
robomongo
convex-optimization
lightning
context-switch
appdomain
arules
rocks
cronexpression
custom-lists
parfor
tinkerpop3
udpclient
pre-build-event
qiime
lz77
ascii-art
zscript
uncompress
rrule
gamekit
beatsmusic
iiop
android-vibration
administration
structuremap3
contrast
punycode
notorm
joomla-template
alice
argouml
vfs
xcode3.2
lambdaj
jquery-tools
entitydatasource
uipagecontrol
clrstoredprocedure
django-paypal
codebase
mtu
web-garden
scrollbars
murmurhash
django-piston
web-application-project
application-planning
unmanagedresources

Resources

Encrypt Message