Lines Matching full:your
53 The sync adapter component in your app encapsulates the code for the tasks that transfer
55 your app, the sync adapter framework runs the code in the sync adapter component. To add a
56 sync adapter component to your app, you need to add the following pieces:
62 A class that wraps your data transfer code in an interface compatible with the sync adapter
69 A component that allows the sync adapter framework to run the code in your sync adapter
76 A file containing information about your sync adapter. The framework reads this file to
77 find out how to load and schedule your data transfer.
100 constructors to run setup tasks each time your sync adapter component is created from
102 activity. For example, if your app uses a content provider to store data, use the constructors
133 * If your app uses a content resolver, get an instance of it
150 * If your app uses a content resolver, get an instance of it
160 encapsulates your data transfer code, so that the sync adapter framework can run the
161 data transfer in the background, without involvement from your app. When the framework is ready
162 to sync your application's data, it invokes your implementation of the method
166 To facilitate the transfer of data from your main app code to the sync adapter component,
177 the sync adapter. If your server doesn't use accounts, you don't need to use the
191 The authority of a content provider in the system. Your app has to have access to
192 this provider. Usually, the authority corresponds to a content provider in your own app.
202 for your app, you can connect to the provider with this object. Otherwise, you can ignore
221 * up your own background processing.
239 your app's data synchronization requirements and server connection protocols, there are a few
240 general tasks your implementation should perform:
247 Although you can assume that the network is available when your data transfer starts, the
258 the necessary upload request. You also have to handle network errors that occur while your
267 the data on the device, or vice versa. Instead, you have to provide your own algorithms for
275 your data transfer.
281 background thread, so you don't have to set up your own background processing.
284 In addition to your sync-related tasks, you should try to combine your regular
287 By concentrating all of your network tasks in this method, you conserve the battery power that's
291 tasks you can include in your data transfer code.
295 You now have your data transfer code encapsulated in a sync adapter component, but you have
296 to provide the framework with access to your code. To do this, you need to create a bound
303 Instantiate your sync adapter component as a singleton in the
306 creating it until the service starts, which happens when the framework first tries to run your
308 adapter framework queues up multiple executions of your sync adapter in response to triggers or
313 bound {@link android.app.Service}, instantiates your sync adapter component, and gets the
376 {@link android.support.v4.app.FragmentActivity#onCreate onCreate()} method of your app's
422 * in your <provider> element in the manifest,
438 To plug your sync adapter component into the framework, you need to provide the framework
440 the account type you've created for your sync adapter, declares a content provider authority
441 associated with your app, controls a part of the system user interface related to sync adapters,
443 the {@code /res/xml/} directory in your app project. You can give any name to the file,
453 The URI authority for your content provider. If you created a stub content provider for
454 your app in the previous lesson <a href="creating-stub-provider.html"
459 ><provider></a></code> element you added to your app manifest. This attribute is
464 If you're transferring data from a content provider to a server with your sync adapter, this
469 ><provider></a></code> element that declares your provider in your app manifest.
489 <b>Accounts</b> section of the system's Settings app, so you should make your sync
491 with your app. If you make your account type invisible, you can still allow users to
492 control your sync adapter with a user interface in one of your app's activities.
498 Allows you to upload data to the cloud. Set this to {@code false} if your app only
505 Allows multiple instances of your sync adapter component to run at the same time.
506 Use this if your app supports multiple user accounts and you want to allow multiple
514 Indicates to the sync adapter framework that it can run your sync adapter at any
515 time you've specified. If you want to programmatically control when your sync
542 Once you've added the sync adapter component to your app, you have to request permissions
548 device, you need to request permission to access the Internet. In addition, your app needs
550 adapter programmatically from other components in your app. You also need to request a
551 special permission that allows your app to use the authenticator component you created
555 To request these permissions, add the following to your app manifest as child elements of
571 Allows your app to read the current sync adapter settings. For example, you need this
579 Allows your app to control sync adapter settings. You need this permission in order to
606 interact with your sync adapter, add the following XML to your app manifest as a child element
630 allows processes other than your app (including the system) to access the
634 {@code sync}. If you have multiple sync adapters in your app they can share this process,
648 You now have all of the components for your sync adapter. The next lesson shows you how to
649 tell the sync adapter framework to run your sync adapter, either in response to an event or on