florent37 / Wear-Emmet

Emmet is an protocol based data-transfer for Android Wear
http://florent37.github.io/Emmet
Apache License 2.0
41 stars 11 forks source link

Emmet

Android Arsenal Join the chat at https://gitter.im/florent37/Emmet

Alt wearprotocol

Emmet is an protocol based data-transfer for Android Wear

Usage

1/ Declare your protocols into interfaces

public interface WearProtocol{
    public void sendMyObject(MyObject object);
}

2/ Use Emmet to send data to the Wear

WearProtocol wearProtocol = emmet.createSender(WearProtocol.class);
wearProtocol.sendMyObject(myObject);

3/ Receive the data in Wear

emmet.registerReceiver(WearProtocol.class, new WearProtocol() {
    @Override
    public void sendMyObject(MyObject object) {
        /* Do whatever you want with the object */
    }
});

Please take a look to the wiki

Sample

Take a look to a fully sample app using Emmet and DaVinci : https://github.com/florent37/Potier

Import

Create a new library module, for example wearprotocol

Import wearprotocol into your wear & smartphone modules

dependencies {
    compile project(':wearprotocol')
}

In the module wearprotocol import emmet

Download

dependencies {
    compile ("com.github.florent37:emmet:1.0.6@aar"){
        transitive=true
    }
}

Alt wearprotocol

Community

Looking for contributors, feel free to fork !

Wear

If you want to learn wear development : http://tutos-android-france.com/developper-une-application-pour-les-montres-android-wear/.

Dependencies

Credits

Author: Florent Champigny

<img alt="Follow me on Google+" src="https://raw.githubusercontent.com/florent37/DaVinci/master/mobile/src/main/res/drawable-hdpi/gplus.png" /> <img alt="Follow me on Twitter" src="https://raw.githubusercontent.com/florent37/DaVinci/master/mobile/src/main/res/drawable-hdpi/twitter.png" /> <img alt="Follow me on LinkedIn" src="https://raw.githubusercontent.com/florent37/DaVinci/master/mobile/src/main/res/drawable-hdpi/linkedin.png" />

License

Copyright 2015 florent37, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.