Maximize android app from service -


i have application runs background service checks notifications gets server. , when notification arrives (ping notification), opens new notification dialog full screen inflated view. on screen have option accept call, calls device sip voice connection. accept call opens new dialog fragment, has ability automatically answer call, , user has option cancel it. when on main activity window, works fine. in service there view inflated layout added window_manager shows notification , when accept call, dialog fragment call status opens. question have now, possible while application minimized? example, user minimized app, service still running in background, when ping notification gets device, shows new notification dialog, when want accept call , show fragment, not possible because. 1. don't have current screen on show dialog fragment calling 2. if create instance of current activity oncreate, , don't destroy ondestroy, can call startactivity on it, nothing shows up. call establishes, cannot maximize current activity , show dialog fragment on it.

what can in case? should create other notification 1 in service , instead of dialog fragment should showing notification?


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

c# - Retrieve google contact -

javascript - How to insert selected radio button value into table cell -