My requirement is need to display notification,when upload is available.Each & every time go to new Activity, It check Upload is available.(Upload mean : IF there any changes happened in android db, then it indicate need to upload to actual sql server db).
See my code :
uploadSize = new UploadActivity().getUploadTable();
if(uploadSize > 0){
Button button = (Button) findViewById(R.id.u);
button.setBackgroundColor(Color.RED);
long whenTo = System.currentTimeMillis();
Notification n = new Notification(R.drawable.icon, "", whenTo);
n.tickerText = "TV Spored ++";
String contentTitle = "I am expanded title";
String contentText = "I am expanded text";
Intent intent = new Intent(this, NotificationReceiver.class);
// Put additional stuff into the created intent
PendingIntent contentIntent = PendingIntent.getActivity(this, 1, intent, 1);
n.setLatestEventInfo(this, contentTitle, contentText, contentIntent);
}
From the my code ,
- it didn’t show the on the top of the bar.
- Is there any good solution is available for upload.
Please help me..
Thanks in advance.
Is there any
To show Notification Call this method