how to stop calling Monkey Runner device connection every time

by abhilash pujari » Tue, 12 Apr 2011 18:32:12 GMT


Sponsored Links
 Hi,

i am working on Monkey Runner. I am taking screenshots of device after every
time.But to minimize time frame of the functionality of MonkeyRunner  i want
to avoid the device connection call everytime.

# Connects to the current device, returning a MonkeyDevice object
device = MonkeyRunner.waitForConnection()

How to handle this ? can it be doable in python or can we do it from
android ? if yes how to do it?


regards
Abhilash

-- 



Other Threads

1. Why My application could play the url begin with"http" but not "rtsp"?

I wrote a application .It could playback the streaming , if I give it
a address begin with "http://".But when I input
the address that is beginning with the "rtsp://",It could not play.

Sometimes,I also met these problem .
D/StatusBar(   60): updateResources
V/VideoView(  193): reset duration to -1 in openVideo
W/WindowManager(   60): App freeze timeout expired.
W/WindowManager(   60): Force clearing freeze: AppWindowToken{43848338
token=HistoryRecord{437e4e98
com.android.Test/.StreamTest.MovieViewTest}}
I/ActivityManager(   60): Displayed activity
com.android.Test/.StreamTest.MovieViewTest: 5789 ms (total 5789 ms)
I/ARMAssembler(   60): generated
scanline__00000077:03515104_00000001_00000000 [ 46 ipp] (65 ins) at
[0xd7ca8:0xd7dac] in 1454090 ns
W/PlayerDriver(   31): Using generic video MIO
E/SW_DEC  (   31): PV SW DECODER is used for H.263
D/dalvikvm(   60): GC freed 2682 objects / 115016 bytes in 293ms
D/PlayerDriver(   31): buffering (0)
D/PlayerDriver(   31): buffering (0)
D/PlayerDriver(   31): buffering (0)
D/PlayerDriver(   31): buffering (0)
D/PlayerDriver(   31): buffering (0)


________________________________________________________________________
Log:
I/ActivityManager( 1074): Process com.android.voicedialer (pid 2152)
has died.
I/ActivityManager( 1074): Low Memory: No more background processes.
D/skia    ( 1122): purging 10K from font cache [1 entries]
I/ActivityManager( 1074): Starting activity: Intent
{ act=android.intent.action.MAIN cat=
[android.intent.category.LAUNCHER] flg=0x10200000
cmp=com.android.Test/.Test_Main }
I/ActivityManager( 1074): Start proc com.android.Test for activity
com.android.Test/.Test_Main: pid=2163 uid=10020 gids={}
I/WindowManager( 1074): Setting rotation to 1, animFlags=0
I/WindowManager( 1074): Config changed: { scale=1.0 imsi=0/0 loc=en_US
touch=3 keys=1/1/2 nav=1 orien=2}
D/StatusBar( 1074): updateResources
W/IInputConnectionWrapper( 1122): showStatusIcon on inactive
InputConnection
I/ActivityManager( 1074): Displayed activity
com.android.Test/.Test_Main: 989 ms (total 989 ms)
I/ActivityManager( 1074): Starting activity: Intent
{ cmp=com.android.Test/.StreamTest.Test }
I/ActivityManager( 1074): Displayed activity
com.android.Test/.StreamTest.Test: 137 ms (total 137 ms)
I/ActivityManager( 1074): Starting activity: Intent
{ act=android.intent.action.VIEW dat=rtsp://125.76.233.38/h264.3gp
typ=video/* cmp=com.android.camera/.MovieView }
I/ActivityManager( 1074): Start proc com.android.camera for activity
com.android.camera/.MovieView: pid=2170 uid=10003 gids={1006, 1015,
2001, 3003}
W/InputManagerService( 1074): Starting input on non-focused client
com.android.internal.view.iinputmethodclient$stub$pr...@4384c6a8
(uid=10020 pid=2163)
W/IInputConnectionWrapper( 2163): showStatusIcon on inactive
InputConnection
V/VideoView( 2170): reset duration to -1 in openVideo
I/ActivityManager( 1074): Displayed activity
com.android.camera/.MovieView: 2300 ms (total 2300 ms)
I/ActivityManager( 1074): Process com.android.Test (pid 2163) has
died.
I/WindowManager( 1074): WIN DEATH: Window{437bb600 com.android.Test/
com.android.Test.Test_Main paused=false}
I/WindowManager( 1074): WIN DEATH: Window{4381f0c8 com.android.Test/
com.android.Test.StreamTest.Test paused=false}
I/ActivityManager( 1074): Low Memory: No more background processes.
W/QCvdec  ( 1029): get_parameter: unknown param 0ff7a347
D/skia    ( 1122): purging 33K from font cache [4 entries]
D/skia    ( 1074): purging 43K from font cache [6 entries]
D/skia    ( 2170): purging 21K from font cache [3 entries]
E/PlayerDriver( 1029): Command PLAYER_PREPARE completed with an error
or info PVMFFailure
W/PlayerDriver( 1029): PVMFInfoErrorHandlingComplete
E/MediaPlayer( 2170): error (1, -1)
E/MediaPlayer( 2170): Error (1,-1)
D/VideoView( 2170): Error: 1,-1
E/MediaPlayer( 2170): stop called in state 0
E/MediaPlayer( 2170): error (-38, 0)

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

2. I found some error on ubuntu

My platform:
-eclipse 3.4.2
-Ubuntu 9.04.
-android-sdk-linux_x86-1.5_r3
-I am at Thailand.

I found error "Error generating final archive: Debug certificate
expired on 27/8/2496, 23:10 !" when I start eclipse. And I cannot
complie my application.How can I fix this problem.

Thank you very much.
Suriya Kaewmungmuang.

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

3. Android 1.5 SDK now available

4. Context menu for whole screen or view in android

5. Camera preview in activity view

6. Emulator space limits

7. Can't Set SeekBar Minimum Width Programmatically