Skip to content

Very simple and modern implementation, it lacks tests and extra functionality at this moment but i'm working on it.

License

Notifications You must be signed in to change notification settings

Angopapo/ParseLiveQuery

 
 

Repository files navigation

Jit Pack

Parse LiveQuery Implementation for Android

Simple ParseLiveQuery with subscribe, unsubscribe and listen events. Based on ParseLiveQuery

Import guide

dependencies {
    compile 'com.github.tgio:parse-livequery:1.0.3'
}

Server-Setup

  1. Make sure u have node and npm installed.
  2. cd Server && npm install
  3. node server.js

Usage

//Do initialization, for example in App.java
LiveQueryClient.init(WS_URL, MY_APP_ID, true);

//Connect
LiveQueryClient.connect();

//Subscribe for parse object "Message" where "body" equals "asd" and include "body" field in response

//  Subscription
final Subscription subscription = new BaseQuery.Builder("Message")
      .where("body", "asd")
      .addField("body")
      .build()
      .subscribe();

//  Listen
subscription.on(LiveQueryEvent.CREATE, new OnListener() {
  @Override
  public void on(final JSONObject object) {
      Log.e("CREATED", object.toString());
  }
});

//  Unsubscribe
//subscription.unsubscribe();

Contributors

[Khirr] (https://github.com/khirr)

About

Very simple and modern implementation, it lacks tests and extra functionality at this moment but i'm working on it.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 93.8%
  • JavaScript 5.0%
  • Shell 1.2%