Search Results

Search found 514 results on 21 pages for 'runnable'.

Page 10/21 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Run java thread at specific times

    - by rmarimon
    I have a web application that synchronizes with a central database four times per hour. The process usually takes 2 minutes. I would like to run this process as a thread at X:55, X:10, X:25, and X:40 so that the users knows that at X:00, X:15, X:30, and X:45 they have a clean copy of the database. It is just about managing expectations. I have gone through the executor in java.util.concurrent but the scheduling is done with the scheduleAtFixedRate which I believe provides no guarantee about when this is actually run in terms of the hours. I could use a first delay to launch the Runnable so that the first one is close to the launch time and schedule for every 15 minutes but it seems that this would probably diverge in time. Is there an easier way to schedule the thread to run 5 minutes before every quarter hour?

    Read the article

  • Cannot run an executable binary file on another Linux System??

    - by Claire Huang
    I'm using Ubuntu 10.04 and Qt4.6, and I've created an executable binary file on my own computer through QtCreator. Now I want to put my executable file on CentOS 5, but it seems that this executable file cannot run on CentOS. Do I need to set some compile parameters to make it runnable on Linux other than Ubuntu?? Or do I need to put some lib files with the executable binary file? (For windows, the .exe file should put together with some .dll files to provide the correct dynamic lib linkage, is there some similar problem on linux?) Thanks for your help!

    Read the article

  • Guice creates Swing components outside of UI thread problem?

    - by Boris Pavlovic
    I'm working on Java Swing application with Google Guice as an IOC container. Things are working pretty well. There are some UI problems. When a standard L&F is replaced with Pushing pixels Substance L&F application is not running due to Guice's Swing components creation outside of UI thread. Is there a way to tell Guice to create Swing components in the UI thread? Maybe I should create custom providers which will return Swing components after SwingUtilities.invokeAndWait(Runnable) creates them. I don't like the idea of running the whole application in UI thread, but maybe it's just a perfect solution.

    Read the article

  • GlassFish Starting Up Java SE Client - No Initial Context Exception

    - by Marcel
    Hi I have developed a java se client that calls some session beans on a glassfish server. I connect to the bean remote interface like this. context = new InitialContext(); em = (ICrudService) context.lookup("java:global/BackITServer/CrudServiceImpl"); This works fine from inside eclipse (gf-client on build path). When I export my project as a runnable jar and call it on the console with java -jar BackItClient.jar I get a NoInitialContextException. MMMM. I would very much appreciate some help. Thank You Greetings Marcel PS: Do I really have to pack all the jars which gf-client is referencing into my jar?

    Read the article

  • Java BufferedReader readline blocking?

    - by tgguy
    I want to make an HTTP request and then get the response as sketched here: URLConnection c = new URL("http://foo.com").openConnection(); c.setDoOutput(true); /* write an http request here using a new OutputStreamWriter(c.getOutputStream) */ BufferedReader reader = new BufferedReader(new InputStreamReader(c.getInputStream)); reader.readLine(); But my question is, if the request I send takes a long time before a response is received, what happens in the call reader.readLine() above? Will this process stay running/runnable on the CPU or will it get taken off the CPU and be notified to wake up and run again when there is IO to be read? If it stays on the CPU, what can be done to make it get off and be notified later?

    Read the article

  • Image processing in a multhithreaded mode using Java

    - by jadaaih
    Hi Folks, I am supposed to process images in a multithreaded mode using Java. I may having varying number of images where as my number of threads are fixed. I have to process all the images using the fixed set of threads. I am just stuck up on how to do it, I had a look ThreadExecutor and BlockingQueues etc...I am still not clear. What I am doing is, - Get the images and add them in a LinkedBlockingQueue which has runnable code of the image processor. - Create a threadpoolexecutor for which one of the arguements is the LinkedBlockingQueue earlier. - Iterate through a for loop till the queue size and do a threadpoolexecutor.execute(linkedblockingqueue.poll). - all i see is it processes only 100 images which is the minimum thread size passed in LinkedBlockingQueue size. I see I am seriously wrong in my understanding somewhere, how do I process all the images in sets of 100(threads) until they are all done? Any examples or psuedocodes would be highly helpful Thanks! J

    Read the article

  • Google App Engine modifyThreadGroup problem

    - by Frank
    I'm using Google App Engine to process Paypal IPN messages, when my servlet starts I use the following lines to start another process to process massages : public class PayPal_Monitor_Servlet extends HttpServlet { PayPal_Message_To_License_File_Worker PayPal_message_to_license_file_worker; public void init(ServletConfig config) throws ServletException // Initializes the servlet. { super.init(config); PayPal_message_to_license_file_worker=new PayPal_Message_To_License_File_Worker(); } public void doGet(HttpServletRequest request,HttpServletResponse response) throws IOException { } ... } public class PayPal_Message_To_License_File_Worker implements Runnable { static Thread PayPal_Message_To_License_File_Thread; ... PayPal_Message_To_License_File_Worker() { start(); } void start() { if (PayPal_Message_To_License_File_Thread==null) { PayPal_Message_To_License_File_Thread=new Thread(this); PayPal_Message_To_License_File_Thread.setPriority(Thread.MIN_PRIORITY); PayPal_Message_To_License_File_Thread.start(); } ... } But "PayPal_Message_To_License_File_Thread=new Thread(this);" is causing the following error : javax.servlet.ServletContext log: unavailable java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup) at java.security.AccessControlContext.checkPermission(AccessControlContext.java:355) at java.security.AccessController.checkPermission(AccessController.java:567) Why, how to fix it ? Frank

    Read the article

  • how can I develop Apple Java Extensions on Windows?

    - by carneades
    When I do multi-platform testing on Windows it gets annoying that Eclipse shows errors in the project because of the com.apple.eawt code that I have in a special Mac customization task. Worse yet, if I export a runnable jar on Windows, it won't run on mac because of the unresolved compilation problems. What's the best way to let Windows Java and com.apple.eawt live in peace? I can't see how I would be able to spin off the code to a jar, since it requires access to lots of the program's state. Thanks for your help! UPDATE: I've posted a jar to Sourceforge that solves this problem: http://sourceforge.net/projects/javaextensions/

    Read the article

  • Android: Create TextView that flashes when clicked

    - by Jeremy
    How do I set up a TextView to flash when it is clicked? I essentially want one of the objects that is displayed in a ListActivity, but inside a normal View. I have tried to do this by adding an OnClickListener, but what I really need is something like adding an On(Un)SelectListener. Using the onClickListener, I can change the TextView background, but obviously the background stays that color. I thought of using a new Handler().postDelayed(new Runnable(){ ... }) kind of thing to reset the backround after some small time, but I did not know if this would be overkill for what I'm trying to do. What would you recommend?

    Read the article

  • Efficiency of while(true) ServerSocket Listen

    - by Submerged
    I am wondering if a typical while(true) ServerSocket listen loop takes an entire core to wait and accept a client connection (Even when implementing runnable and using Thread .start()) I am implementing a type of distributed computing cluster and each computer needs every core it has for computation. A Master node needs to communicate with these computers (invoking static methods that modify the algorithm's functioning). The reason I need to use sockets is due to the cross platform / cross language capabilities. In some cases, PHP will be invoking these java static methods. I used a java profiler (YourKit) and I can see my running ServerSocket listen thread and it never sleeps and it's always running. Is there a better approach to do what I want? Or, will the performance hit be negligible? Please, feel free to offer any suggestion if you can think of a better way (I've tried RMI, but it isn't supported cross-language. Thanks everyone

    Read the article

  • Limit Connections with semaphores

    - by Robert
    I'm trying to limit the number of connections my server will accept using semaphores, but when running, my code doesn't seem to make this restriction - am I using the semaphore correctly? eg. I have hardcoded the number of permit as 2, but I can connect an unlimited number of clients... public class EServer implements Runnable { private ServerSocket serverSocket; private int numberofConnections = 0; private Semaphore sem = new Semaphore(2); private volatile boolean keepProcessing = true; public EServer(int port) throws IOException { serverSocket = new ServerSocket(port); } @Override public void run() { while (keepProcessing) { try { sem.acquire(); Socket socket = serverSocket.accept(); process(socket, getNextConnectionNumber()); } catch (Exception e) { } finally { sem.release(); } } closeIgnoringException(serverSocket); } private synchronized int getNextConnectionNumber() { return ++numberofConnections; } // processing related methods }

    Read the article

  • android call an outside function from a thread

    - by junmats
    hi.. say for example I have this code in my activity: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); Thread cThread = new Thread(new Runner()); cThread.start(); } private NotifyMe(){ //do something here } and this is my Runner class: public class TCPClient implements Runnable { public void run(){ //call NotifyMe() [THIS IS MY QUESTION] } } I have a thread on my activity that runs the Runner Class. Once the thread start, I would like to call the NotifyMe() function that is located at the activity. Is this possible? Please let me know if you don't understand my question. Thanks in advance.

    Read the article

  • How to build a distributable jar with Ant for a java project having external jar dependencies

    - by Nikunj Chauhan
    I have a Java project in Eclipse with class MainClass having main method in package : com.nik.mypackage. The project also references two external libraries, which I copied in the lib folder in Eclipse and then added to build path using ADD JAR function. The libraries being one.jar and two.jar This library is in lib folder in eclipse and added to the build path. I want to create a executable JAR of the application using ant script. So that user can access my application using command: c:>java -jar MyProject-20111126.jar I know about the Eclipse plugin which directly exports a java application as runnable JAR. But I want to learn ant and the build process so manually want to create the build.xm.

    Read the article

  • Passing arguments to java vm from NSIS script

    - by CodeBuddy
    I'm developing my first java application using Eclipse. I've recently needed to adjust the amount of memory allocated by passing -Xmx256M to the JVM. The application is currently package up as a runnable jar and installed using the NSIS. I'm having a problem passing arguments to the jar file once its installed. What is the common practice for doing this? Here is what I'm currently doing in my nsi file: CreateShortcut "$SMPROGRAMS\$StartMenuGroup\$(^Name).lnk" "$SYSDIR\javaw.exe" "-jar -Xmx256M $INSTDIR\Foo.jar" This results in the following being created as the shortcut Target on windows: C:\WINDOWS\system32\javaw.exe -jar -Xmx256M C:\Program Files\Foo\Foo.jar Unfortunately this does not work due to the space in C:\Program Files, If I change the link created manually to include quotes all is well: C:\WINDOWS\system32\javaw.exe -jar -Xmx256M "C:\Program Files\Foo\Foo.jar"

    Read the article

  • Update JProgressBar from new Thread

    - by Dacto
    How can I update the JProgressBar.setValue(int) from another thread? My secondary goal is do it in the least amount of classes possible. Here is the code I have right now: **Part of the main class....** pp.addActionListener( new ActionListener(){ public void actionPerformed(ActionEvent event) { new Thread(new Task(sd.getValue())).start(); } }); public class Task implements Runnable{ int val; public Task(int value){ this.val = value; } @Override public void run() { for (int i=0; i<=value; i++){ //Progressively increment variable i pbar.setValue(i); //Set value pbar.repaint(); //Refresh graphics try{Thread.sleep(50);} //Sleep 50 milliseconds catch (InterruptedException err){} } } } pp is a JButton and starts the new thread when the JButton is clicked. pbar is the JProgressBar object from the Main class. How can I update its value?(progress) The code above in run() cannot see the pbar.

    Read the article

  • Thread Blocks During Call

    - by user578875
    I have a serious problem, I'm developing an application that mesures on call time during a call; the problem presents when, with the phone on the ear, the thread that the timer has, blocks and no longer responds before taking off my ear. The next log shows the problem. 01-11 16:14:19.607 14558 14566 I Estado : postDelayed Async Service 01-11 16:14:20.607 14558 14566 I Estado : postDelayed Async Service 01-11 16:14:21.607 14558 14566 I Estado : postDelayed Async Service 01-11 16:14:22.597 14558 14566 I Estado : postDelayed Async Service 01-11 16:14:23.608 14558 14566 I Estado : postDelayed Async Service 01-11 16:14:24.017 1106 1106 D iddd : select() < 0, Probably a handled signal: Interrupted system call 01-11 16:14:24.607 14558 14566 I Estado : postDelayed Async Service 01-11 16:18:05.500 1106 1106 D iddd : select() < 0, Probably a handled signal: Interrupted system call 01-11 16:18:06.026 14558 14566 I Estado : postDelayed Async Service 01-11 16:18:06.026 14558 14566 I Estado : postDelayed Async Service 01-11 16:18:06.026 14558 14566 I Estado : postDelayed Async Service 01-11 16:18:06.026 14558 14566 I Estado : postDelayed Async Service 01-11 16:18:06.026 14558 14566 I Estado : postDelayed Async Service 01-11 16:18:06.026 14558 14566 I Estado : postDelayed Async Service I've been trying with Services, Timers, Threads, AyncTasks and they all present the same problem. My Code: @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); requestWindowFeature(Window.FEATURE_NO_TITLE); getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN, WindowManager.LayoutParams.FLAG_FULLSCREEN); setContentView(R.layout.main); HangUpService.setMainActivity(this); objHangUpService = new Intent(this, HangUpService.class); Runnable rAccion = new Runnable() { public void run() { TelephonyManager tm = (TelephonyManager)getSystemService(TELEPHONY_SERVICE); tm.listen(mPhoneListener, PhoneStateListener.LISTEN_CALL_STATE); objVibrator = (Vibrator) getSystemService(getApplicationContext().VIBRATOR_SERVICE); final ListView lstLlamadas = (ListView) findViewById(R.id.lstFavoritos); final EditText txtMinutos = (EditText) findViewById(R.id.txtMinutos); final EditText txtSegundos = (EditText) findViewById(R.id.txtSegundos); ArrayList<Contacto> cContactos = new ArrayList<Contacto>(); ContactoAdapter caContactos = new ContactoAdapter(HangUp.this, R.layout.row,cContactos); Cursor curContactos = getContentResolver().query( ContactsContract.Contacts.CONTENT_URI, null, null, null, ContactsContract.Contacts.TIMES_CONTACTED + " DESC"); while (curContactos.moveToNext()){ String strNombre = curContactos.getString(curContactos.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME)); String strID = curContactos.getString(curContactos.getColumnIndex(ContactsContract.Contacts._ID)); String strHasPhone=curContactos.getString(curContactos.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER)); String strStarred=curContactos.getString(curContactos.getColumnIndex(ContactsContract.Contacts.STARRED)); if (Integer.parseInt(strHasPhone) > 0 && Integer.parseInt(strStarred) ==1 ) { Cursor CursorTelefono = getContentResolver().query( ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null, ContactsContract.CommonDataKinds.Phone.CONTACT_ID +" = " + strID, null, null); while (CursorTelefono.moveToNext()) { String strTipo=CursorTelefono.getString(CursorTelefono.getColumnIndex(ContactsContract.CommonDataKinds.Phone.TYPE)); String strTelefono=CursorTelefono.getString(CursorTelefono.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER)); strNumero=strTelefono; String args[]=new String[1]; args[0]=strNumero; Cursor CursorCallLog = getContentResolver().query( android.provider.CallLog.Calls.CONTENT_URI, null, android.provider.CallLog.Calls.NUMBER + "=?", args, android.provider.CallLog.Calls.DATE+ " DESC"); if (Integer.parseInt(strTipo)==2) { caContactos.add( new Contacto( strNombre, strTelefono ) ); } } CursorTelefono.close(); } } curContactos.close(); lstLlamadas.setAdapter(caContactos); lstLlamadas.setOnItemClickListener(new OnItemClickListener() { @Override public void onItemClick(AdapterView a, View v, int position, long id) { Contacto mContacto=(Contacto)lstLlamadas.getItemAtPosition(position); i = new Intent(HangUp.this, Llamada.class); Log.i("Estado","Declaro Intent"); Bundle bundle = new Bundle(); bundle.putString("telefono", mContacto.getTelefono()); i.putExtras(bundle); startActivityForResult(i,SUB_ACTIVITY_ID); Log.i("Estado","Inicio Intent"); blActivo=true; try { String strMinutos=txtMinutos.getText().toString(); String strSegundos=txtSegundos.getText().toString(); if(!strMinutos.equals("") && !strSegundos.equals("")){ int Tiempo = ( (Integer.parseInt(txtMinutos.getText().toString())*60) + Integer.parseInt(txtSegundos.getText().toString()) )* 1000; handler.removeCallbacks(rVibrate); cTime = System.currentTimeMillis(); cTime=cTime+Tiempo; objHangUpAsync = new HangUpAsync(cTime,objVibrator,objPowerManager,objKeyguardLock); objHangUpAsync.execute(); objPowerManager.userActivity(Tiempo+3000, true); objHangUpService.putExtra("cTime", cTime); //startService(objHangUpService); } catch (Exception e) { e.printStackTrace(); } finally { } } }); } }; } AsyncTask: @Override protected String doInBackground(String... arg0) { blActivo = true; mWakeLock = objPowerManager.newWakeLock(PowerManager.FULL_WAKE_LOCK, "My Tag"); objKeyguardLock.disableKeyguard(); Log.i("Estado", "Entro a doInBackground"); timer.scheduleAtFixedRate( new TimerTask() { public void run() { if (blActivo){ if (cTime blActivo=false; objVibrator.vibrate(1000); Log.i("Estado","Vibrar desde Async"); this.cancel(); }else{ try{ mWakeLock.acquire(); mWakeLock.release(); Log.i("Estado","postDelayed Async Service"); }catch(Exception e){ Log.i("Estado","Error: " + e.getMessage()); } } } } }, 0, INTERVAL); return null; }

    Read the article

  • Thread testing for time

    - by DanielFH
    Hi there :) I'm making a thread for my application that's going to do an exit operation at a given time (only hours and minutes, day/month doesn't matter). Is this the right way to do it, and also the right way to test for time? I'm testing for a 24 hour clock by the way, not AM / PM. I'm then in another class going to call this something like new Thread(new ExitThread()).start(); public class ExitThread implements Runnable { @Override public void run() { Date date = new Date(System.currentTimeMillis()); String time = new SimpleDateFormat("HHmmss").format(date); int currentTime = Integer.parseInt(time); int exitTime = 233000; while(true) { try { Thread.sleep(10000); } catch (InterruptedException e) { e.printStackTrace(); } if(currentTime >= exitTime ) { // do exit operation here } } } Thanks. //D

    Read the article

  • Java: Stopping a thread that has run for too long?

    - by Thomas King
    Say I've got something like this public void run(){ Thread behaviourThread = new Thread(abstractBehaviours[i]); behaviourThread.start(); } And I want to wait until abstractBehaviours[i] run method has either finished or run for 5000 milliseconds. How do I do that? behaviourThread.join(5000) doesn't seem to do that afaik (something is wrong with my code and I've put it down to that). All the abstract abstractBehaviour class is of course Runnable. I don't want to implement it inside each run method as that seems ugly and there are many different behaviours, I'd much rather have it in the calling/executing thread and do it just once. Solutions? First time doing something as threaded as this. Thanks!

    Read the article

  • calling invokeAndWait from the EDT

    - by Aly
    Hi, I have a problem following from my previous problem. I also have the code SwingUtillities.invokeAndWait somewhere else in the code base, but when I remove this the gui does not refresh. If I dont remove it the error I get is: Exception in thread "AWT-EventQueue-0" java.lang.Error: Cannot call invokeAndWait from the event dispatcher thread at java.awt.EventQueue.invokeAndWait(Unknown Source) at javax.swing.SwingUtilities.invokeAndWait(Unknown Source) at game.player.humanplayer.model.HumanPlayer.act(HumanPlayer.java:69) The code in HumanPlayer.act is: public Action act(final Action[] availiableActions) { try { SwingUtilities.invokeAndWait(new Runnable() { @Override public void run() { gui.update(availiableActions); } }); } catch (InterruptedException e) { e.printStackTrace(); } catch (InvocationTargetException e) { e.printStackTrace(); } synchronized(performedAction){ while(!hasPerformedAction()){ try { performedAction.wait(); } catch (InterruptedException e) { e.printStackTrace(); } } setPerformedAction(false); } return getActionPerfomed(); }

    Read the article

  • Help naming a class that has a single public method called Execute()

    - by devoured elysium
    I have designed the following class that should work kind of like a method (usually the user will just run Execute()): public abstract class ??? { protected bool hasFailed = false; protected bool hasRun = false; public bool HasFailed { get { return hasFailed; } } public bool HasRun { get { return hasRun; } } private void Restart() { hasFailed = false; hasRun = false; } public bool Execute() { ExecuteImplementation(); bool returnValue = hasFailed; Restart(); return returnValue; } protected abstract void ExecuteImplementation(); } My question is: how should I name this class? Runnable? Method(sounds awkward)?

    Read the article

  • eclipse: calling organizeimports programmatcally

    - by Stefan Roka
    Hi, I'm trying to execute 'OrganizeImports' programmatically on files that I'm editing programmatically. My code looks like this: final ICommandService cmdService = (ICommandService)PlatformUI.getWorkbench().getService (ICommandService.class); if (cmdService != null) { final Command cmd = cmdService.getCommand(IJavaEditorActionDefinitionIds.ORGANIZE_IMPORTS); final ExecutionEvent execEvt = new ExecutionEvent(cmd, Collections.EMPTY_MAP, compileationUnit, null); PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(); ResourcesPlugin.getWorkspace(). Display.getDefault().syncExec(new Runnable() { @Override public void run() { try { //cmd.executeWithChecks(execEvt); cmd.execute(execEvt); } catch (Exception e) { getLogger().severe("organize imports failed: " + e.getMessage()); } } My problem is that OrganizeImportsAction executes on the current selection which is not the same as the compilation unit I'm editing. I would like to set the selection programmatically on the compilation unit but I don't know how to do that. Or maybe there is another way to trigger OrganizeImports. thanks, stefan

    Read the article

  • JavaScript on Android randomly stops working

    - by AndersWid
    Hi! I have an application that uses a WebView and a html-page with javascript functions. Randomly the JavaScript functions doesn't seem to be called. It works up to a random point (I have looked at this bug all day) can only be produced on hardware (HTC Legend) not on emulator. Basicly I'm using callback to javaScript whenever the user presses a button, these callbacks tell the html to redraw using javaScript functions. mHandler.post(new Runnable() { public void run() { mWebView.loadUrl("javascript:getDataLine()"); } }); The first line in this javaScript code is an alert that says that it has started, so that I can see that it's working. Settings alerts or console.log's everywhere won't help as it seems the problem is in the webview or in Android itself. I need a way to see what's going on in the background. Maybe see if a previous call failed and stalled the thread or something.

    Read the article

  • dynamically change bitmap in imageView, android

    - by Junfei Wang
    All, I have a problem related to imageView, android. I have array which contains of 10 bitmap objects, called bm. I have a imageView, called im. Now I wanna show the bitmaps in the array in im one by one, so I did the following: new Thread(new Runnable() { public void run() { for(int j=0;j<10;j++){ im.setImageBitmap(bm[j]); } } }).start(); But the result only shows the last bitmap in the array. Can someone tell me what to do with this issue? Millions of thanks!

    Read the article

  • Is there an "are you sure" for stored procedure execution? :)

    - by Swoosh
    I have a stored procedure which is doing a lot of delete. Hundreds of thousands of records. It is not going to be runnable from the application, but still, i am concerned, that one of my clients accidentally runs it (i had problems earlier due to their "curiosity") :D Yes. there are backups and stuff like that, but I was thinking .... not to scare them ... is there a way to ask the user "are you sure?" before executing it? :) thanks

    Read the article

  • android:black screen switching between activity

    - by 100rabh
    Hi, I am using below code from one of my activity to start another Intent viewIntent = new Intent (getApplicationContext (), landingPage.class); Bundle b = new Bundle (); b.putString ("ApplicationName", a_Bean.getApplicationName ()); if (landingPage.getInstanceCount () < 1) bp.landingPage_ProgressDialog = ProgressDialog.show (ViewAllApp.this, "Please wait...", "Retrieving data...", true, false); viewIntent.putExtras (b); viewIntent.addFlags (Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivityForResult (viewIntent,10); Thread background=new Thread(new Runnable() { public void run() { Progresshandler.sendMessage(handler.obtainMessage());//finishes progressDialog }}); background.start (); but after startactivity it shows a black screen & then displays new activity. Can I make progressdialog to be shown while the black screen is displayed??

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >