[android-developers] Re: Progress bar is run after task completing

2010-04-24 Thread krox
Hi! Using a thread is probably what you want, if it is a big file that you are uploading you might even consider using a service instead (bindService()) so it will continue to upload even if your activity is stop()'ed (the user leaves it by pressing the home-button or similair). The following

[android-developers] Re: Progress bar is run after task completing

2010-04-24 Thread krox
Hi! You probably want to use a Thread() to perform the dataupload, if it is a big file that your are uploading a Service (bindService) might be better since it will continue to run even if the activity is destroy'ed . The following code till perform the data upload in a new thread. Thread t =

[android-developers] Re: starting the same activity....

2010-04-24 Thread krox
Hi! Hmm that sounds weird, I just created a testApp and it worked as expected (that is it did not update the UI-elements in A1 when I updated them in A2). Would you mind posting the sourcecode? //Erik On 23 Apr, 23:53, sdphil phil.pellouch...@gmail.com wrote: I have a weird issue, and I'll

[android-developers] Re: How to list the background service

2010-04-24 Thread krox
Hi! Not sure if this is what you are looking for but you can get a list of all running services by using: ActivityManager am = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE); ListActivityManager.RunningServiceInfo runningServices = am.getRunningServices(1000); then just loop

[android-developers] Re: how to list the live background service

2010-04-24 Thread krox
Hi! See http://groups.google.com/group/android-developers/browse_thread/thread/9d3a18d966a320cd# //Erik On 23 Apr, 10:21, yangm yangm...@gmail.com wrote: how to list the live background server, like the ps -ef on linux. Thanks, Ming -- You received this message because you are

[android-developers] Re: How to run a class in background among a package of class

2010-04-23 Thread krox
Hi! AFAICT what you want to do is to start a Service, for more information take a look at http://developer.android.com/reference/android/app/Service.html /Erik On Apr 23, 5:29 pm, subrat kumar panda evergreen.sub...@gmail.com wrote: Hi all, in my app in one package there are some classes.

[android-developers] Re: AlertDialog Timeout

2010-04-22 Thread krox
Hi! Maybe not the optimal solution (quite new to Android development) but spawn a new thread when you show() the AlertDialog, let the Thread sleep 3000 ms and then call myDialog.dismiss(). You might have to use RunOnUIThread() as well since it is messing with the UI. Someone out here might have a

[android-developers] Re: Nested activities question

2010-04-22 Thread krox
Hi! From the current activity call startActivity(Intent rootActivityIntent) with the flag FLAG_ACTIVITY_REORDER_TO_FRONT set for rootActivityIntent. Hope this is what you were looking for, for more information see:

[android-developers] Re: problem accessing run( ) in android

2010-04-22 Thread krox
Hi! Just took a really quick look but AFAICT you try to start the runnable r from getSongs() but getSongs() is only called from the runnable r, hence a moment 22. So you probably have to start the runnable r from onCreate()/onStart() as well (however AFAICT you gonna end up in a loop calling

[android-developers] Re: Best practices for integrated (context-sensitive) help?

2010-04-22 Thread krox
Hi! Good question, haven't really thought about it earlier but my approach would probably be to have small buttons with a question-mark icon and when clicked a Toast-message would display. Or perhaps using a (Alert)Dialog instead of a Toast if a more advanced help-message is to be displayed.

[android-developers] Starting one activity brings all the other activities in the same process to front?

2010-04-20 Thread krox
Hi! I have an application consisting of two activities (call them Display and Preferences) and one service which listens for incoming phonecalls. When it detects one it launches the Display-activity with a delay of 3sec in order to let the PhoneApp launch first. The Display- activity is

[android-developers] Re: Starting one activity brings all the other activities in the same process to front?

2010-04-20 Thread krox
=, saying that activity has no affinity to other activities. On Tue, Apr 20, 2010 at 5:44 PM, krox erik.strandb...@gmail.com wrote: Hi! I have an application consisting of two activities (call them Display and Preferences) and one service which listens for incoming phonecalls. When

[android-developers] Re: layout on top of the InCallScreen

2010-04-13 Thread krox
Hi! I actually have an app doing the exact same thing and it is working. My approach is to have a service running which uses the PhoneStateListener. In the onCallStateChanged() method I have the following source code: case TelephonyManager.CALL_STATE_RINGING: try {

[android-developers] Re: screen pixel size

2010-04-13 Thread krox
Hi, The following code would provide that for you WindowManager wm = (WindowManager)getSystemService(Context.WINDOW_SERVICE); Display dsp = wm.getDefaultDisplay(); On Apr 13, 12:05 am, Bob bshumsk...@yahoo.com wrote: Hi, I need to know how many pixels wide and tall the screen is.  I

[android-developers] Re: screen pixel size

2010-04-13 Thread krox
Hi (again) I accidentally clicked send while writing my reply so here comes the proper one :-) The following code will provide you with the size of the screen (in pixels) WindowManager wm = (WindowManager)getSystemService(Context.WINDOW_SERVICE); Display dsp =