delight-im / Android-DDP

[UNMAINTAINED] Meteor's Distributed Data Protocol (DDP) for clients on Android
Apache License 2.0
274 stars 54 forks source link

Meteor 1.4.0.1 #108

Closed proft closed 8 years ago

proft commented 8 years ago

Hi!

Is it compatible with Meteor 1.4.0.1?

I have simple app and in log I see only "NO" ...

public class MainActivity extends AppCompatActivity implements MeteorCallback {

    private Meteor mMeteor;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        mMeteor = new Meteor(this, "ws://localhost:3000/websocket");
        mMeteor.addCallback(this);
        mMeteor.connect();

        Log.i("IDDP", mMeteor.isConnected() ? "YES" : "NO");

        String subscriptionId = mMeteor.subscribe("Messages");
        Map<String, Object> values = new HashMap<String, Object>();
        values.put("message", "ANDROID");
        values.put("from", "ANDROID");
        mMeteor.insert("Messages", values);
    }

    public void onConnect(boolean signedInAutomatically) {
        Log.i("IDDP", "CONNECTED!");
    }
    ...
}
proft commented 8 years ago

Tested on 1.4.0.1 and 1.3.3.1.

proft commented 8 years ago

I tested on localhost and set wrong connection url. In my case correct url was 192.168.1.x.

ocram commented 8 years ago

Thanks, @proft!

This library should work with all existing Meteor versions to date.