Skip to content

Most visited

Recently visited

navigation
added in API level 1
Deprecated since API level 24

SyncBaseInstrumentation

public class SyncBaseInstrumentation
extends InstrumentationTestCase

java.lang.Object
   ↳ junit.framework.Assert
     ↳ junit.framework.TestCase
       ↳ android.test.InstrumentationTestCase
         ↳ android.test.SyncBaseInstrumentation


This class was deprecated in API level 24.
Use InstrumentationRegistry instead. New tests should be written using the Android Testing Support Library.

If you would like to test sync a single provider with an InstrumentationTestCase, this provides some of the boiler plate in setUp() and tearDown().

Summary

Public constructors

SyncBaseInstrumentation()

Protected methods

void cancelSyncsandDisableAutoSync()
void setUp()

Sets up the fixture, for example, open a network connection.

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

Syncs the specified provider.

Inherited methods

Public constructors

SyncBaseInstrumentation

added in API level 1
SyncBaseInstrumentation ()

Protected methods

cancelSyncsandDisableAutoSync

added in API level 1
void cancelSyncsandDisableAutoSync ()

setUp

added in API level 1
void setUp ()

Sets up the fixture, for example, open a network connection. This method is called before a test is executed.

Throws
Exception

syncProvider

added in API level 1
void syncProvider (Uri uri, 
                String accountName, 
                String authority)

Syncs the specified provider.

Parameters
uri Uri

accountName String

authority String

Throws
Exception
This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience. (April 2018 — Developer Survey)