What Clean Master app does is that it put a widget on home screen and when user tap it , it cleans RAM and show an animation like this on homescreen(on top of homescreen) -
and i also want to do this ....
What i have done till now is that i have created a widget on homescreen and when user taps i received it inside an AppWidgetProvider class . shown here
I also think it shows this animation by using this feature - WindowManager.LayoutParams.TYPE_SYSTEM_ALERT , like what messenger did by overlaying chatheads on top of screen. This can be done like this - here.
But i am still confused on what would be the best approach for doing this.
Any help would be appreciated ! Thanks in advance.