Re: [android-developers] Re: provider, thread and async

2012-08-04 Thread Kristopher Micinski
Both global variables *and* polling are a really bad idea and horrible design... you need a callback, potentially through a messenger and handler or something similar, depending on the situation.. On Aug 4, 2012 7:49 AM, "KHEM Sochenda" wrote: > Hello, > > I never use Async task before. I just le

Re: [android-developers] Re: provider, thread and async

2012-08-04 Thread KHEM Sochenda
Hello, I never use Async task before. I just learn about the content provider and Thread in Android. Sorry I am stupid about Async task and Thread. Now I try the global variable. How are you initializing your database? I use the sample code of searchable dictionary which talks about content provi

Re: [android-developers] Re: provider, thread and async

2012-08-03 Thread Justin Anderson
> > You can take a static boolean variable globaly (boolean_var = false). and > when ur database work finish you do it true. > Global variables are generally a bad idea. How are you initializing your database? One thing that I've done before for loading data is use an AsyncTask... Initialize your

Re: [android-developers] Re: provider, thread and async

2012-08-03 Thread KHEM Sochenda
Hi, Thank you. Do you mean a variable globally in the program? maybe in the String? :) I will try tonight. On Fri, Aug 3, 2012 at 4:12 PM, sudam wrote: > > Hi friend, > > You can take a static boolean variable globaly (boolean_var = false). and > when ur database work finish you do it true.

[android-developers] Re: provider, thread and async

2012-08-03 Thread sudam
Hi friend, You can take a static boolean variable globaly (boolean_var = false). and when ur database work finish you do it true. In a different thread check continouslly by while(boolean_var){ dilog.dismiss(); } On Friday, 3 August 2012 08:52:21 UTC+5:30, Petit wrote: > > Hello All, > > I