Bot releases are hidden (Show)
Published by adamchel over 5 years ago
watch
in RemoteMongoCollection
.
$match
filter.Published by adamchel over 5 years ago
Published by adamchel over 5 years ago
NOTE: This release has breaking changes for the MongoDB Mobile Sync Beta
configure
on a Sync
, the ChangeEventListener
will no longer guarantee that the ChangeEvent
will have a non-null result for getFullDocument()
if the OperationType
is UPDATE
.configure
on a Sync
, the signature for ConflictHandler#resolveConflict has changed:
ConflictResolution
. See the documentation for ConflictResolution for more information.resolveConflict
is now a CompactChangeEvent
, to reflect the type of event received from the server. This means that when the remote event is an UPDATE
, getFullDocument()
will always return null
.Published by adamchel over 5 years ago
watch
streams to fail to open.Published by dkaminsky over 5 years ago
findOne,
findOneAndReplace,
findOneAndUpdate,
findOneAndDelete
operationsPublished by adamchel over 5 years ago
configure
, syncOne
, syncMany
, desyncOne
, desyncMany
, getSyncedIds
, getPausedDocumentIds
, and resumeSyncForDocument
are now asynchronous and return a Task
. This is to prevent accidentally freezing the UI on sync tasks.configure
, syncOne
, syncMany
, desyncOne
, and desyncMany
does not need to change, since the they return Task<Void>
. A completion listener can be added if you would like to react to configuration completing, or a document being configured as synced, but it is not necessary.getSyncedIds
, getPausedDocumentIds
, and resumeSyncForDocument
must be called with a completion listener, or Tasks.await
to use the result.Published by dkaminsky over 5 years ago
watch
remote collectionsPublished by edaniels almost 6 years ago
This release addresses some dependency vulnerabilities:
Published by adamchel almost 6 years ago
Published by edaniels almost 6 years ago
In this release we have released the beta of Stitch Mobile Sync! Documentation to follow shortly.
Published by adamchel about 6 years ago
org.mongodb:stitch-android-services-aws
org.mongodb:stitch-server-services-aws
Published by jsflax over 6 years ago
StitchClient
can longer be constructed directly. Instead, StitchClientFactory
has been introduced to asynchronously perform any initialization steps needed to create a StitchClient
. StitchClientFactory
has a function called create
that will return a Task
that will resolve with a StitchClient
after initialization. The resolved client should be used for the lifetime of the application.
// old, 2.x.x usage
import com.mongodb.stitch.android.StitchClient;
void init() {
StitchClient stitchClient = StitchClient(appId: "<app-id>");
stitchClient.logInWithProvider(new AnonymousAuthProvider())
.addOnSuccessListener(new OnSuccessListener<String>() {
@Override
public void onSuccess(String userId) {
Log.d("MyApp", userId);
}
});
}
// new, 3.x.x usage
import com.mongodb.stitch.android.StitchClientFactory;
StitchClient stitchClient = null;
void init() {
StitchClientFactory.create(context, "<appId>")
.continueWith(new Continuation<StitchClient, Task<String>>() {
@Override
public Task<String> then(@NonNull Task<StitchClient> task) throws Exception {
stitchClient = task.getResult();
return stitchClient.logInWithProvider(new AnonymousAuthProvider());
}
}).addOnSuccessListener(new OnSuccessListener<Task<String>>() {
@Override
public void onSuccess(Task<String> userIdTask) {
initializeApp(stitchClient);
}
});
}
Since the StitchClient
is only available after the Task resolves, initialization of an app should be deferred until this time and the client reference should be passed to some initialization component/function.
NOTE: Attempting to construct a StitchClient
without using StitchClientFactory
will result in an error being thrown.
Previously, logging in with a provider while already logging caused no log in to happen which proved to be confusing. These new semantics are in effect:
isAuthenticated()
method to the StitchClient
class. This method should be used to check if any authentication work needs to happen. It returns a boolean declaring whether or not the current client is authenticated.