Why would you want to block the UI thread? A better sollution would be to open a ProgressDialog (with the rotating line), and have that setCancelable(false).
On 4 mei, 15:17, Asif k <asifk1...@gmail.com> wrote: > Hi all, > > Is there anyway to block the UI Thread till the .mp3 file completes > (or in general blocking UI thread till perticular action in the b/g > thread completes). I had used following code but not got the expected > result. > > synchronized void playFile() { > .... > mp.start(); > try { > this.wait(); > > } catch(E) {} > > if(mp.isPlaying()==false) { > mp.notify(); > > } > } > > Please help. Thanks in advance. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---