In-App Notifications Android

546 Views Asked by At

How are In-App Notifications in Android eg. Localytics or CleverTap implemented that displays a pop-up inside the App irrespective of which activity is currently in foreground.

Where should I start looking for implementing one or are there any standard ways.

PS. My main concern is the how do I display the view once i have content which I get from Api server.

Thank You in advance.

1

There are 1 best solutions below

0
On

PS. My main concern is the how do I display the view once i have content which I get from Api server.

After getting data just simply call an Activity. And inside onCreate() of that activity put,

final Window win= getWindow();
    win.addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED | WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);
    win.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON | WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);

This will make your activity like popup view