Toast created in an IntentService never goes away

后端 未结 6 593
北海茫月
北海茫月 2020-11-28 10:53

I have an IntentService that downloads some files. The problem is that I create a Toast inside the IntentService like this

Toast.makeText(getApplicationCont         


        
6条回答
  •  悲&欢浪女
    2020-11-28 11:50

    For people developing in Xamarin studio, this is how its done there:

    Handler handler = new Handler ();
    handler.Post (() => {
        Toast.MakeText (_Context, "Your text here.", ToastLength.Short).Show ();
    });
    

提交回复
热议问题