Search Results

Search found 1226 results on 50 pages for 'asynchronous'.

Page 17/50 | < Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >

  • Performing non-blocking requests? - Django

    - by RadiantHex
    Hi folks, I have been playing with other frameworks, such as NodeJS, lately. I love the possibility to return a response, and still being able to do further operations. e.g. def view(request): do_something() return HttpResponse() do_more_stuff() #not possible!!! Maybe Django already offers a way to perform operations after returning a request, if that is the case that would be great. Help would be very much appreciated! =D

    Read the article

  • How to asynchronously read to std::string using Boost::asio?

    - by SpyBot
    Hello. I'm learning Boost::asio and all that async stuff. How can I asynchronously read to variable user_ of type std::string? Boost::asio::buffer(user_) works only with async_write(), but not with async_read(). It works with vector, so what is the reason for it not to work with string? Is there another way to do that besides declaring char user_[max_len] and using Boost::asio::buffer(user_, max_len)? Also, what's the point of inheriting from boost::enable_shared_from_this<Connection> and using shared_from_this() instead of this in async_read() and async_write()? I've seen that a lot in the examples. Here is a part of my code: class Connection { public: Connection(tcp::acceptor &acceptor) : acceptor_(acceptor), socket_(acceptor.get_io_service(), tcp::v4()) { } void start() { acceptor_.get_io_service().post( boost::bind(&Connection::start_accept, this)); } private: void start_accept() { acceptor_.async_accept(socket_, boost::bind(&Connection::handle_accept, this, placeholders::error)); } void handle_accept(const boost::system::error_code& err) { if (err) { disconnect(); } else { async_read(socket_, boost::asio::buffer(user_), boost::bind(&Connection::handle_user_read, this, placeholders::error, placeholders::bytes_transferred)); } } void handle_user_read(const boost::system::error_code& err, std::size_t bytes_transferred) { if ( err or (bytes_transferred != sizeof(user_)) ) { disconnect(); } else { ... } } ... void disconnect() { socket_.shutdown(tcp::socket::shutdown_both); socket_.close(); socket_.open(tcp::v4()); start_accept(); } tcp::acceptor &acceptor_; tcp::socket socket_; std::string user_; std::string pass_; ... };

    Read the article

  • jQuery: 'async: false' Not Working With IE7 / IE6

    - by Norbert
    I created a simple tracking script which adds the users info to a database when the page is unloaded. It works on all browsers except IE7 and IE6. IE7 gives me errors, but I can't open the "debugger" because I'm using the standalone version (or at least that's what I think the problems is). I removed the async: false, from the script below and I didn't get any errors, but I need async set to false in order for the script to work. Any ideas? $(window).unload(function() { $.ajax({ type: "POST", async: false, url: "add.php", data: "ip=" + jIp + "&date=" + jDate + "&time=" + jTime, }); }); Update: I got IE7 to display the error, kinda. When I click OK on the dialog on top, it closes both dialogs. Ugh!

    Read the article

  • Threading.Timer invokes asynchronously many methods

    - by Dimitar
    Hi guys! Please help! I call a threading.timer from global.asax which invokes many methods each of which gets data from different services and writes it to files. My question is how do i make the methods to be invoked on a regular basis let's say 5 mins? What i do is: in Global.asax I declare a timer protected void Application_Start() { TimerCallback timerDelegate = new TimerCallback(myMainMethod); Timer mytimer = new Timer(timerDelegate, null, 0, 300000); Application.Add("timer", mytimer); } the declaration of myMainMethod looks like this: public static void myMainMethod(object obj) { MyDelegateType d1 = new MyDelegateType(getandwriteServiceData1); d1.BeginInvoke(null, null); MyDelegateType d2 = new MyDelegateType(getandwriteServiceData2); d2.BeginInvoke(null, null); } this approach works fine but it invokes myMainMethod every 5 mins. What I need is the method to be invoked 5 mins after all the data is retreaved and written to files on the server. How do I do that?

    Read the article

  • How to handle multiple responses from single web service call in Flex?

    - by Karan
    I have a requirement where a web service call should be fired from the flex side and this web service is an async web service which would return more than one response. In current Flex environment that I have worked in , when we call a webservice - we get a single response corresponding to that web service, but how take make a webservice call which should keep listening to multiple responses ??

    Read the article

  • Creating futures using Apple's GCD

    - by jer
    I'm working on a library which implements the actor model on top of Grand Central Dispatch (specifically the C level API libdispatch). Basically a brief overview of my system is as such: Communication happens between actors using messages Multicast communication only (one actor to many actors) Senders and receivers are decoupled from one another using a blackboard where messages are pushed to. Messages are sent in the default queue asynchronously using dispatch_group_async() once a message gets pushed onto the blackboard. I'm trying to implement futures in the language right now, so I've created a new type which holds some information: A group of its own The value being 'returned' However, I have a problem since dispatch_block_t is of type void (^)(void) so it doesn't return anything. So my idea of in my future_new() function of setting up another group which can be used to execute a block returning a result, which I can store in my "value" member in my future_t structure, isn't going to work. The rest of the futures implementation is very clear, except it all depends on being able to get the value into the future back from the actor, acting on the message. When using the library, it would greatly reduce its usefulness if I had to ask users (and myself) to be aware when futures were going to be used by other parts of the system—It just isn't practical. I'm wondering if anyone can think of a way around this?

    Read the article

  • Async call Objective C iphone

    - by Sam
    Hi guys, I'm trying to get data from a website- xml. Everything works fine. But the UIButton remains pressed until the xml data is returned and thus if theres a problem with the internet service, it cant be corrected and the app is virtually unusable. here are the calls: { AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate]; if(!appDelegate.XMLdataArray.count > 0){ [UIApplication sharedApplication].networkActivityIndicatorVisible = YES; [appDelegate GetApps]; //function that retrieves data from Website and puts into the array - XMLdataArray. } XMLViewController *controller = [[XMLViewController alloc] initWithNibName:@"MedGearsApps" bundle:nil]; [self.navigationController pushViewController:controller animated:YES]; [controller release]; } It works fine, but how can I make the view buttons functional with getting stuck. In other words, I just want the UIButton and other UIButtons to be functional whiles the thing works in the background. I heard about performSelectorInMainThread but i cant put it to practice correctly any help is appreciated :)

    Read the article

  • C# async callback on disposed form

    - by Rodney Burton
    Quick question: One of my forms in my winform app (c#) makes an async call to a WCF service to get some data. If the form happens to close before the callback happens, it crashes with an error about accessing a disposed object. What's the correct way to check/handle this situation? The error happens on the Invoke call to the method to update my form, but I can't drill down to the inner exception because it says the code has been optimized. The Code: public void RequestUserPhoto(int userID) { WCF.Service.BeginGetUserPhoto(userID, new AsyncCallback(GetUserPhotoCB), userID); } public void GetUserPhotoCB(IAsyncResult result) { var photo = WCF.Service.EndGetUserPhoto(result); int userID = (int)result.AsyncState; UpdateUserPhoto(userID, photo); } public delegate void UpdateUserPhotoDelegate(int userID, Binary photo); public void UpdateUserPhoto(int userID, Binary photo) { if (InvokeRequired) { var d = new UpdateUserPhotoDelegate(UpdateUserPhoto); Invoke(d, new object[] { userID, photo }); } else { if (photo != null) { var ms = new MemoryStream(photo.ToArray()); var bmp = new System.Drawing.Bitmap(ms); if (userID == theForm.AuthUserID) { pbMyPhoto.BackgroundImage = bmp; } else { pbPhoto.BackgroundImage = bmp; } } } }

    Read the article

  • Non-blocking MySQL updates with java?

    - by justkevin
    For a multiplayer game I'm working on I'd like to record events to the mysql database without blocking the game update thread so that if the database is busy or a table is locked the game doesn't stop running while it waits for a write. What's the best way to accomplish this? I'm using c3p0 to manage the database connection pool. My best idea so far is to add query update strings to a synchronized list with an independent thread checking the list every 100ms and executing the queries it finds there.

    Read the article

  • ASP.NET AJAX weirdness

    - by LoveMeSomeCode
    Ok, I thought I understood these topics well, but I guess not, so hopefully someone here can clear this up. Page.IsAsync seems to be broken. It always returns false. But ScriptManager.IsInAsyncPostBack seems to work, sort of. It returns true during the round trip for controls inside UpdatePanels. This is good; I can tell if it's a partial postback or a regular one. ScriptManager.IsInAsyncPostBack returns false however for async Page Methods. Why is this? It's not a regular postback, I'm just calling a public static method on the page. It causes a problem because I also realized that if you have a control with AutoPostBack = false, it won't trigger a postback on it's own, but if it has an event handler on the page, that event handler code WILL run on the next postback, regardless of how the postback occurred, IF the value has changed. i.e. if I tweak a dropdown and then hit a button, that dropdown's handler code will fire. This is ok, except that it will also happen during Page Method calls, and I have no way to know the difference. Any thoughts?

    Read the article

  • Create multiple TCP Connections in C# then wait for data

    - by Ryan French
    Hi Everyone, I am currently creating a Windows Service that will create TCP connections to multiple machines (same socket on all machines) and then listen for 'events' from those machines. I am attempting to write the code to create a connection and then spawn a thread that listens to the connection waiting for packets from the machine, then decode the packets that come through, and call a function depending on the payload of the packet. The problem is I'm not entirely sure how to do that in C#. Does anyone have any helpful suggestions or links that might help me do this? Thanks in advance for any help!

    Read the article

  • ReadFile doesn't work asynchronously on Win7 and Win2k8

    - by f0b0s
    According to MSDN ReadFile can read data 2 different ways: synchronously and asynchronously. I need the second one. The folowing code demonstrates usage with OVERLAPPED struct: #include <windows.h> #include <stdio.h> #include <time.h> void Read() { HANDLE hFile = CreateFileA("c:\\1.avi", GENERIC_READ, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL); if ( hFile == INVALID_HANDLE_VALUE ) { printf("Failed to open the file\n"); return; } int dataSize = 256 * 1024 * 1024; char* data = (char*)malloc(dataSize); memset(data, 0xFF, dataSize); OVERLAPPED overlapped; memset(&overlapped, 0, sizeof(overlapped)); printf("reading: %d\n", time(NULL)); BOOL result = ReadFile(hFile, data, dataSize, NULL, &overlapped); printf("sent: %d\n", time(NULL)); DWORD bytesRead; result = GetOverlappedResult(hFile, &overlapped, &bytesRead, TRUE); // wait until completion - returns immediately printf("done: %d\n", time(NULL)); CloseHandle(hFile); } int main() { Read(); } On Windows XP output is: reading: 1296651896 sent: 1296651896 done: 1296651899 It means that ReadFile didn't block and returned imediatly at the same second, whereas reading process continued for 3 seconds. It is normal async reading. But on windows 7 and windows 2008 I get following results: reading: 1296661205 sent: 1296661209 done: 1296661209. It is a behavior of sync reading. MSDN says that async ReadFile sometimes can behave as sync (when the file is compressed or encrypted for example). But the return value in this situation should be TRUE and GetLastError() == NO_ERROR. On Windows 7 I get FALSE and GetLastError() == ERROR_IO_PENDING. So WinApi tells me that it is an async call, but when I look at the test I see that it is not! I'm not the only one who found this "bug": read the comment on ReadFile MSDN page. So what's the solution? Does anybody know? It is been 14 months after Denis found this strange behavior.

    Read the article

  • generic async loading method for page web scripts?

    - by boomhauer
    The google analytics code went to an async load model some time back. I've noticed that a lot of the other scripts I use on many sites are causing slow load times - specifically the addthis script and the facebook like button. I'm noticing that the slow load times of these scripts is causing the google bot to calc my page loadtimes as being much slower than previously. I'd like to know if there is a standard/generic way of causing these scripts to load async as well, or perhaps a pointer to someone who has done the work for this already. Seems this would be a popular thing to do, but not much luck searching around.

    Read the article

  • How can I debug an unhandled exception in code called from a BackgroundWorker?

    - by SkippyFire
    I am running some import code asynchronously from a simple WinForms app using a BackgroundWorker object and its DoAsync() method. I had a problem where I didn't know that exceptions were being thrown and the thread was prematurely dying. I eventually discovered this, and now know when an exception is thrown after reading Unhandled exceptions in BackgroundWorker. However, I still have a problem while debugging. How do I debug this code? I guess I could run it in a test app that doesn't use a BackgrounWorker, but is there a way to debug this as is? If I step through the code that actually throws the exception, I just get kicked out the step-through when the exception occurs. Re-throwing the exception from the RunWorkerCompletedEventHandler naturally doesn't help much either. Any ideas!? Thanks in advance!

    Read the article

  • Python's asyncore to periodically send data using a variable timeout. Is there a better way?

    - by Nick Sonneveld
    I wanted to write a server that a client could connect to and receive periodic updates without having to poll. The problem I have experienced with asyncore is that if you do not return true when dispatcher.writable() is called, you have to wait until after the asyncore.loop has timed out (default is 30s). The two ways I have tried to work around this is 1) reduce timeout to a low value or 2) query connections for when they will next update and generate an adequate timeout value. However if you refer to 'Select Law' in 'man 2 select_tut', it states, "You should always try to use select() without a timeout." Is there a better way to do this? Twisted maybe? I wanted to try and avoid extra threads. I'll include the variable timeout example here: #!/usr/bin/python import time import socket import asyncore # in seconds UPDATE_PERIOD = 4.0 class Channel(asyncore.dispatcher): def __init__(self, sock, sck_map): asyncore.dispatcher.__init__(self, sock=sock, map=sck_map) self.last_update = 0.0 # should update immediately self.send_buf = '' self.recv_buf = '' def writable(self): return len(self.send_buf) > 0 def handle_write(self): nbytes = self.send(self.send_buf) self.send_buf = self.send_buf[nbytes:] def handle_read(self): print 'read' print 'recv:', self.recv(4096) def handle_close(self): print 'close' self.close() # added for variable timeout def update(self): if time.time() >= self.next_update(): self.send_buf += 'hello %f\n'%(time.time()) self.last_update = time.time() def next_update(self): return self.last_update + UPDATE_PERIOD class Server(asyncore.dispatcher): def __init__(self, port, sck_map): asyncore.dispatcher.__init__(self, map=sck_map) self.port = port self.sck_map = sck_map self.create_socket(socket.AF_INET, socket.SOCK_STREAM) self.bind( ("", port)) self.listen(16) print "listening on port", self.port def handle_accept(self): (conn, addr) = self.accept() Channel(sock=conn, sck_map=self.sck_map) # added for variable timeout def update(self): pass def next_update(self): return None sck_map = {} server = Server(9090, sck_map) while True: next_update = time.time() + 30.0 for c in sck_map.values(): c.update() # <-- fill write buffers n = c.next_update() #print 'n:',n if n is not None: next_update = min(next_update, n) _timeout = max(0.1, next_update - time.time()) asyncore.loop(timeout=_timeout, count=1, map=sck_map)

    Read the article

  • What is the right pattern for a async data fetching method in .net async/await

    - by s093294
    Given a class with a method GetData. A few other clients call GetData, and instead of it fetching data each time, i would like to create a pattern where the first call starts the task to get the data, and the rest of the calls wait for the task to complete. private Task<string> _data; private async Task<string> _getdata() { return "my random data from the net"; //get_data_from_net() } public string GetData() { if(_data==null) _data=_getdata(); _data.wait(); //are there not a problem here. cant wait a task that is already completed ? if(_data.status != rantocompletion) _data.wait() is not any better, it might complete between the check and the _data.wait? return _data.Result; } How would i do the pattern correctly? (Solution) private static object _servertime_lock = new object(); private static Task<string> _servertime; private static async Task<string> servertime() { try { var thetvdb = new HttpClient(); thetvdb.Timeout = TimeSpan.FromSeconds(5); // var st = await thetvdb.GetStreamAsync("http://www.thetvdb.com/api/Updates.php?type=none"); var response = await thetvdb.GetAsync("http://www.thetvdb.com/api/Updates.php?type=none"); response.EnsureSuccessStatusCode(); Stream stream = await response.Content.ReadAsStreamAsync(); XDocument xdoc = XDocument.Load(stream); return xdoc.Descendants("Time").First().Value; } catch { return null; } } public static async Task<string> GetServerTime() { lock (_servertime_lock) { if (_servertime == null) _servertime = servertime(); } var time = await _servertime; if (time == null) _servertime = null; return time; }

    Read the article

  • WPF windows locked when calling webservice. Even when run asynchronously

    - by SumGuy
    Hi there. I'm having a big problem when calling a web service from my WPF application. The application/window locks until the process has completed. I've attempted to run this asynchronously but the problem still persists. Currently, the web service call I'm making can last 45-60 seconds. It runs a process on the server to fetch a big chunk of data. As it take a little while I wanted to have a progress bar moving indeterminately for the user to see that the application hasn't stalled or anything (you know how impatatient they get). So: private void btnSelect_Click(object sender, RoutedEventArgs e) { wDrawingList = new WindowDrawingList(systemManager); AsyncMethodHandler caller = default(AsyncMethodHandler); caller = new AsyncMethodHandler(setupDrawingList); // open new thread with callback method caller.BeginInvoke((Guid)((Button)sender).Tag, MyAsyncCallback, null); } Click a button and the app will create the form that the async stuff will be posted to and set up the async stuff calling the async method. public bool setupDrawingList(Guid ID) { if (systemManager.set(ID)) { wDrawingList.Dispatcher.Invoke(DispatcherPriority.Background, new Action(() => { wDrawingList.ShowForm(); Hide(); })); return true; } return false; } This is the async method. The showForm method contains the calls to setup the new form including the monster web service call public void MyAsyncCallback(IAsyncResult ar) { // Because you passed your original delegate in the asyncState parameter of the Begin call, you can get it back here to complete the call. MethodDelegate dlgt = (MethodDelegate)ar.AsyncState; // Complete the call. bool output = dlgt.EndInvoke(ar); try { // Retrieve the delegate. AsyncResult result = (AsyncResult)ar; AsyncMethodHandler caller = (AsyncMethodHandler)result.AsyncDelegate; // Because this method is running from secondary thread it can never access ui objects because they are created // on the primary thread. // Call EndInvoke to retrieve the results. bool returnValue = caller.EndInvoke(ar); // Still on secondary thread, must update ui on primary thread UpdateUI(returnValue == true ? "Success" : "Failed"); } catch (Exception ex) { string exMessage = null; exMessage = "Error: " + ex.Message; UpdateUI(exMessage); } } public void UpdateUI(string outputValue) { // Get back to primary thread to update ui UpdateUIHandler uiHandler = new UpdateUIHandler(UpdateUIIndicators); string results = outputValue; // Run new thread off Dispatched (primary thread) this.Dispatcher.Invoke(System.Windows.Threading.DispatcherPriority.Normal, uiHandler, results); } public void UpdateUIIndicators(string outputValue) { // update user interface controls from primary UI thread sbi3.Content = "Processing Completed."; } Any help or theories are appreciated. I'm at a loss. Thanks in advance

    Read the article

  • Create a Task list, with tasks without executing

    - by Ernesto Araya Eguren
    I have an async method private async Task DoSomething(CancellationToken token) a list of Tasks private List<Task> workers = new List<Task>(); and I have to create N threads that runs that method public void CreateThreads(int n) { tokenSource = new CancellationTokenSource(); token = tokenSource.Token; for (int i = 0; i < n; i++) { workers.Add(DoSomething(token)); } } but the problem is that those have to run at a given time public async Task StartAllWorkers() { if (0 < workers.Count) { try { while (0 < workers.Count) { Task finishedWorker = await Task.WhenAny(workers.ToArray()); workers.Remove(finishedWorker); finishedWorker.Dispose(); } if (workers.Count == 0) { tokenSource = null; } } catch (OperationCanceledException) { throw; } } } but actually they run when i call the CreateThreads Method (before the StartAllWorkers). I searched for keywords and problems like mine but couldn't find anything about stopping the task from running. I've tried a lot of different aproaches but anything that could solve my problem entirely. For example, moving the code from DoSomething into a workers.Add(new Task(async () => { }, token)); would run the StartAllWorkers(), but the threads will never actually start. There is another method for calling the tokenSource.Cancel().

    Read the article

  • Get notification when NSOperationQueue finishes all tasks

    - by porneL
    NSOperationQueue has waitUntilAllOperationsAreFinished, but I don't want to wait synchronously for it. I just want to hide progress indicator in UI when queue finishes. What's the best way to accomplish this? I can't send notifications from my NSOperations, because I don't know which one is going to be last, and [queue operations] might not be empty yet (or worse - repopulated) when notification is received.

    Read the article

  • C# Async call garbage collection

    - by Troy
    Hello. I am working on a Silverlight/WCF application and of course have numerous async calls throughout the Silverlight program. I was wondering on how is the best way to handle the creation of the client classes and subscribing. Specifically, if I subscribe to an event in a method, after it returns does it fall out of scope? internal MyClass { public void OnMyButtonClicked() { var wcfClient = new WcfClient(); wcfClient.SomeMethodFinished += OnMethodCompleted; wcfClient.SomeMethodAsync(); } private void OnMethodCompleted(object sender, EventArgs args) { //Do something with the result //After this method does the subscription to the event //fall out of scope for garbage collection? } } Will I run into problems if I call the function again and create another subscription? Thanks in advance to anyone who responds.

    Read the article

  • Limiting the number of threads executing a method at a single time.

    - by Steve_
    We have a situation where we want to limit the number of paralell requests our application can make to its application server. We have potentially 100+ background threads running that will want to at some point make a call to the application server but only want 5 threads to be able to call SendMessage() (or whatever the method will be) at any one time. What is the best way of achieving this? I have considered using some sort of gatekeeper object that blocks threads coming into the method until the number of threads executing in it has dropped below the threshold. Would this be a reasonable solution or am I overlooking the fact that this might be dirty/dangerous? We are developing in C#.NET 3.5. Thanks, Steve

    Read the article

  • NSNotification vs. Delegate Protocols?

    - by jr
    I have an iPhone application which basically is getting information from an API (in XML, but maybe JSON eventually). The result objects are typically displayed in view controllers (tables mainly). Here is the architecture right now. I have NSOperation classes which fetch the different objects from the remote server. Each of these NSOperation classes, will take a custom delegate method which will fire back the resulting objects as they are parsed, and then finally a method when no more results are available. So, the protocol for the delegates will be something like: (void) ObjectTypeResult:(ObjectType *)result; (void) ObjectTypeNoMoreResults; I think the solution works well, but I do end up with a bunch of delegate protocols around and then my view controllers have to implement all these delegate methods. I don't think its that bad, but I'm always on the lookout for a better design. So, I'm thinking about using NSNotifications to remove the use of the delegates. I could include the object in the userInfo part of the notification and just post objects as received, and then a final event when no more are available. Then I could just have one method in each view controller to receive all the data, even when using multiple objects in one controller.† So, can someone share with me some pros/cons of each approach. Should I consider refactoring my code to use Events rather then the delegates? Is one better then the other in certain situations? In my scenario I'm really not looking to receive notifications in multiple places, so maybe the protocol based delegates are the way to go. Thanks!

    Read the article

  • What mutex/locking/waiting mechanism to use when writing a Chat application with Tornado Web Framewo

    - by user272973
    We're implementing a Chat server using Tornado. The premise is simple, a user makes open an HTTP ajax connection to the Tornado server, and the Tornado server answers only when a new message appears in the chat-room. Whenever the connection closes, regardless if a new message came in or an error/timeout occurred, the client reopens the connection. Looking at Tornado, the question arises of what library can we use to allow us to have these calls wait on some central object that would signal them - A_NEW_MESSAGE_HAS_ARRIVED_ITS_TIME_TO_SEND_BACK_SOME_DATA. To describe this in Win32 terms, each async call would be represented as a thread that would be hanging on a WaitForSingleObject(...) on some central Mutex/Event/etc. We will be operating in a standard Python environment (Tornado), is there something built-in we can use, do we need an external library/server, is there something Tornado recommends? Thanks

    Read the article

  • Data not displayed first time in android after copying the file from assets to data folder

    - by Thinkcomplete
    Description I have used the code tip from http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/ to copy a pre-filled data file to the target and handled this in a asynch task Problem : On starting the application it gives error and shuts down first time, starting again without any change it works perfectly fine. So first time after the file is copied, the error comes but after that no issues. Please help Code attached:.. private class CopyDatabase extends AsyncTask<String, Void, Boolean> { private final ProgressDialog dialog = new ProgressDialog(BabyNames.this); protected void onPreExecute() { this.dialog.setMessage("Loading..."); this.dialog.show(); } @Override protected Boolean doInBackground(String... params) { // TODO Auto-generated method stub try { namesDBSQLHelper.createDatabase(); return null; } catch(IOException ioe){ ioe.printStackTrace(); } return null; } protected void onPostExecute(final Boolean success){ if (this.dialog.isShowing()){ this.dialog.dismiss(); } } }

    Read the article

< Previous Page | 13 14 15 16 17 18 19 20 21 22 23 24  | Next Page >