android - Possible to create two instances of NotificationHelper? -
so trying implement using notificationhelper
inform users on progress of download.
public class mapdownload extends asynctask<string, integer, string>{ public mapdownload(arraylist<placedetails> placelist, int travelogueid, context mcontext, string traveloguename){ this.places = placelist; this.zoom = 12; this.tid = travelogueid; mnotificationhelper = new notificationhelper(mcontext, traveloguename); } @override protected void onpreexecute(){ //create notification in statusbar mnotificationhelper.createnotification(); } }
however, wondering if it's possible implement such if launch mapdownload
class download stuff, how can such both running concurrently? seems upon launching of 2nd mapdownload
, 1st 1 disappears, , previous notification replaced 2nd one.
is problem of wrong asynctask
implementation, or wrong way of using notificationhelper
?
i don't know notificationhelper
is, 3rd party library?
however, when creating notification have provide id. if same id reused later, previous notification replaced. see notificationmanger documentation.
maybe happening.
android download android-asynctask android-notifications
No comments:
Post a Comment