1

Generally upon receiving message using Android GCM we call generateNotfication that fires a notification.

I want to know that instead of firing a notification in notification bar, I would like to open an isolated popup window, where user can perform further actions as Viber do.

As for viber, No matter where ever a user is, upon receiving a text message it open a smart popup dialog where you can reply.

Why i call it isolated, because i don't the whole application to launch, just an activity in the form of modal box.

Any help would be highly appreciated.

Thanks

Alyas
  • 620
  • 1
  • 10
  • 22

1 Answers1

3

I think what you can do it, on receiving a message from GCM, launch a transparent activity and from within the activity, you create and show a dialog inside onCreate(). Then when a user presses Cancel button, you can call finish() to close the Activity . See here: How do I create a transparent Activity on Android? . This way to user it would feel that you have just created a dialog and in actual you would be creating a transparent activity.

Community
  • 1
  • 1
Shobhit Puri
  • 25,769
  • 11
  • 95
  • 124