Toast message for more than 4 sec


I want to generate one toast message before power off which is done but my problem is that I want to display it for approximately 5 Sec.
How can I increase the toast display time? I tried with for loop but with this approach one can see flashing of the toast message.

@Avyay check online guides, there are plentiful of documentation:
some involve creating a newer class to increase the duration of the time to the one specified (mostly in millis)

here is one from stackoverflow:


Thank You.
I did use countdowntimer and loop to increase the display time and loop works for me. I just used for loop with toast argument as LENGHT_SHORT.
So, 4 sec is enough for me.

1 Like