Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,14 @@ implementation 'org.mongodb:stitch-server-services-twilio:4.1.3'

1. In Android Studio, go to Tools, Android, AVD manager.
2. Click Create Virtual Device.
3. Select a device that should run your app (the default is fine).
3. Select a device that should run your app (as of Android Studio 3.2, the default device does not work properly for this purpose).
4. Select and download a recommended system image of your choice (the latest is fine).
* x86_64 images are available in the x86 tab.
* This device must use a system image built on an architecture supported by the
```libmongo``` library, e.g. x86_64
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* x86 images are unsupported
* x86_64 images are available in the x86 tab.
* The current minimum Android API version: 21
* Please consult the the [MongoDB Mobile Documentation](https://docs.mongodb.com/stitch/mongodb/mobile/getting-started/) for more information about minimum device requirements.
5. Name your device and hit finish.

#### Using the SDK
Expand Down
13 changes: 12 additions & 1 deletion contrib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,15 @@ The general publishing flow can be followed using `minor` as the bump type in `b

### Major Versions

The general publishing flow can be followed using `major` as the bump type in `bump_version`. In addition to this, the release on GitHub should be edited for a more readable format of key changes and include any migration steps needed to go from the last major version to this one.
The general publishing flow can be followed using `major` as the bump type in `bump_version`. In addition to this, the release on GitHub should be edited for a more readable format of key changes and include any migration steps needed to go from the last major version to this one.

### Testing (MongoDB Internal Contributors Only)

* Before committing, the ```connectedDebugAndroidTest``` suite of integration tests must succeed.
* The tests require the following setup:
* You must enable clear text traffic in the core Android application locally (**do not commit this change**)
* In file *android/core/src/main/AndroidManifest.xml*, change the ```application``` XML tag as follows:
```<application android:usesCleartextTraffic="true">```
* You must run at least one ```mongod``` instance with replica sets initiated or a ```mongos``` instance with same locally on port 27000
* You must run the Stitch server locally using the Android-specific configuration:
```--configFile ./etc/configs/test_config_sdk_base.json --configFile ./etc/configs/test_config_sdk_android.json```
Original file line number Diff line number Diff line change
Expand Up @@ -432,22 +432,6 @@ public void close() {

// ---- Core Synchronization Logic -----

private boolean localToRemoteFirst = false;

/**
* Swaps which sync direction comes first. Note: this should only be used for testing purposes.
*
* @param localToRemoteFirst whether or not L2R should go first.
*/
public void swapSyncDirection(final boolean localToRemoteFirst) {
syncLock.lock();
try {
this.localToRemoteFirst = localToRemoteFirst;
} finally {
syncLock.unlock();
}
}

/**
* Performs a single synchronization pass in both the local and remote directions; the order
* of which does not matter. If switching the order produces different results after one pass,
Expand Down Expand Up @@ -485,13 +469,8 @@ public boolean doSyncPass() {
return false;
}

if (localToRemoteFirst) {
syncLocalToRemote();
syncRemoteToLocal();
} else {
syncRemoteToLocal();
syncLocalToRemote();
}
syncRemoteToLocal();
syncLocalToRemote();

logger.info(String.format(
Locale.US,
Expand Down
Loading