Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level
24](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Ctors](https://developer.android.com/reference/android/test/SyncBaseInstrumentation#pubctors) \| [Protected Methods](https://developer.android.com/reference/android/test/SyncBaseInstrumentation#promethods) \| [Inherited Methods](https://developer.android.com/reference/android/test/SyncBaseInstrumentation#inhmethods)

# SyncBaseInstrumentation

*** ** * ** ***


`
public


class
SyncBaseInstrumentation
`


`


`

`

extends https://developer.android.com/reference/android/test/InstrumentationTestCase


`

`


`

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) |||
| ↳ | [android.test.InstrumentationTestCase](https://developer.android.com/reference/android/test/InstrumentationTestCase) ||
|   | ↳ | android.test.SyncBaseInstrumentation |

<br />

*** ** * ** ***


**This class was deprecated
in API level 24.**   

Use
[InstrumentationRegistry](https://developer.android.com/reference/android/support/test/InstrumentationRegistry) instead. New tests should be written using the
[Android Testing Support Library](https://developer.android.com/tools/testing-support-library).

If you would like to test sync a single provider with an
`https://developer.android.com/reference/android/test/InstrumentationTestCase`, this provides some of the boiler plate in `https://developer.android.com/reference/android/test/SyncBaseInstrumentation#setUp()` and
`https://developer.android.com/reference/android/test/InstrumentationTestCase#tearDown()`.

## Summary

| ### Public constructors ||
|---|---|
| ` https://developer.android.com/reference/android/test/SyncBaseInstrumentation#SyncBaseInstrumentation()() ` |

| ### Protected methods ||
|---|---|
| ` void` | ` https://developer.android.com/reference/android/test/SyncBaseInstrumentation#cancelSyncsandDisableAutoSync()() ` |
| ` void` | ` https://developer.android.com/reference/android/test/SyncBaseInstrumentation#setUp()() ` |
| ` void` | ` https://developer.android.com/reference/android/test/SyncBaseInstrumentation#syncProvider(android.net.Uri,%20java.lang.String,%20java.lang.String)(https://developer.android.com/reference/android/net/Uri uri, https://developer.android.com/reference/java/lang/String accountName, https://developer.android.com/reference/java/lang/String authority) ` Syncs the specified provider. |

| ### Inherited methods |
|---|---|
| From class ` https://developer.android.com/reference/android/test/InstrumentationTestCase ` |---|---| | ` https://developer.android.com/reference/android/app/Instrumentation` | ` https://developer.android.com/reference/android/test/InstrumentationTestCase#getInstrumentation()() ` Inheritors can access the instrumentation using this. | | ` void` | ` https://developer.android.com/reference/android/test/InstrumentationTestCase#injectInsrumentation(android.app.Instrumentation)(https://developer.android.com/reference/android/app/Instrumentation instrumentation) ` *This method was deprecated in API level 15. Incorrect spelling, use `https://developer.android.com/reference/android/test/InstrumentationTestCase#injectInstrumentation(android.app.Instrumentation)` instead.* | | ` void` | ` https://developer.android.com/reference/android/test/InstrumentationTestCase#injectInstrumentation(android.app.Instrumentation)(https://developer.android.com/reference/android/app/Instrumentation instrumentation) ` Injects instrumentation into this test case. | | ` final <T extends https://developer.android.com/reference/android/app/Activity> T` | ` https://developer.android.com/reference/android/test/InstrumentationTestCase#launchActivity(java.lang.String,%20java.lang.Class<T>,%20android.os.Bundle)(https://developer.android.com/reference/java/lang/String pkg, https://developer.android.com/reference/java/lang/Class<T> activityCls, https://developer.android.com/reference/android/os/Bundle extras) ` Utility method for launching an activity. | | ` final <T extends https://developer.android.com/reference/android/app/Activity> T` | ` https://developer.android.com/reference/android/test/InstrumentationTestCase#launchActivityWithIntent(java.lang.String,%20java.lang.Class<T>,%20android.content.Intent)(https://developer.android.com/reference/java/lang/String pkg, https://developer.android.com/reference/java/lang/Class<T> activityCls, https://developer.android.com/reference/android/content/Intent intent) ` Utility method for launching an activity with a specific Intent. | | ` void` | ` https://developer.android.com/reference/android/test/InstrumentationTestCase#runTest()() ` Runs the current unit test. | | ` void` | ` https://developer.android.com/reference/android/test/InstrumentationTestCase#runTestOnUiThread(java.lang.Runnable)(https://developer.android.com/reference/java/lang/Runnable r) ` Helper for running portions of a test on the UI thread. | | ` void` | ` https://developer.android.com/reference/android/test/InstrumentationTestCase#sendKeys(int[])(int... keys) ` Sends a series of key events through instrumentation and waits for idle. | | ` void` | ` https://developer.android.com/reference/android/test/InstrumentationTestCase#sendKeys(java.lang.String)(https://developer.android.com/reference/java/lang/String keysSequence) ` Sends a series of key events through instrumentation and waits for idle. | | ` void` | ` https://developer.android.com/reference/android/test/InstrumentationTestCase#sendRepeatedKeys(int[])(int... keys) ` Sends a series of key events through instrumentation and waits for idle. | | ` void` | ` https://developer.android.com/reference/android/test/InstrumentationTestCase#tearDown()() ` Make sure all resources are cleaned up and garbage collected before moving on to the next test. | ||
| From class ` https://developer.android.com/reference/java/lang/Object ` |---|---| | ` https://developer.android.com/reference/java/lang/Object` | ` https://developer.android.com/reference/java/lang/Object#clone()() ` Creates and returns a copy of this object. | | ` boolean` | ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) ` Indicates whether some other object is "equal to" this one. | | ` void` | ` https://developer.android.com/reference/java/lang/Object#finalize()() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. | | ` final https://developer.android.com/reference/java/lang/Class<?>` | ` https://developer.android.com/reference/java/lang/Object#getClass()() ` Returns the runtime class of this `Object`. | | ` int` | ` https://developer.android.com/reference/java/lang/Object#hashCode()() ` Returns a hash code value for the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notify()() ` Wakes up a single thread that is waiting on this object's monitor. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#notifyAll()() ` Wakes up all threads that are waiting on this object's monitor. | | ` https://developer.android.com/reference/java/lang/String` | ` https://developer.android.com/reference/java/lang/Object#toString()() ` Returns a string representation of the object. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed. | | ` final void` | ` https://developer.android.com/reference/java/lang/Object#wait()() ` Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*. | ||

## Public constructors

### SyncBaseInstrumentation

```
public SyncBaseInstrumentation ()
```

<br />

<br />

## Protected methods

### cancelSyncsandDisableAutoSync

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void cancelSyncsandDisableAutoSync ()
```

<br />

<br />

### setUp

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void setUp ()
```

<br />

<br />

| Throws ||
|---|---|
| `https://developer.android.com/reference/java/lang/Exception` |   |

### syncProvider

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
protected void syncProvider (Uri uri, 
                String accountName, 
                String authority)
```

Syncs the specified provider.

<br />

| Parameters ||
|---|---|
| `uri` | `Uri` <br /> |
| `accountName` | `String` <br /> |
| `authority` | `String` <br /> |

| Throws ||
|---|---|
|   | java.lang.Exception |
| `https://developer.android.com/reference/java/lang/Exception` |   |