Realm Cloud Add Initial Data


Is there any extra steps needed to setup Realm Cloud that is different from self-hosted ROS. I am trying to add initial data from Android to Realm Cloud without success. I can see that the data is added locally but not on the cloud. The actual method that adds the data is a simple Realm Transaction that has been used numerous times to add initial data to self-hosted ROS.

Here is a the simple attempt to seed Realm cloud, with an existing user account.

public class MainActivity extends AppCompatActivity {

    private static final String INSTANCE_ADDRESS = "";
    public static final String AUTH_URL = "https://" + INSTANCE_ADDRESS + "/auth";
    public static final String REALM_URL = "realms://" + INSTANCE_ADDRESS;

    public static final String TAG = "MainActivity";
    private Realm realm;

    protected void onCreate(Bundle savedInstanceState) {

        SyncUser user = SyncUser.currentUser();
        if (user != null){
        } else {

  private void loginAnonymously() {
        SyncUser.loginAsync(SyncCredentials.usernamePassword("[email protected]",
                "fancypwd", false), AUTH_URL, new SyncUser.Callback<SyncUser>() {
            public void onSuccess(SyncUser user) {
                Log.d(TAG, "Login succeeded")

            public void onError(ObjectServerError error) {
                Log.d(TAG, error.getErrorMessage());

    private Realm setUpRealm() {
        Log.d(TAG, "setUpRealm");
        SyncConfiguration configuration = new SyncConfiguration.Builder(
                INSTANCE_ADDRESS + "/posts").build();
        Realm realm = Realm.getInstance(configuration);

        return realm;

    private void loadIntialData() {
        Log.d(TAG, "loadIntialData");
        realm = setUpRealm();

Sync is enabled in gradle file and I am using classpath “io.realm:realm-gradle-plugin:5.0.0-BETA1”

What step am I missing?


The ROS instance running in cloud is based on the current stable version of ROS which is incompatible with the beta version of the Java SDK. If you downgrade the Java SDK to a stable version, you should be able to get things to sync.


Thank you, that worked. Its interesting the demo app for Cloud is using beta.