I need to create custom Toast
like component. This should appears over only my application to show some message.
Why i don't use android Toast
- because i need custom duration.
Problem is I'm creating view through WindowManager.addView
with type WindowManager.LayoutParams.TYPE_APPLICATION
But it works only over 1 Activity
, when i close it, toast disappears.
But I have a lot of places - where i open an activity to do some task, and after success result i should immediately show toast and close this Activity
.
I need to keep toast over all my activities, but not over android system. And i don't want to use TYPE_SYSTEM_ALERT
because it's require additional permission
Is there some method to sure do that? Use of WindowManager
is not required.