0

I have some Dialog. It shows when my app receipt message and I state in my Activity. I want show this Dialog if app minimized and not show Activity. (It is implemented in WatsApp). If pened somp app on phone, I want show dialog above this app.(It is implemented in WhatsApp too)

It executed when I receipt message and app is opened:

m_orderOfferForm = new NewOrderForm(BaseActivity.Instance, offerOrder);
                    m_orderOfferForm.show();
ip696
  • 6,574
  • 12
  • 65
  • 128

2 Answers2

0

You can achieve this by background service continuously running for you and get the event of receiving or what you want to do. Then create intent for NEW ACTIVITY and in that intent create Dialog.!!!

Njoy. :)

Harsh Patel
  • 1,056
  • 2
  • 10
  • 20
  • note: make activity transparent as described [here](https://stackoverflow.com/questions/2176922/how-to-create-transparent-activity-in-android) and than show dialog – Yazazzello Sep 02 '15 at 06:36
0

This can be achieved using an activity as dialog. Run service in the background and on event trigger call activity from service.

Design of your activity layout should be like this

<Framelayout>
   <Linearlayout
     margin:20dp
     background:translucent image(check for menu.popup.9.png)
     layout_gravity:center>

     <Content>

 </Linearlayout>
</Framelayout>
Isham
  • 424
  • 4
  • 14