Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rxWear quite simply NOT WORKING #10

Open
thoughtcastdavid opened this issue Oct 12, 2018 · 3 comments
Open

rxWear quite simply NOT WORKING #10

thoughtcastdavid opened this issue Oct 12, 2018 · 3 comments

Comments

@thoughtcastdavid
Copy link

I tried making a basic app that sends small data to my wear app, and my wear app should just Log.d "ok..." to see if the data was received.

It does not:

here is my wear app;

  RxWear rxWear = new RxWear(this);

        Log.d("MEx", "  ok  ! ");

        rxWear.message().listen("/dataMap", MessageApi.FILTER_LITERAL)
                .compose(MessageEventGetDataMap.noFilter())
                .subscribe(dataMap -> {

                    Log.d("MEx", " lol " );

                });

That is the relevant code.

Here is what I do in my mobile app:


 public void sendPoint(Point b)
    {


        long[] pointz = new long[3];

        pointz[0] = b.x;
        pointz[1] = b.y;

        rxWear.message().sendDataMapToAllRemoteNodes("/dataMap")
                .putString("title", "Title")
                .putLongArray("point", pointz)
                .toObservable()
                .subscribe(requestId -> {
                    /* do something */
                });




    }

What am I doing wrong?!!

@MarkerwApk
Copy link

try add :
pointz[2] = System.currentTimeMillis();
Source

@thoughtcastdavid
Copy link
Author

Still no.

@thoughtcastdavid
Copy link
Author

Update:

I changed my Wear app to this:

rxWear.data().listen("/dataMap", DataApi.FILTER_PREFIX).subscribe(dataEvent -> { Log.d("MEx", " test tt");});

and my Mobile app to this:

        long[] pointz = new long[3];

        pointz[0] = b.x;
        pointz[1] = b.y;
        pointz[2] = System.currentTimeMillis();

        rxWear.data().putDataMap().to("/dataMap").putLongArray("point", pointz);

I think im getting close...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants