java - AlertView that can be shown from background -
i have little problem alert view, idea when app starts, asks on background new data app, after receiving information alertview should shown if there new data. problem comes because alertview shown on main activity launched asynctask, if i'm in other activity, alert appear when come main activity , idea alertview displayed in whatever activity user in.
my first thought context send asynctask problem i've tried using getapplicationcontext() app crashes in moment of creating alertview. i'm, looking way display alertview or equivalent on screen wherever on app, 1 have ideas?
any idea appreciated
you can use broadcastreceiver in every activity contineous monitor background service contineous whenever event occoured using broadcastreceiver display alertbox content received receiver.