开发者

Toast in a Thread inside Broadcastreceiver

开发者 https://www.devze.com 2023-03-24 01:37 出处:网络
I am developing an application, which would show user the call details(something more whi开发者_StackOverflowch is shown by default). I have tried with a Toast message. But this message dissapears whe

I am developing an application, which would show user the call details(something more whi开发者_StackOverflowch is shown by default). I have tried with a Toast message. But this message dissapears when phone shows the the call accept/reject options, no matter what duration I provide for the Toast message.

Can I use Thread to show the Toast message ? If so, can anyone please provide me the code.


You cannot use a Thread.. because Toast is Actually shown by UI thread which is run bu the android OS.. Rather You can make use Of AsyncTAsk.. to know how to use AsyncTAsk refer this

0

精彩评论

暂无评论...
验证码 换一张
取 消