kuzzleio / sdk-go

Golang SDK using the WebSocket protocol to communicate with Kuzzle API including offline resiliency
http://docs.kuzzle.io/sdk/go/2
Apache License 2.0
8 stars 5 forks source link

Wrap Listeners for android #195

Closed jenow closed 6 years ago

jenow commented 6 years ago

What does this PR do ?

Wrap NotificationListener, EventListener and SubscribeListener for android. First make each pure virtual methods abstract for Java.. Then wrap JSON type when needed

How should this be manually tested?

Check if it builds:

docker run --rm -it -v "$(pwd)":/go/src/github.com/kuzzleio/sdk-go android-x86 /custom_build.sh

You can then test it in an android project (for x86 for now). Example of a subscribe with NotificationListener:

Kuzzle k = new Kuzzle("kuzzlehost");
k.getRealtime().subscribe("index", "collection", "{}", new NotificationListener() {
    @Override
    public void onMessage(NotificationResult notificationResult) {
        try {
            Log.e("e", notificationResult.getResult().getContent().toString());
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
});
codecov-io commented 6 years ago

Codecov Report

Merging #195 into 1.x will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##              1.x     #195   +/-   ##
=======================================
  Coverage   89.07%   89.07%           
=======================================
  Files         243      243           
  Lines        4376     4376           
=======================================
  Hits         3898     3898           
  Misses        449      449           
  Partials       29       29

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 637a85a...3726fc8. Read the comment docs.