• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

Application/23-Mar-2024-1,859941

buildSrc/23-Mar-2024-1913

gradle/wrapper/23-Mar-2024-65

screenshots/23-Mar-2024-

CONTRIB.mdD23-Mar-20241.6 KiB3627

LICENSED23-Mar-202411.1 KiB204170

README.mdD23-Mar-20242.6 KiB7754

build.gradleD23-Mar-2024259 119

gradlewD23-Mar-20245.2 KiB173128

gradlew.batD23-Mar-20242.2 KiB8561

packaging.yamlD23-Mar-2024498 1610

settings.gradleD23-Mar-202422 21

template-params.xmlD23-Mar-20243.2 KiB9065

README.md

1
2Android BasicSyncAdapter Sample
3===================================
4
5This sample demonstrates using SyncAdapter to fetch background
6data for an app. It covers the creation of the required Service
7that the OS uses to initiate the background data sync as well as
8scheduling syncs with background data.
9
10Introduction
11------------
12
13This sample demonstrates using SyncAdapter to fetch background data
14for an app. SyncAdapters can be used to execute your data transfer
15code at configurable intervals, while efficiently using battery and
16other system resources.
17
18This sample implements all the required elements of a sync adapter.
19- Creates a sync adapter class.
20- Creates a bound Service which the OS uses to initiate a sync.
21- Defines the sync adapter properties in an XML resource file.
22- Declares the bound Service in the app manifest.
23
24For more on SyncAdapters refer to [Transferring Data Using Sync Adapters][1]
25
26[1]: http://developer.android.com/training/sync-adapters/index.html
27
28Pre-requisites
29--------------
30
31- Android SDK 28
32- Android Build Tools v28.0.3
33- Android Support Repository
34
35Screenshots
36-------------
37
38<img src="screenshots/main.png" height="400" alt="Screenshot"/>
39
40Getting Started
41---------------
42
43This sample uses the Gradle build system. To build this project, use the
44"gradlew build" command or use "Import Project" in Android Studio.
45
46Support
47-------
48
49- Google+ Community: https://plus.google.com/communities/105153134372062985968
50- Stack Overflow: http://stackoverflow.com/questions/tagged/android
51
52If you've found an error in this sample, please file an issue:
53https://github.com/googlesamples/android-BasicSyncAdapter
54
55Patches are encouraged, and may be submitted by forking this project and
56submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details.
57
58License
59-------
60
61Copyright 2019 The Android Open Source Project, Inc.
62
63Licensed to the Apache Software Foundation (ASF) under one or more contributor
64license agreements.  See the NOTICE file distributed with this work for
65additional information regarding copyright ownership.  The ASF licenses this
66file to you under the Apache License, Version 2.0 (the "License"); you may not
67use this file except in compliance with the License.  You may obtain a copy of
68the License at
69
70http://www.apache.org/licenses/LICENSE-2.0
71
72Unless required by applicable law or agreed to in writing, software
73distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
74WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
75License for the specific language governing permissions and limitations under
76the License.
77