how to makes two activities run at the same time?

by john » Fri, 07 Jan 2011 02:26:53 GMT


Sponsored Links
 l want to simulate user operation,for example:
l was listening music, and  l want to take picture,
that's two activities, how should l simulate this operations?

for start one activity, it is:
Intent intent = new Intent(mContext,MultiActivity.class);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
mContext.startActivity(intent);

but how to start 2 activities?
both of them run in one thread
or in two threads?how do the activity lifecycle
switch?


3ks

-- 



Re: how to makes two activities run at the same time?

by Kumar Bibek » Fri, 07 Jan 2011 02:45:48 GMT


 Same time? Well, "Run" is perhaps the wrong word. I guess, you mean to say,
that the 2 activities should be active, i.e, not in pause or stop state at
the same time?

Well, if you go through the docs, this is not possible yet. Maybe in
Honeycomb, but till gingerbead you cannot  do this.

Sorry if I misunderstood your question.

Kumar Bibek
 http://techdroid.kbeanie.com 
 http://www.kbeanie.com 







-- 


Sponsored Links


Re: how to makes two activities run at the same time?

by TreKing » Fri, 07 Jan 2011 02:50:48 GMT


 



One Service to listen to music, one activity to take a picture.



What the hell does that even mean?

-------------------------------------------------------------------------------------------------
TreKing < http://sites.google.com/site/rezmobileapps/treking> ; - Chicago
transit tracking app for Android-powered devices

-- 



Other Threads

1. MAC address?

I'm still on my unique device ID kick.

In Java 6, NetworkInterface has getHardwareAddress() to return the MAC 
address. According to the docs, Android 1.0r1 lacks this method.

Anyone know another way to get the MAC address of an Android device?

Thanks in advance!

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com

Android Training on the Ranch! -- Mar 16-20, 2009
http://www.bignerdranch.com/schedule.shtml

--~--~---------~--~----~------------~-------~--~----~

2. no icon in menu after install apk files to /data/app in target board

api_demo and snake icon is in menu after abd install in emulator. but
no icon in target.
emulator:
D:\andriod\android-sdk-windows-1.0_r1\tools>adb.exe shell
# cd /data/app
cd /data/app
# ls
ls
com.example.android.apis.apk
com.example.android.snake.apk
#

Target:
# cd /data/app
# ls
com.example.android.apis.apk
snake.apk
#

any idea?

Thanks
Sam

--~--~---------~--~----~------------~-------~--~----~

3. Trying to download Android source - repo sync connection reset

4. MediaPlayer output monochrome video

5. About Android Mobile Programming

6. Getting source under Windows (from web interface).

7. Now the source is released what steps do we need to take to port to other hardware?