Switch branches/tags
Nothing to show
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

Google Drive Android API Conflict Sample

This application demonstrates how to resolve remote conflicts using the Google Android Drive API. Keep in mind the default behavior is to overwrite the server content with the local content when a conflict arises. Please read the conflict strategy documentation when choosing to override this capability. This application uses the CONFLICT_STRATEGY_KEEP_REMOTE option to allow the remote app (not the server) to manage the conflict.

Set Up

  1. Install the Android SDK.
  2. Download and configure the Google Play services SDK, which includes the Google Drive Android API.
  3. Create Google API Console project and/or enable the Drive API for an existing project.
  4. Register an OAuth 2.0 client for the package 'com.google.android.gms.drive.sample.conflict' with your own debug keys. See full instructions in the Getting Started guide.
  5. Build and install the app on 2 devices or emulators. If using Android Studio, install the app individually on each emulator then use the AVD Manager to run both emulators simultaneously. Be sure to select Android images that have the Play Store enabled.

Run the Demo

Launch the application on both devices. Both apps should like this with no items listed. Home Screen

Add an item to the first device's list and hit 'Update List'. Item Screen

The second device should then show the item. Now add items on the second device's list. After updating the list, both devices should show the merge lists. Resolved Screen