android - how to cache remote view? -
i need know if possible cache layout remote view ?
if how can cache or clean cache there example here tried google could't find example how cache layout remote view
for example how cache notification progress !
thank time
updatetask = this; //setup notification id , information random r = new random(); notification_id = r.nextint(80-65) + 1; notification_id++; int icon = r.drawable.icon; long when = system.currenttimemillis(); notification = new notification(icon, getstring(r.string.app_name), when); contentview = new remoteviews(getpackagename(), r.layout.custom_notification); contentview.settextviewtext(r.id.text, "cool"+notification_id); notification.contentview = contentview; notification.flags |= notification.flag_no_clear; notification.flags |= notification.flag_ongoing_event; intent notificationintent = new intent(); notificationintent.setflags(intent.flag_activity_new_task | intent.flag_activity_clear_top); notificationintent.setaction(intent.action_main); pendingintent contentintent = pendingintent.getactivity(babupmain.this, 0, notificationintent, 0); notification.contentintent = contentintent; mnotificationmanager.notify(notification_id, notification);
Comments
Post a Comment