1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119<!DOCTYPE html>
120<html devsite>
121<head>
122
123
124    <meta name="top_category" value="develop" />
125
126    <meta name="subcategory" value="reference" />
127
128
129      <meta name="book_path" value="/reference/android/support/test/_book.yaml" />
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145<title>AndroidJUnitRunner</title>
146
147
148</head>
149
150<body class="gc-documentation develop reference api apilevel-">
151<div id="doc-api-level" class="" style="display:none"></div>
152
153
154
155
156<div id="naMessage"></div>
157
158<div id="api-info-block">
159<div class="api-level">
160
161
162
163
164</div>
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192<div class="sum-details-links">
193
194Summary:
195
196
197
198
199
200
201  <a href="#inhconstants">Inherited Constants</a>
202
203
204
205
206
207  &#124; <a href="#pubctors">Ctors</a>
208
209
210
211
212  &#124; <a href="#pubmethods">Methods</a>
213
214
215
216
217  &#124; <a href="#inhmethods">Inherited Methods</a>
218
219&#124; <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a>
220
221</div><!-- end sum-details-links -->
222</div><!-- end api-info-block -->
223
224<div class="api apilevel-" id="jd-content">
225
226<!-- ======== START OF CLASS DATA ======== -->
227
228<h1 class="api-title">AndroidJUnitRunner</h1>
229<p>
230<code class="api-signature">
231  public
232
233
234
235  class
236  AndroidJUnitRunner
237</code>
238<br>
239
240
241<code class="api-signature">
242
243
244
245</code>
246
247<code class="api-signature">
248
249
250
251</code>
252
253<code class="api-signature">
254
255    extends <a href="/reference/android/support/test/runner/MonitoringInstrumentation.html">MonitoringInstrumentation</a>
256
257
258
259</code>
260
261<code class="api-signature">
262
263
264
265</code>
266
267</p><table class="jd-inheritance-table">
268
269
270  <tr>
271
272    <td colspan="4" class="jd-inheritance-class-cell">java.lang.Object
273    </td>
274  </tr>
275
276
277  <tr>
278
279      <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;&#x21b3;</td>
280
281    <td colspan="3" class="jd-inheritance-class-cell">android.app.Instrumentation
282    </td>
283  </tr>
284
285
286  <tr>
287
288      <td class="jd-inheritance-space">&nbsp;</td>
289
290      <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;&#x21b3;</td>
291
292    <td colspan="2" class="jd-inheritance-class-cell"><a href="/reference/android/support/test/runner/MonitoringInstrumentation.html">android.support.test.runner.MonitoringInstrumentation</a>
293    </td>
294  </tr>
295
296
297  <tr>
298
299      <td class="jd-inheritance-space">&nbsp;</td>
300
301      <td class="jd-inheritance-space">&nbsp;</td>
302
303      <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;&#x21b3;</td>
304
305    <td colspan="1" class="jd-inheritance-class-cell">android.support.test.runner.AndroidJUnitRunner
306    </td>
307  </tr>
308
309
310</table>
311
312
313
314
315<br><hr>
316
317
318  <p>An <code><a href="/reference/android/app/Instrumentation.html">Instrumentation</a></code> that runs JUnit3 and JUnit4 tests against
319 an Android package (application).
320 <p/>
321 Based on and replacement for <code><a href="/reference/android/test/InstrumentationTestRunner.html">InstrumentationTestRunner</a></code>. Supports a superset
322 of <code><a href="/reference/android/test/InstrumentationTestRunner.html">InstrumentationTestRunner</a></code> features,
323 while maintaining command/output format compatibility with that class.
324
325 <h3>Typical Usage</h3>
326 <p/>
327 Write JUnit3 style <code><a href="/reference/junit/framework/TestCase.html">TestCase</a></code>s and/or JUnit4 style
328 <a href="http://junit.org/javadoc/latest/org/junit/Test.html">
329 <code>Test</code></a>s that perform tests against the classes in your package.
330 Make use of the <code><a href="/reference/android/support/test/InstrumentationRegistry.html">InstrumentationRegistry</a></code> if needed.
331 <p/>
332 In an appropriate AndroidManifest.xml, define an instrumentation with android:name set to
333 <code><a href="/reference/android/support/test/runner/AndroidJUnitRunner.html">AndroidJUnitRunner</a></code> and the appropriate android:targetPackage
334 set.
335 <p/>
336 Execution options:
337 <p/>
338 <b>Running all tests:</b> adb shell am instrument -w
339 com.android.foo/android.support.test.runner.AndroidJUnitRunner
340 <p/>
341 <b>Running all tests in a class:</b> adb shell am instrument -w
342 -e class com.android.foo.FooTest
343 com.android.foo/android.support.test.runner.AndroidJUnitRunner
344 <p/>
345 <b>Running a single test:</b> adb shell am instrument -w
346 -e class com.android.foo.FooTest#testFoo
347 com.android.foo/android.support.test.runner.AndroidJUnitRunner
348 <p/>
349 <b>Running all tests in multiple classes:</b> adb shell am instrument -w
350 -e class com.android.foo.FooTest,com.android.foo.TooTest
351 com.android.foo/android.support.test.runner.AndroidJUnitRunner
352 <p/>
353 <b>Running all tests except those in a particular class:</b> adb shell am instrument -w
354 -e notClass com.android.foo.FooTest
355 com.android.foo/android.support.test.runner.AndroidJUnitRunner
356 <p/>
357 <b>Running all but a single test:</b> adb shell am instrument -w
358 -e notClass com.android.foo.FooTest#testFoo
359 com.android.foo/android.support.test.runner.AndroidJUnitRunner
360 <p/>
361 <b>Running all tests listed in a file:</b> adb shell am instrument -w
362 -e testFile /sdcard/tmp/testFile.txt com.android.foo/com.android.test.runner.AndroidJUnitRunner
363 The file should contain a list of line separated test classes and optionally methods (expected
364 format: com.android.foo.FooClassName#testMethodName).
365 <p/>
366 <b>Running all tests in a java package:</b> adb shell am instrument -w
367 -e package com.android.foo.bar
368 com.android.foo/android.support.test.runner.AndroidJUnitRunner
369 <p/>
370 <b>Running all tests except a particular package:</b> adb shell am instrument -w
371 -e notPackage com.android.foo.bar
372 com.android.foo/android.support.test.runner.AndroidJUnitRunner
373 <p/>
374 <b>To debug your tests, set a break point in your code and pass:</b>
375 -e debug true
376 <p/>
377 <b>Running a specific test size i.e. annotated with <code><a href="/reference/android/support/test/filters/SmallTest.html">SmallTest</a></code> or <code><a href="/reference/android/support/test/filters/MediumTest.html">MediumTest</a></code> or
378 <code><a href="/reference/android/support/test/filters/LargeTest.html">LargeTest</a></code>:</b>
379 adb shell am instrument -w -e size [small|medium|large]
380 com.android.foo/android.support.test.runner.AndroidJUnitRunner
381 <p/>
382 <b>Filter test run to tests with given annotation:</b> adb shell am instrument -w
383 -e annotation com.android.foo.MyAnnotation
384 com.android.foo/android.support.test.runner.AndroidJUnitRunner
385 <p/>
386 If used with other options, the resulting test run will contain the intersection of the two
387 options.
388 e.g. "-e size large -e annotation com.android.foo.MyAnnotation" will run only tests with both
389 the <code><a href="/reference/android/support/test/filters/LargeTest.html">LargeTest</a></code> and "com.android.foo.MyAnnotation" annotations.
390 <p/>
391 <b>Filter test run to tests <i>without</i> given annotation:</b> adb shell am instrument -w
392 -e notAnnotation com.android.foo.MyAnnotation
393 com.android.foo/android.support.test.runner.AndroidJUnitRunner
394 <p/>
395 As above, if used with other options, the resulting test run will contain the intersection of
396 the two options.
397 e.g. "-e size large -e notAnnotation com.android.foo.MyAnnotation" will run tests with
398 the <code><a href="/reference/android/support/test/filters/LargeTest.html">LargeTest</a></code> annotation that do NOT have the "com.android.foo.MyAnnotation" annotations.
399 <p/>
400 <b>Filter test run to tests <i>without any</i> of a list of annotations:</b> adb shell am
401 instrument -w -e notAnnotation com.android.foo.MyAnnotation,com.android.foo.AnotherAnnotation
402 com.android.foo/android.support.test.runner.AndroidJUnitRunner
403 <p/>
404 <b>Filter test run to a shard of all tests, where numShards is an integer greater than 0 and
405 shardIndex is an integer between 0 (inclusive) and numShards (exclusive):</b> adb shell am
406 instrument -w -e numShards 4 -e shardIndex 1
407 com.android.foo/android.support.test.runner.AndroidJUnitRunner
408 <p/>
409 <b>To run in 'log only' mode</b>
410 -e log true
411 This option will load and iterate through all test classes and methods, but will bypass actual
412 test execution. Useful for quickly obtaining info on the tests to be executed by an
413 instrumentation command.
414 <p/>
415 <b>To generate code coverage files (*.ec) that can be used by EMMA or JaCoCo:</b>
416 -e coverage true
417 Note: For this to work, your classes have to be instrumented offline (i.e. at build time) by
418 EMMA/JaCoCo. By default, the code coverage results file will be saved in a
419 /data/data/<app>/files/coverage.ec file, unless overridden by coverageFile flag (see below)
420 <p/>
421 <b> To specify EMMA code coverage results file path:</b>
422 -e coverageFile /sdcard/myFile.ec
423 <p/>
424 <b> To specify one or more
425 <a href="http://junit.org/javadoc/latest/org/junit/runner/notification/RunListener.html">
426 <code>RunListener</code></a>s to observe the test run:</b>
427 -e listener com.foo.Listener,com.foo.Listener2
428 <p/>
429 <b>Set timeout (in milliseconds) that will be applied to each test:</b>
430 -e timeout_msec 5000
431 <p/>
432 Supported for both JUnit3 and JUnit4 style tests. For JUnit3 tests, this flag is the only way
433 to specify timeouts. For JUnit4 tests, this flag overrides timeouts specified via
434 <a href="http://junit.org/javadoc/latest/org/junit/rules/Timeout.html">
435 <code>org.junit.rules.Timeout</code></a>. Please note that in JUnit4
436 <a href="http://junit.org/javadoc/latest/org/junit/Test.html#timeout()">
437 <code>org.junit.Test#timeout()</code></a>
438 annotation take precedence over both, this flag and
439 <a href="http://junit.org/javadoc/latest/org/junit/Test.html#timeout()">
440 <code>org.junit.Test#timeout()</code></a>
441 annotation.
442 <p/>
443 <b>To disable Google Analytics:</b>
444 -e disableAnalytics true
445 <p/>
446 In order to make sure we are on the right track with each new release,
447 the test runner collects analytics. More specifically, it uploads a hash of the package name
448 of the application under test for each invocation. This allows us to measure both the count of
449 unique packages using this library as well as the volume of usage.
450 <p/>
451 <b/>All arguments can also be specified in the in the AndroidManifest via a meta-data tag:</b>
452 eg. using listeners:
453 instrumentation android:name="android.support.test.runner.AndroidJUnitRunner" ...
454    meta-data android:name="listener"
455              android:value="com.foo.Listener,com.foo.Listener2"
456 Arguments specified via shell will take override manifest specified arguments.
457</p>
458
459
460
461
462
463
464
465<h2 class="api-section">Summary</h2>
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482<!-- =========== ENUM CONSTANT SUMMARY =========== -->
483<table id="inhconstants" class="responsive constants inhtable">
484<tr><th><h3>Inherited constants</h3></th></tr>
485
486
487
488
489  <tr class="api apilevel-" >
490  <td>
491
492  <a href="#" onclick="return toggleInherited(this, null)" id="inherited-constants-android.app.Instrumentation" class="jd-expando-trigger closed"
493          ><img height="34" id="inherited-constants-android.app.Instrumentation-trigger"
494          src="/assets/images/styles/disclosure_down.png"
495          class="jd-expando-trigger-img" /></a>From
496  class
497  <code>
498    android.app.Instrumentation
499  </code>
500  <div id="inherited-constants-android.app.Instrumentation">
501    <div id="inherited-constants-android.app.Instrumentation-list"
502          class="jd-inheritedlinks">
503    </div>
504    <div id="inherited-constants-android.app.Instrumentation-summary" style="display: none;">
505      <table class="jd-sumtable-expando responsive">
506
507
508
509    <tr class="api apilevel-" >
510        <td><code>String</code></td>
511        <td width="100%">
512          <code>REPORT_KEY_IDENTIFIER</code>
513          <p>
514
515
516</p>
517        </td>
518    </tr>
519
520
521    <tr class="api apilevel-" >
522        <td><code>String</code></td>
523        <td width="100%">
524          <code>REPORT_KEY_STREAMRESULT</code>
525          <p>
526
527
528</p>
529        </td>
530    </tr>
531
532
533</table>
534    </div>
535  </div>
536  </td></tr>
537
538
539
540
541</table>
542
543
544
545
546
547
548
549
550
551<!-- ======== CONSTRUCTOR SUMMARY ======== -->
552<table id="pubctors" class="responsive constructors">
553<tr><th colspan="2"><h3>Public constructors</h3></th></tr>
554
555
556
557
558  <tr class="api apilevel-" >
559
560
561    <td width="100%">
562      <code>
563      <a href="/reference/android/support/test/runner/AndroidJUnitRunner.html#AndroidJUnitRunner()">AndroidJUnitRunner</a>()
564      </code>
565
566    </td>
567  </tr>
568
569
570
571</table>
572
573
574
575
576
577
578<!-- ========== METHOD SUMMARY =========== -->
579<table id="pubmethods" class="responsive methods">
580<tr><th colspan="2"><h3>Public methods</h3></th></tr>
581
582
583
584
585  <tr class="api apilevel-" >
586
587
588    <td><code>
589
590
591
592
593
594        void</code>
595    </td>
596
597    <td width="100%">
598      <code>
599      <a href="/reference/android/support/test/runner/AndroidJUnitRunner.html#finish(int, android.os.Bundle)">finish</a>(int resultCode, Bundle results)
600      </code>
601
602        <p>Ensures all activities launched in this instrumentation are finished before the
603 instrumentation exits.
604
605
606</p>
607
608    </td>
609  </tr>
610
611
612
613  <tr class="api apilevel-" >
614
615
616    <td><code>
617
618
619
620
621
622        void</code>
623    </td>
624
625    <td width="100%">
626      <code>
627      <a href="/reference/android/support/test/runner/AndroidJUnitRunner.html#onCreate(android.os.Bundle)">onCreate</a>(Bundle arguments)
628      </code>
629
630        <p>Sets up lifecycle monitoring, and argument registry.
631
632
633</p>
634
635    </td>
636  </tr>
637
638
639
640  <tr class="api apilevel-" >
641
642
643    <td><code>
644
645
646
647
648
649        boolean</code>
650    </td>
651
652    <td width="100%">
653      <code>
654      <a href="/reference/android/support/test/runner/AndroidJUnitRunner.html#onException(java.lang.Object, java.lang.Throwable)">onException</a>(Object obj, Throwable e)
655      </code>
656
657    </td>
658  </tr>
659
660
661
662  <tr class="api apilevel-" >
663
664
665    <td><code>
666
667
668
669
670
671        void</code>
672    </td>
673
674    <td width="100%">
675      <code>
676      <a href="/reference/android/support/test/runner/AndroidJUnitRunner.html#onStart()">onStart</a>()
677      </code>
678
679        <p>This implementation of onStart() will guarantee that the Application's onCreate method
680 has completed when it returns.
681
682
683</p>
684
685    </td>
686  </tr>
687
688
689
690</table>
691
692
693
694
695
696
697
698<!-- ========== METHOD SUMMARY =========== -->
699<table id="inhmethods" class="methods inhtable">
700<tr><th><h3>Inherited methods</h3></th></tr>
701
702
703<tr class="api apilevel-" >
704<td colspan="2">
705
706  <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-android.support.test.runner.MonitoringInstrumentation" class="jd-expando-trigger closed"
707          ><img height="34" id="inherited-methods-android.support.test.runner.MonitoringInstrumentation-trigger"
708          src="/assets/images/styles/disclosure_down.png"
709          class="jd-expando-trigger-img" /></a>From
710class
711<code>
712
713    <a href="/reference/android/support/test/runner/MonitoringInstrumentation.html">android.support.test.runner.MonitoringInstrumentation</a>
714
715</code>
716<div id="inherited-methods-android.support.test.runner.MonitoringInstrumentation">
717  <div id="inherited-methods-android.support.test.runner.MonitoringInstrumentation-list"
718        class="jd-inheritedlinks">
719  </div>
720  <div id="inherited-methods-android.support.test.runner.MonitoringInstrumentation-summary" style="display: none;">
721    <table class="jd-sumtable-expando responsive">
722
723
724
725
726  <tr class="api apilevel-" >
727
728
729    <td><code>
730
731
732
733
734
735        void</code>
736    </td>
737
738    <td width="100%">
739      <code>
740      <a href="/reference/android/support/test/runner/MonitoringInstrumentation.html#callActivityOnCreate(android.app.Activity, android.os.Bundle)">callActivityOnCreate</a>(Activity activity, Bundle bundle)
741      </code>
742
743    </td>
744  </tr>
745
746
747
748  <tr class="api apilevel-" >
749
750
751    <td><code>
752
753
754
755
756
757        void</code>
758    </td>
759
760    <td width="100%">
761      <code>
762      <a href="/reference/android/support/test/runner/MonitoringInstrumentation.html#callActivityOnDestroy(android.app.Activity)">callActivityOnDestroy</a>(Activity activity)
763      </code>
764
765    </td>
766  </tr>
767
768
769
770  <tr class="api apilevel-" >
771
772
773    <td><code>
774
775
776
777
778
779        void</code>
780    </td>
781
782    <td width="100%">
783      <code>
784      <a href="/reference/android/support/test/runner/MonitoringInstrumentation.html#callActivityOnPause(android.app.Activity)">callActivityOnPause</a>(Activity activity)
785      </code>
786
787    </td>
788  </tr>
789
790
791
792  <tr class="api apilevel-" >
793
794
795    <td><code>
796
797
798
799
800
801        void</code>
802    </td>
803
804    <td width="100%">
805      <code>
806      <a href="/reference/android/support/test/runner/MonitoringInstrumentation.html#callActivityOnRestart(android.app.Activity)">callActivityOnRestart</a>(Activity activity)
807      </code>
808
809    </td>
810  </tr>
811
812
813
814  <tr class="api apilevel-" >
815
816
817    <td><code>
818
819
820
821
822
823        void</code>
824    </td>
825
826    <td width="100%">
827      <code>
828      <a href="/reference/android/support/test/runner/MonitoringInstrumentation.html#callActivityOnResume(android.app.Activity)">callActivityOnResume</a>(Activity activity)
829      </code>
830
831    </td>
832  </tr>
833
834
835
836  <tr class="api apilevel-" >
837
838
839    <td><code>
840
841
842
843
844
845        void</code>
846    </td>
847
848    <td width="100%">
849      <code>
850      <a href="/reference/android/support/test/runner/MonitoringInstrumentation.html#callActivityOnStart(android.app.Activity)">callActivityOnStart</a>(Activity activity)
851      </code>
852
853    </td>
854  </tr>
855
856
857
858  <tr class="api apilevel-" >
859
860
861    <td><code>
862
863
864
865
866
867        void</code>
868    </td>
869
870    <td width="100%">
871      <code>
872      <a href="/reference/android/support/test/runner/MonitoringInstrumentation.html#callActivityOnStop(android.app.Activity)">callActivityOnStop</a>(Activity activity)
873      </code>
874
875    </td>
876  </tr>
877
878
879
880  <tr class="api apilevel-" >
881
882
883    <td><code>
884
885
886
887
888
889        void</code>
890    </td>
891
892    <td width="100%">
893      <code>
894      <a href="/reference/android/support/test/runner/MonitoringInstrumentation.html#callApplicationOnCreate(android.app.Application)">callApplicationOnCreate</a>(Application app)
895      </code>
896
897    </td>
898  </tr>
899
900
901
902  <tr class="api apilevel-" >
903
904
905    <td><code>
906
907
908
909
910
911        void</code>
912    </td>
913
914    <td width="100%">
915      <code>
916      <a href="/reference/android/support/test/runner/MonitoringInstrumentation.html#dumpThreadStateToOutputs(java.lang.String)">dumpThreadStateToOutputs</a>(String outputFileName)
917      </code>
918
919    </td>
920  </tr>
921
922
923
924  <tr class="api apilevel-" >
925
926
927    <td><code>
928
929
930
931
932
933        void</code>
934    </td>
935
936    <td width="100%">
937      <code>
938      <a href="/reference/android/support/test/runner/MonitoringInstrumentation.html#execStartActivities(android.content.Context, android.os.IBinder, android.os.IBinder, android.app.Activity, android.content.Intent[], android.os.Bundle)">execStartActivities</a>(Context who, IBinder contextThread, IBinder token, Activity target, Intent[] intents, Bundle options)
939      </code>
940
941        <p>
942
943
944
945</p>
946
947    </td>
948  </tr>
949
950
951
952  <tr class="api apilevel-" >
953
954
955    <td><code>
956
957
958
959
960
961        Instrumentation.ActivityResult</code>
962    </td>
963
964    <td width="100%">
965      <code>
966      <a href="/reference/android/support/test/runner/MonitoringInstrumentation.html#execStartActivity(android.content.Context, android.os.IBinder, android.os.IBinder, android.app.Activity, android.content.Intent, int, android.os.Bundle)">execStartActivity</a>(Context who, IBinder contextThread, IBinder token, Activity target, Intent intent, int requestCode, Bundle options)
967      </code>
968
969        <p>
970
971
972
973</p>
974
975    </td>
976  </tr>
977
978
979
980  <tr class="api apilevel-" >
981
982
983    <td><code>
984
985
986
987
988
989        Instrumentation.ActivityResult</code>
990    </td>
991
992    <td width="100%">
993      <code>
994      <a href="/reference/android/support/test/runner/MonitoringInstrumentation.html#execStartActivity(android.content.Context, android.os.IBinder, android.os.IBinder, android.app.Activity, android.content.Intent, int)">execStartActivity</a>(Context who, IBinder contextThread, IBinder token, Activity target, Intent intent, int requestCode)
995      </code>
996
997        <p>
998
999
1000
1001</p>
1002
1003    </td>
1004  </tr>
1005
1006
1007
1008  <tr class="api apilevel-" >
1009
1010
1011    <td><code>
1012
1013
1014
1015
1016
1017        Instrumentation.ActivityResult</code>
1018    </td>
1019
1020    <td width="100%">
1021      <code>
1022      <a href="/reference/android/support/test/runner/MonitoringInstrumentation.html#execStartActivity(android.content.Context, android.os.IBinder, android.os.IBinder, android.app.Fragment, android.content.Intent, int, android.os.Bundle)">execStartActivity</a>(Context who, IBinder contextThread, IBinder token, Fragment target, Intent intent, int requestCode, Bundle options)
1023      </code>
1024
1025        <p>
1026
1027
1028
1029</p>
1030
1031    </td>
1032  </tr>
1033
1034
1035
1036  <tr class="api apilevel-" >
1037
1038
1039    <td><code>
1040
1041
1042
1043
1044
1045        void</code>
1046    </td>
1047
1048    <td width="100%">
1049      <code>
1050      <a href="/reference/android/support/test/runner/MonitoringInstrumentation.html#finish(int, android.os.Bundle)">finish</a>(int resultCode, Bundle results)
1051      </code>
1052
1053        <p>Ensures all activities launched in this instrumentation are finished before the
1054 instrumentation exits.
1055
1056
1057</p>
1058
1059    </td>
1060  </tr>
1061
1062
1063
1064  <tr class="api apilevel-" >
1065
1066
1067    <td><code>
1068
1069
1070
1071
1072
1073        String</code>
1074    </td>
1075
1076    <td width="100%">
1077      <code>
1078      <a href="/reference/android/support/test/runner/MonitoringInstrumentation.html#getThreadState()">getThreadState</a>()
1079      </code>
1080
1081    </td>
1082  </tr>
1083
1084
1085
1086  <tr class="api apilevel-" >
1087
1088
1089    <td><code>
1090
1091
1092
1093
1094
1095        Activity</code>
1096    </td>
1097
1098    <td width="100%">
1099      <code>
1100      <a href="/reference/android/support/test/runner/MonitoringInstrumentation.html#newActivity(java.lang.Class<?>, android.content.Context, android.os.IBinder, android.app.Application, android.content.Intent, android.content.pm.ActivityInfo, java.lang.CharSequence, android.app.Activity, java.lang.String, java.lang.Object)">newActivity</a>(Class&lt;?&gt; clazz, Context context, IBinder token, Application application, Intent intent, ActivityInfo info, CharSequence title, Activity parent, String id, Object lastNonConfigurationInstance)
1101      </code>
1102
1103    </td>
1104  </tr>
1105
1106
1107
1108  <tr class="api apilevel-" >
1109
1110
1111    <td><code>
1112
1113
1114
1115
1116
1117        void</code>
1118    </td>
1119
1120    <td width="100%">
1121      <code>
1122      <a href="/reference/android/support/test/runner/MonitoringInstrumentation.html#onCreate(android.os.Bundle)">onCreate</a>(Bundle arguments)
1123      </code>
1124
1125        <p>Sets up lifecycle monitoring, and argument registry.
1126
1127
1128</p>
1129
1130    </td>
1131  </tr>
1132
1133
1134
1135  <tr class="api apilevel-" >
1136
1137
1138    <td><code>
1139
1140
1141
1142
1143
1144        void</code>
1145    </td>
1146
1147    <td width="100%">
1148      <code>
1149      <a href="/reference/android/support/test/runner/MonitoringInstrumentation.html#onDestroy()">onDestroy</a>()
1150      </code>
1151
1152    </td>
1153  </tr>
1154
1155
1156
1157  <tr class="api apilevel-" >
1158
1159
1160    <td><code>
1161
1162
1163
1164
1165
1166        boolean</code>
1167    </td>
1168
1169    <td width="100%">
1170      <code>
1171      <a href="/reference/android/support/test/runner/MonitoringInstrumentation.html#onException(java.lang.Object, java.lang.Throwable)">onException</a>(Object obj, Throwable e)
1172      </code>
1173
1174    </td>
1175  </tr>
1176
1177
1178
1179  <tr class="api apilevel-" >
1180
1181
1182    <td><code>
1183
1184
1185
1186
1187
1188        void</code>
1189    </td>
1190
1191    <td width="100%">
1192      <code>
1193      <a href="/reference/android/support/test/runner/MonitoringInstrumentation.html#onStart()">onStart</a>()
1194      </code>
1195
1196        <p>This implementation of onStart() will guarantee that the Application's onCreate method
1197 has completed when it returns.
1198
1199
1200</p>
1201
1202    </td>
1203  </tr>
1204
1205
1206
1207  <tr class="api apilevel-" >
1208
1209
1210    <td><code>
1211
1212
1213
1214        final
1215
1216        void</code>
1217    </td>
1218
1219    <td width="100%">
1220      <code>
1221      <a href="/reference/android/support/test/runner/MonitoringInstrumentation.html#specifyDexMakerCacheProperty()">specifyDexMakerCacheProperty</a>()
1222      </code>
1223
1224    </td>
1225  </tr>
1226
1227
1228
1229  <tr class="api apilevel-" >
1230
1231
1232    <td><code>
1233
1234
1235
1236
1237
1238        Activity</code>
1239    </td>
1240
1241    <td width="100%">
1242      <code>
1243      <a href="/reference/android/support/test/runner/MonitoringInstrumentation.html#startActivitySync(android.content.Intent)">startActivitySync</a>(Intent intent)
1244      </code>
1245
1246    </td>
1247  </tr>
1248
1249
1250
1251  <tr class="api apilevel-" >
1252
1253
1254    <td><code>
1255
1256
1257
1258
1259
1260        void</code>
1261    </td>
1262
1263    <td width="100%">
1264      <code>
1265      <a href="/reference/android/support/test/runner/MonitoringInstrumentation.html#waitForActivitiesToComplete()">waitForActivitiesToComplete</a>()
1266      </code>
1267
1268        <p>Ensures we've onStopped() all activities which were onStarted().
1269
1270
1271</p>
1272
1273    </td>
1274  </tr>
1275
1276
1277
1278    </table>
1279  </div>
1280</div>
1281</td></tr>
1282
1283
1284
1285<tr class="api apilevel-" >
1286<td colspan="2">
1287
1288  <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-android.app.Instrumentation" class="jd-expando-trigger closed"
1289          ><img height="34" id="inherited-methods-android.app.Instrumentation-trigger"
1290          src="/assets/images/styles/disclosure_down.png"
1291          class="jd-expando-trigger-img" /></a>From
1292class
1293<code>
1294
1295    android.app.Instrumentation
1296
1297</code>
1298<div id="inherited-methods-android.app.Instrumentation">
1299  <div id="inherited-methods-android.app.Instrumentation-list"
1300        class="jd-inheritedlinks">
1301  </div>
1302  <div id="inherited-methods-android.app.Instrumentation-summary" style="display: none;">
1303    <table class="jd-sumtable-expando responsive">
1304
1305
1306
1307
1308  <tr class="api apilevel-" >
1309
1310
1311    <td><code>
1312
1313
1314
1315
1316
1317        Instrumentation.ActivityMonitor</code>
1318    </td>
1319
1320    <td width="100%">
1321      <code>
1322      addMonitor(String arg0, Instrumentation.ActivityResult arg1, boolean arg2)
1323      </code>
1324
1325    </td>
1326  </tr>
1327
1328
1329
1330  <tr class="api apilevel-" >
1331
1332
1333    <td><code>
1334
1335
1336
1337
1338
1339        Instrumentation.ActivityMonitor</code>
1340    </td>
1341
1342    <td width="100%">
1343      <code>
1344      addMonitor(IntentFilter arg0, Instrumentation.ActivityResult arg1, boolean arg2)
1345      </code>
1346
1347    </td>
1348  </tr>
1349
1350
1351
1352  <tr class="api apilevel-" >
1353
1354
1355    <td><code>
1356
1357
1358
1359
1360
1361        void</code>
1362    </td>
1363
1364    <td width="100%">
1365      <code>
1366      addMonitor(Instrumentation.ActivityMonitor arg0)
1367      </code>
1368
1369    </td>
1370  </tr>
1371
1372
1373
1374  <tr class="api apilevel-" >
1375
1376
1377    <td><code>
1378
1379
1380
1381
1382
1383        void</code>
1384    </td>
1385
1386    <td width="100%">
1387      <code>
1388      callActivityOnCreate(Activity arg0, Bundle arg1)
1389      </code>
1390
1391    </td>
1392  </tr>
1393
1394
1395
1396  <tr class="api apilevel-" >
1397
1398
1399    <td><code>
1400
1401
1402
1403
1404
1405        void</code>
1406    </td>
1407
1408    <td width="100%">
1409      <code>
1410      callActivityOnCreate(Activity arg0, Bundle arg1, PersistableBundle arg2)
1411      </code>
1412
1413    </td>
1414  </tr>
1415
1416
1417
1418  <tr class="api apilevel-" >
1419
1420
1421    <td><code>
1422
1423
1424
1425
1426
1427        void</code>
1428    </td>
1429
1430    <td width="100%">
1431      <code>
1432      callActivityOnDestroy(Activity arg0)
1433      </code>
1434
1435    </td>
1436  </tr>
1437
1438
1439
1440  <tr class="api apilevel-" >
1441
1442
1443    <td><code>
1444
1445
1446
1447
1448
1449        void</code>
1450    </td>
1451
1452    <td width="100%">
1453      <code>
1454      callActivityOnNewIntent(Activity arg0, Intent arg1)
1455      </code>
1456
1457    </td>
1458  </tr>
1459
1460
1461
1462  <tr class="api apilevel-" >
1463
1464
1465    <td><code>
1466
1467
1468
1469
1470
1471        void</code>
1472    </td>
1473
1474    <td width="100%">
1475      <code>
1476      callActivityOnPause(Activity arg0)
1477      </code>
1478
1479    </td>
1480  </tr>
1481
1482
1483
1484  <tr class="api apilevel-" >
1485
1486
1487    <td><code>
1488
1489
1490
1491
1492
1493        void</code>
1494    </td>
1495
1496    <td width="100%">
1497      <code>
1498      callActivityOnPostCreate(Activity arg0, Bundle arg1, PersistableBundle arg2)
1499      </code>
1500
1501    </td>
1502  </tr>
1503
1504
1505
1506  <tr class="api apilevel-" >
1507
1508
1509    <td><code>
1510
1511
1512
1513
1514
1515        void</code>
1516    </td>
1517
1518    <td width="100%">
1519      <code>
1520      callActivityOnPostCreate(Activity arg0, Bundle arg1)
1521      </code>
1522
1523    </td>
1524  </tr>
1525
1526
1527
1528  <tr class="api apilevel-" >
1529
1530
1531    <td><code>
1532
1533
1534
1535
1536
1537        void</code>
1538    </td>
1539
1540    <td width="100%">
1541      <code>
1542      callActivityOnRestart(Activity arg0)
1543      </code>
1544
1545    </td>
1546  </tr>
1547
1548
1549
1550  <tr class="api apilevel-" >
1551
1552
1553    <td><code>
1554
1555
1556
1557
1558
1559        void</code>
1560    </td>
1561
1562    <td width="100%">
1563      <code>
1564      callActivityOnRestoreInstanceState(Activity arg0, Bundle arg1)
1565      </code>
1566
1567    </td>
1568  </tr>
1569
1570
1571
1572  <tr class="api apilevel-" >
1573
1574
1575    <td><code>
1576
1577
1578
1579
1580
1581        void</code>
1582    </td>
1583
1584    <td width="100%">
1585      <code>
1586      callActivityOnRestoreInstanceState(Activity arg0, Bundle arg1, PersistableBundle arg2)
1587      </code>
1588
1589    </td>
1590  </tr>
1591
1592
1593
1594  <tr class="api apilevel-" >
1595
1596
1597    <td><code>
1598
1599
1600
1601
1602
1603        void</code>
1604    </td>
1605
1606    <td width="100%">
1607      <code>
1608      callActivityOnResume(Activity arg0)
1609      </code>
1610
1611    </td>
1612  </tr>
1613
1614
1615
1616  <tr class="api apilevel-" >
1617
1618
1619    <td><code>
1620
1621
1622
1623
1624
1625        void</code>
1626    </td>
1627
1628    <td width="100%">
1629      <code>
1630      callActivityOnSaveInstanceState(Activity arg0, Bundle arg1, PersistableBundle arg2)
1631      </code>
1632
1633    </td>
1634  </tr>
1635
1636
1637
1638  <tr class="api apilevel-" >
1639
1640
1641    <td><code>
1642
1643
1644
1645
1646
1647        void</code>
1648    </td>
1649
1650    <td width="100%">
1651      <code>
1652      callActivityOnSaveInstanceState(Activity arg0, Bundle arg1)
1653      </code>
1654
1655    </td>
1656  </tr>
1657
1658
1659
1660  <tr class="api apilevel-" >
1661
1662
1663    <td><code>
1664
1665
1666
1667
1668
1669        void</code>
1670    </td>
1671
1672    <td width="100%">
1673      <code>
1674      callActivityOnStart(Activity arg0)
1675      </code>
1676
1677    </td>
1678  </tr>
1679
1680
1681
1682  <tr class="api apilevel-" >
1683
1684
1685    <td><code>
1686
1687
1688
1689
1690
1691        void</code>
1692    </td>
1693
1694    <td width="100%">
1695      <code>
1696      callActivityOnStop(Activity arg0)
1697      </code>
1698
1699    </td>
1700  </tr>
1701
1702
1703
1704  <tr class="api apilevel-" >
1705
1706
1707    <td><code>
1708
1709
1710
1711
1712
1713        void</code>
1714    </td>
1715
1716    <td width="100%">
1717      <code>
1718      callActivityOnUserLeaving(Activity arg0)
1719      </code>
1720
1721    </td>
1722  </tr>
1723
1724
1725
1726  <tr class="api apilevel-" >
1727
1728
1729    <td><code>
1730
1731
1732
1733
1734
1735        void</code>
1736    </td>
1737
1738    <td width="100%">
1739      <code>
1740      callApplicationOnCreate(Application arg0)
1741      </code>
1742
1743    </td>
1744  </tr>
1745
1746
1747
1748  <tr class="api apilevel-" >
1749
1750
1751    <td><code>
1752
1753
1754
1755
1756
1757        boolean</code>
1758    </td>
1759
1760    <td width="100%">
1761      <code>
1762      checkMonitorHit(Instrumentation.ActivityMonitor arg0, int arg1)
1763      </code>
1764
1765    </td>
1766  </tr>
1767
1768
1769
1770  <tr class="api apilevel-" >
1771
1772
1773    <td><code>
1774
1775
1776
1777
1778
1779        void</code>
1780    </td>
1781
1782    <td width="100%">
1783      <code>
1784      endPerformanceSnapshot()
1785      </code>
1786
1787    </td>
1788  </tr>
1789
1790
1791
1792  <tr class="api apilevel-" >
1793
1794
1795    <td><code>
1796
1797
1798
1799
1800
1801        void</code>
1802    </td>
1803
1804    <td width="100%">
1805      <code>
1806      finish(int arg0, Bundle arg1)
1807      </code>
1808
1809    </td>
1810  </tr>
1811
1812
1813
1814  <tr class="api apilevel-" >
1815
1816
1817    <td><code>
1818
1819
1820
1821
1822
1823        Bundle</code>
1824    </td>
1825
1826    <td width="100%">
1827      <code>
1828      getAllocCounts()
1829      </code>
1830
1831    </td>
1832  </tr>
1833
1834
1835
1836  <tr class="api apilevel-" >
1837
1838
1839    <td><code>
1840
1841
1842
1843
1844
1845        Bundle</code>
1846    </td>
1847
1848    <td width="100%">
1849      <code>
1850      getBinderCounts()
1851      </code>
1852
1853    </td>
1854  </tr>
1855
1856
1857
1858  <tr class="api apilevel-" >
1859
1860
1861    <td><code>
1862
1863
1864
1865
1866
1867        ComponentName</code>
1868    </td>
1869
1870    <td width="100%">
1871      <code>
1872      getComponentName()
1873      </code>
1874
1875    </td>
1876  </tr>
1877
1878
1879
1880  <tr class="api apilevel-" >
1881
1882
1883    <td><code>
1884
1885
1886
1887
1888
1889        Context</code>
1890    </td>
1891
1892    <td width="100%">
1893      <code>
1894      getContext()
1895      </code>
1896
1897    </td>
1898  </tr>
1899
1900
1901
1902  <tr class="api apilevel-" >
1903
1904
1905    <td><code>
1906
1907
1908
1909
1910
1911        Context</code>
1912    </td>
1913
1914    <td width="100%">
1915      <code>
1916      getTargetContext()
1917      </code>
1918
1919    </td>
1920  </tr>
1921
1922
1923
1924  <tr class="api apilevel-" >
1925
1926
1927    <td><code>
1928
1929
1930
1931
1932
1933        UiAutomation</code>
1934    </td>
1935
1936    <td width="100%">
1937      <code>
1938      getUiAutomation()
1939      </code>
1940
1941    </td>
1942  </tr>
1943
1944
1945
1946  <tr class="api apilevel-" >
1947
1948
1949    <td><code>
1950
1951
1952
1953
1954
1955        boolean</code>
1956    </td>
1957
1958    <td width="100%">
1959      <code>
1960      invokeContextMenuAction(Activity arg0, int arg1, int arg2)
1961      </code>
1962
1963    </td>
1964  </tr>
1965
1966
1967
1968  <tr class="api apilevel-" >
1969
1970
1971    <td><code>
1972
1973
1974
1975
1976
1977        boolean</code>
1978    </td>
1979
1980    <td width="100%">
1981      <code>
1982      invokeMenuActionSync(Activity arg0, int arg1, int arg2)
1983      </code>
1984
1985    </td>
1986  </tr>
1987
1988
1989
1990  <tr class="api apilevel-" >
1991
1992
1993    <td><code>
1994
1995
1996
1997
1998
1999        boolean</code>
2000    </td>
2001
2002    <td width="100%">
2003      <code>
2004      isProfiling()
2005      </code>
2006
2007    </td>
2008  </tr>
2009
2010
2011
2012  <tr class="api apilevel-" >
2013
2014
2015    <td><code>
2016
2017
2018
2019
2020
2021        Activity</code>
2022    </td>
2023
2024    <td width="100%">
2025      <code>
2026      newActivity(Class&lt;?&gt; arg0, Context arg1, IBinder arg2, Application arg3, Intent arg4, ActivityInfo arg5, CharSequence arg6, Activity arg7, String arg8, Object arg9)
2027      </code>
2028
2029    </td>
2030  </tr>
2031
2032
2033
2034  <tr class="api apilevel-" >
2035
2036
2037    <td><code>
2038
2039
2040
2041
2042
2043        Activity</code>
2044    </td>
2045
2046    <td width="100%">
2047      <code>
2048      newActivity(ClassLoader arg0, String arg1, Intent arg2)
2049      </code>
2050
2051    </td>
2052  </tr>
2053
2054
2055
2056  <tr class="api apilevel-" >
2057
2058
2059    <td><code>
2060
2061
2062
2063
2064
2065        Application</code>
2066    </td>
2067
2068    <td width="100%">
2069      <code>
2070      newApplication(ClassLoader arg0, String arg1, Context arg2)
2071      </code>
2072
2073    </td>
2074  </tr>
2075
2076
2077
2078  <tr class="api apilevel-" >
2079
2080
2081    <td><code>
2082
2083
2084        static
2085
2086
2087        Application</code>
2088    </td>
2089
2090    <td width="100%">
2091      <code>
2092      newApplication(Class&lt;?&gt; arg0, Context arg1)
2093      </code>
2094
2095    </td>
2096  </tr>
2097
2098
2099
2100  <tr class="api apilevel-" >
2101
2102
2103    <td><code>
2104
2105
2106
2107
2108
2109        void</code>
2110    </td>
2111
2112    <td width="100%">
2113      <code>
2114      onCreate(Bundle arg0)
2115      </code>
2116
2117    </td>
2118  </tr>
2119
2120
2121
2122  <tr class="api apilevel-" >
2123
2124
2125    <td><code>
2126
2127
2128
2129
2130
2131        void</code>
2132    </td>
2133
2134    <td width="100%">
2135      <code>
2136      onDestroy()
2137      </code>
2138
2139    </td>
2140  </tr>
2141
2142
2143
2144  <tr class="api apilevel-" >
2145
2146
2147    <td><code>
2148
2149
2150
2151
2152
2153        boolean</code>
2154    </td>
2155
2156    <td width="100%">
2157      <code>
2158      onException(Object arg0, Throwable arg1)
2159      </code>
2160
2161    </td>
2162  </tr>
2163
2164
2165
2166  <tr class="api apilevel-" >
2167
2168
2169    <td><code>
2170
2171
2172
2173
2174
2175        void</code>
2176    </td>
2177
2178    <td width="100%">
2179      <code>
2180      onStart()
2181      </code>
2182
2183    </td>
2184  </tr>
2185
2186
2187
2188  <tr class="api apilevel-" >
2189
2190
2191    <td><code>
2192
2193
2194
2195
2196
2197        void</code>
2198    </td>
2199
2200    <td width="100%">
2201      <code>
2202      removeMonitor(Instrumentation.ActivityMonitor arg0)
2203      </code>
2204
2205    </td>
2206  </tr>
2207
2208
2209
2210  <tr class="api apilevel-" >
2211
2212
2213    <td><code>
2214
2215
2216
2217
2218
2219        void</code>
2220    </td>
2221
2222    <td width="100%">
2223      <code>
2224      runOnMainSync(Runnable arg0)
2225      </code>
2226
2227    </td>
2228  </tr>
2229
2230
2231
2232  <tr class="api apilevel-" >
2233
2234
2235    <td><code>
2236
2237
2238
2239
2240
2241        void</code>
2242    </td>
2243
2244    <td width="100%">
2245      <code>
2246      sendCharacterSync(int arg0)
2247      </code>
2248
2249    </td>
2250  </tr>
2251
2252
2253
2254  <tr class="api apilevel-" >
2255
2256
2257    <td><code>
2258
2259
2260
2261
2262
2263        void</code>
2264    </td>
2265
2266    <td width="100%">
2267      <code>
2268      sendKeyDownUpSync(int arg0)
2269      </code>
2270
2271    </td>
2272  </tr>
2273
2274
2275
2276  <tr class="api apilevel-" >
2277
2278
2279    <td><code>
2280
2281
2282
2283
2284
2285        void</code>
2286    </td>
2287
2288    <td width="100%">
2289      <code>
2290      sendKeySync(KeyEvent arg0)
2291      </code>
2292
2293    </td>
2294  </tr>
2295
2296
2297
2298  <tr class="api apilevel-" >
2299
2300
2301    <td><code>
2302
2303
2304
2305
2306
2307        void</code>
2308    </td>
2309
2310    <td width="100%">
2311      <code>
2312      sendPointerSync(MotionEvent arg0)
2313      </code>
2314
2315    </td>
2316  </tr>
2317
2318
2319
2320  <tr class="api apilevel-" >
2321
2322
2323    <td><code>
2324
2325
2326
2327
2328
2329        void</code>
2330    </td>
2331
2332    <td width="100%">
2333      <code>
2334      sendStatus(int arg0, Bundle arg1)
2335      </code>
2336
2337    </td>
2338  </tr>
2339
2340
2341
2342  <tr class="api apilevel-" >
2343
2344
2345    <td><code>
2346
2347
2348
2349
2350
2351        void</code>
2352    </td>
2353
2354    <td width="100%">
2355      <code>
2356      sendStringSync(String arg0)
2357      </code>
2358
2359    </td>
2360  </tr>
2361
2362
2363
2364  <tr class="api apilevel-" >
2365
2366
2367    <td><code>
2368
2369
2370
2371
2372
2373        void</code>
2374    </td>
2375
2376    <td width="100%">
2377      <code>
2378      sendTrackballEventSync(MotionEvent arg0)
2379      </code>
2380
2381    </td>
2382  </tr>
2383
2384
2385
2386  <tr class="api apilevel-" >
2387
2388
2389    <td><code>
2390
2391
2392
2393
2394
2395        void</code>
2396    </td>
2397
2398    <td width="100%">
2399      <code>
2400      setAutomaticPerformanceSnapshots()
2401      </code>
2402
2403    </td>
2404  </tr>
2405
2406
2407
2408  <tr class="api apilevel-" >
2409
2410
2411    <td><code>
2412
2413
2414
2415
2416
2417        void</code>
2418    </td>
2419
2420    <td width="100%">
2421      <code>
2422      setInTouchMode(boolean arg0)
2423      </code>
2424
2425    </td>
2426  </tr>
2427
2428
2429
2430  <tr class="api apilevel-" >
2431
2432
2433    <td><code>
2434
2435
2436
2437
2438
2439        void</code>
2440    </td>
2441
2442    <td width="100%">
2443      <code>
2444      start()
2445      </code>
2446
2447    </td>
2448  </tr>
2449
2450
2451
2452  <tr class="api apilevel-" >
2453
2454
2455    <td><code>
2456
2457
2458
2459
2460
2461        Activity</code>
2462    </td>
2463
2464    <td width="100%">
2465      <code>
2466      startActivitySync(Intent arg0)
2467      </code>
2468
2469    </td>
2470  </tr>
2471
2472
2473
2474  <tr class="api apilevel-" >
2475
2476
2477    <td><code>
2478
2479
2480
2481
2482
2483        void</code>
2484    </td>
2485
2486    <td width="100%">
2487      <code>
2488      startAllocCounting()
2489      </code>
2490
2491    </td>
2492  </tr>
2493
2494
2495
2496  <tr class="api apilevel-" >
2497
2498
2499    <td><code>
2500
2501
2502
2503
2504
2505        void</code>
2506    </td>
2507
2508    <td width="100%">
2509      <code>
2510      startPerformanceSnapshot()
2511      </code>
2512
2513    </td>
2514  </tr>
2515
2516
2517
2518  <tr class="api apilevel-" >
2519
2520
2521    <td><code>
2522
2523
2524
2525
2526
2527        void</code>
2528    </td>
2529
2530    <td width="100%">
2531      <code>
2532      startProfiling()
2533      </code>
2534
2535    </td>
2536  </tr>
2537
2538
2539
2540  <tr class="api apilevel-" >
2541
2542
2543    <td><code>
2544
2545
2546
2547
2548
2549        void</code>
2550    </td>
2551
2552    <td width="100%">
2553      <code>
2554      stopAllocCounting()
2555      </code>
2556
2557    </td>
2558  </tr>
2559
2560
2561
2562  <tr class="api apilevel-" >
2563
2564
2565    <td><code>
2566
2567
2568
2569
2570
2571        void</code>
2572    </td>
2573
2574    <td width="100%">
2575      <code>
2576      stopProfiling()
2577      </code>
2578
2579    </td>
2580  </tr>
2581
2582
2583
2584  <tr class="api apilevel-" >
2585
2586
2587    <td><code>
2588
2589
2590
2591
2592
2593        void</code>
2594    </td>
2595
2596    <td width="100%">
2597      <code>
2598      waitForIdle(Runnable arg0)
2599      </code>
2600
2601    </td>
2602  </tr>
2603
2604
2605
2606  <tr class="api apilevel-" >
2607
2608
2609    <td><code>
2610
2611
2612
2613
2614
2615        void</code>
2616    </td>
2617
2618    <td width="100%">
2619      <code>
2620      waitForIdleSync()
2621      </code>
2622
2623    </td>
2624  </tr>
2625
2626
2627
2628  <tr class="api apilevel-" >
2629
2630
2631    <td><code>
2632
2633
2634
2635
2636
2637        Activity</code>
2638    </td>
2639
2640    <td width="100%">
2641      <code>
2642      waitForMonitor(Instrumentation.ActivityMonitor arg0)
2643      </code>
2644
2645    </td>
2646  </tr>
2647
2648
2649
2650  <tr class="api apilevel-" >
2651
2652
2653    <td><code>
2654
2655
2656
2657
2658
2659        Activity</code>
2660    </td>
2661
2662    <td width="100%">
2663      <code>
2664      waitForMonitorWithTimeout(Instrumentation.ActivityMonitor arg0, long arg1)
2665      </code>
2666
2667    </td>
2668  </tr>
2669
2670
2671
2672    </table>
2673  </div>
2674</div>
2675</td></tr>
2676
2677
2678
2679<tr class="api apilevel-" >
2680<td colspan="2">
2681
2682  <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed"
2683          ><img height="34" id="inherited-methods-java.lang.Object-trigger"
2684          src="/assets/images/styles/disclosure_down.png"
2685          class="jd-expando-trigger-img" /></a>From
2686class
2687<code>
2688
2689    java.lang.Object
2690
2691</code>
2692<div id="inherited-methods-java.lang.Object">
2693  <div id="inherited-methods-java.lang.Object-list"
2694        class="jd-inheritedlinks">
2695  </div>
2696  <div id="inherited-methods-java.lang.Object-summary" style="display: none;">
2697    <table class="jd-sumtable-expando responsive">
2698
2699
2700
2701
2702  <tr class="api apilevel-" >
2703
2704
2705    <td><code>
2706
2707
2708
2709
2710
2711        Object</code>
2712    </td>
2713
2714    <td width="100%">
2715      <code>
2716      clone()
2717      </code>
2718
2719    </td>
2720  </tr>
2721
2722
2723
2724  <tr class="api apilevel-" >
2725
2726
2727    <td><code>
2728
2729
2730
2731
2732
2733        boolean</code>
2734    </td>
2735
2736    <td width="100%">
2737      <code>
2738      equals(Object arg0)
2739      </code>
2740
2741    </td>
2742  </tr>
2743
2744
2745
2746  <tr class="api apilevel-" >
2747
2748
2749    <td><code>
2750
2751
2752
2753
2754
2755        void</code>
2756    </td>
2757
2758    <td width="100%">
2759      <code>
2760      finalize()
2761      </code>
2762
2763    </td>
2764  </tr>
2765
2766
2767
2768  <tr class="api apilevel-" >
2769
2770
2771    <td><code>
2772
2773
2774
2775        final
2776
2777        Class&lt;?&gt;</code>
2778    </td>
2779
2780    <td width="100%">
2781      <code>
2782      getClass()
2783      </code>
2784
2785    </td>
2786  </tr>
2787
2788
2789
2790  <tr class="api apilevel-" >
2791
2792
2793    <td><code>
2794
2795
2796
2797
2798
2799        int</code>
2800    </td>
2801
2802    <td width="100%">
2803      <code>
2804      hashCode()
2805      </code>
2806
2807    </td>
2808  </tr>
2809
2810
2811
2812  <tr class="api apilevel-" >
2813
2814
2815    <td><code>
2816
2817
2818
2819        final
2820
2821        void</code>
2822    </td>
2823
2824    <td width="100%">
2825      <code>
2826      notify()
2827      </code>
2828
2829    </td>
2830  </tr>
2831
2832
2833
2834  <tr class="api apilevel-" >
2835
2836
2837    <td><code>
2838
2839
2840
2841        final
2842
2843        void</code>
2844    </td>
2845
2846    <td width="100%">
2847      <code>
2848      notifyAll()
2849      </code>
2850
2851    </td>
2852  </tr>
2853
2854
2855
2856  <tr class="api apilevel-" >
2857
2858
2859    <td><code>
2860
2861
2862
2863
2864
2865        String</code>
2866    </td>
2867
2868    <td width="100%">
2869      <code>
2870      toString()
2871      </code>
2872
2873    </td>
2874  </tr>
2875
2876
2877
2878  <tr class="api apilevel-" >
2879
2880
2881    <td><code>
2882
2883
2884
2885        final
2886
2887        void</code>
2888    </td>
2889
2890    <td width="100%">
2891      <code>
2892      wait(long arg0, int arg1)
2893      </code>
2894
2895    </td>
2896  </tr>
2897
2898
2899
2900  <tr class="api apilevel-" >
2901
2902
2903    <td><code>
2904
2905
2906
2907        final
2908
2909        void</code>
2910    </td>
2911
2912    <td width="100%">
2913      <code>
2914      wait(long arg0)
2915      </code>
2916
2917    </td>
2918  </tr>
2919
2920
2921
2922  <tr class="api apilevel-" >
2923
2924
2925    <td><code>
2926
2927
2928
2929        final
2930
2931        void</code>
2932    </td>
2933
2934    <td width="100%">
2935      <code>
2936      wait()
2937      </code>
2938
2939    </td>
2940  </tr>
2941
2942
2943
2944    </table>
2945  </div>
2946</div>
2947</td></tr>
2948
2949
2950</table>
2951
2952
2953
2954<!-- XML Attributes -->
2955
2956
2957<!-- Enum Values -->
2958
2959
2960<!-- Constants -->
2961
2962
2963<!-- Fields -->
2964
2965
2966<!-- Public ctors -->
2967
2968
2969<!-- ========= CONSTRUCTOR DETAIL ======== -->
2970<h2 class="api-section">Public constructors</h2>
2971
2972
2973
2974<A NAME="AndroidJUnitRunner()"></A>
2975
2976<div class="api apilevel-">
2977    <h3 class="api-name">AndroidJUnitRunner</h3>
2978    <div class="api-level">
2979      <div></div>
2980
2981
2982
2983    </div>
2984<pre class="api-signature no-pretty-print">
2985AndroidJUnitRunner ()</pre>
2986
2987
2988
2989
2990  <p></p>
2991
2992</div>
2993
2994
2995
2996
2997
2998<!-- ========= CONSTRUCTOR DETAIL ======== -->
2999<!-- Protected ctors -->
3000
3001
3002
3003<!-- ========= METHOD DETAIL ======== -->
3004<!-- Public methdos -->
3005
3006<h2 class="api-section">Public methods</h2>
3007
3008
3009
3010<A NAME="finish(int, android.os.Bundle)"></A>
3011
3012<div class="api apilevel-">
3013    <h3 class="api-name">finish</h3>
3014    <div class="api-level">
3015      <div></div>
3016
3017
3018
3019    </div>
3020<pre class="api-signature no-pretty-print">
3021void finish (int resultCode,
3022                Bundle results)</pre>
3023
3024
3025
3026
3027  <p>Ensures all activities launched in this instrumentation are finished before the
3028 instrumentation exits.
3029 <p>
3030 Subclasses who override this method should do their finish processing and then call
3031 super.finish to invoke this logic. Not waiting for all activities to finish() before exiting
3032 can cause device wide instability.
3033 </p>
3034</p>
3035    <table class="responsive">
3036    <tr><th colspan=2>Parameters</th></tr>
3037      <tr>
3038        <td><code>resultCode</code></td>
3039        <td width="100%">
3040          <code>int</code>
3041          <!-- no parameter comment --></td>
3042      </tr>
3043      <tr>
3044        <td><code>results</code></td>
3045        <td width="100%">
3046          <code>Bundle</code>
3047          <!-- no parameter comment --></td>
3048      </tr>
3049    </table>
3050
3051</div>
3052
3053
3054<A NAME="onCreate(android.os.Bundle)"></A>
3055
3056<div class="api apilevel-">
3057    <h3 class="api-name">onCreate</h3>
3058    <div class="api-level">
3059      <div></div>
3060
3061
3062
3063    </div>
3064<pre class="api-signature no-pretty-print">
3065void onCreate (Bundle arguments)</pre>
3066
3067
3068
3069
3070  <p>Sets up lifecycle monitoring, and argument registry.
3071 <p>
3072 Subclasses must call up to onCreate(). This onCreate method does not call start()
3073 it is the subclasses responsibility to call start if it desires.
3074 </p>
3075</p>
3076    <table class="responsive">
3077    <tr><th colspan=2>Parameters</th></tr>
3078      <tr>
3079        <td><code>arguments</code></td>
3080        <td width="100%">
3081          <code>Bundle</code>
3082          <!-- no parameter comment --></td>
3083      </tr>
3084    </table>
3085
3086</div>
3087
3088
3089<A NAME="onException(java.lang.Object, java.lang.Throwable)"></A>
3090
3091<div class="api apilevel-">
3092    <h3 class="api-name">onException</h3>
3093    <div class="api-level">
3094      <div></div>
3095
3096
3097
3098    </div>
3099<pre class="api-signature no-pretty-print">
3100boolean onException (Object obj,
3101                Throwable e)</pre>
3102
3103
3104
3105
3106  <p></p>
3107    <table class="responsive">
3108    <tr><th colspan=2>Parameters</th></tr>
3109      <tr>
3110        <td><code>obj</code></td>
3111        <td width="100%">
3112          <code>Object</code>
3113          <!-- no parameter comment --></td>
3114      </tr>
3115      <tr>
3116        <td><code>e</code></td>
3117        <td width="100%">
3118          <code>Throwable</code>
3119          <!-- no parameter comment --></td>
3120      </tr>
3121    </table>
3122    <table class="responsive">
3123      <tr><th colspan=2>Returns</th></tr>
3124      <tr>
3125        <td><code>boolean</code></td>
3126        <td width="100%"><!-- no returns description in source --></td>
3127      </tr>
3128    </table>
3129
3130</div>
3131
3132
3133<A NAME="onStart()"></A>
3134
3135<div class="api apilevel-">
3136    <h3 class="api-name">onStart</h3>
3137    <div class="api-level">
3138      <div></div>
3139
3140
3141
3142    </div>
3143<pre class="api-signature no-pretty-print">
3144void onStart ()</pre>
3145
3146
3147
3148
3149  <p>This implementation of onStart() will guarantee that the Application's onCreate method
3150 has completed when it returns.
3151 <p>
3152 Subclasses should call super.onStart() before executing any code that touches the application
3153 and it's state.
3154 </p>
3155</p>
3156
3157</div>
3158
3159
3160
3161
3162
3163<!-- ========= METHOD DETAIL ======== -->
3164
3165
3166
3167<!-- ========= END OF CLASS DATA ========= -->
3168
3169</div><!-- end jd-content -->
3170
3171
3172
3173<div class="data-reference-resources-wrapper">
3174
3175  <ul data-reference-resources>
3176
3177
3178
3179    <li><h2>Classes</h2>
3180      <ul>
3181          <li class="api apilevel-"><a href="/reference/android/support/test/runner/AndroidJUnit4.html">AndroidJUnit4</a></li>
3182          <li class="selected api apilevel-"><a href="/reference/android/support/test/runner/AndroidJUnitRunner.html">AndroidJUnitRunner</a></li>
3183          <li class="api apilevel-"><a href="/reference/android/support/test/runner/MonitoringInstrumentation.html">MonitoringInstrumentation</a></li>
3184          <li class="api apilevel-"><a href="/reference/android/support/test/runner/MonitoringInstrumentation.ActivityFinisher.html">MonitoringInstrumentation.ActivityFinisher</a></li>
3185          <li class="api apilevel-"><a href="/reference/android/support/test/runner/UsageTrackerFacilitator.html">UsageTrackerFacilitator</a></li>
3186      </ul>
3187    </li>
3188
3189
3190
3191  </ul>
3192
3193</div>
3194
3195
3196
3197</body>
3198</html>
3199