All Projects → hkurokawa → Rxnearby

hkurokawa / Rxnearby

Licence: apache-2.0
Nearby handling APIs for Android Apps using RxJava

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Rxnearby

Rankmusic
RankMusic音乐排行榜 一个使用kotlin 语言开发的android项目。
Stars: ✭ 30 (-42.31%)
Mutual labels:  rxjava
Weaponapp
一个尽量做到极致的集大成App,努力做到最好(开发阶段)——MVVM+Retrofit+RxJava+Small 插件化+单元测试+MD
Stars: ✭ 1,011 (+1844.23%)
Mutual labels:  rxjava
Meteorite
一个基于Android MVP的简单明了的指引性通用架构,目的是帮助更多的开发者去全面了解实践开发相关的各种技术,快速搭建属于自已的APP。这个项目涉及到如下技术的实际应用:1、MVP 2、网络请求(Novate基于rxjava,okhttp,retrofit封装架构)3、DbFlow(可保存文件入SD卡) 4、6.0权限申请 5、XRecyclerView 6、万能Adapter7、异常处理 8、日志打印 9、屏幕适配 10、代码混淆 11、多渠道打包 12、内存泄露检测 13、热修复 14、升级更新 15、极光推送 工程更新完善中……欢迎关注 @特别感谢ZJ.Y的Logo支持。
Stars: ✭ 49 (-5.77%)
Mutual labels:  rxjava
Android App Template
Kickstart your new project with Android App Template (Kotlin + MVVM + AAC + Dagger 2 + Retrofit 2 + RxJava)
Stars: ✭ 34 (-34.62%)
Mutual labels:  rxjava
Star Wars Shop
Simple project with clean architecture and android lifecycle
Stars: ✭ 37 (-28.85%)
Mutual labels:  rxjava
Graphql Retrofit Converter
A Retrofit 2 Converter.Factory for GraphQL.
Stars: ✭ 46 (-11.54%)
Mutual labels:  rxjava
Elephant
Elephant is PHPHub Community Android unofficial client, base on Material Design + MVP+RxJava+Retrofit .
Stars: ✭ 949 (+1725%)
Mutual labels:  rxjava
Rxsocialauth
Android RxJava library for Social auth (Google, Facebook) and Smart Lock For Passwords
Stars: ✭ 50 (-3.85%)
Mutual labels:  rxjava
Billing Android
RxJava wrapper for Android Play Billing Library
Stars: ✭ 40 (-23.08%)
Mutual labels:  rxjava
Circulerautoscrollingrecyclerview
Sample code of infinite rotation using RecyclerView. Built with Kotlin
Stars: ✭ 48 (-7.69%)
Mutual labels:  rxjava
Rx.observe
Transform any method to an Rx Observable ! (VIPER)
Stars: ✭ 34 (-34.62%)
Mutual labels:  rxjava
Rxschedulerrule
Simple JUnit rule for overriding RxJava/RxAndroid schedulers during unit tests
Stars: ✭ 35 (-32.69%)
Mutual labels:  rxjava
Ethdroid
Easy-to-use Ethereum Geth wrapper for Android
Stars: ✭ 47 (-9.62%)
Mutual labels:  rxjava
Phphub Android
PHPHub for Android
Stars: ✭ 967 (+1759.62%)
Mutual labels:  rxjava
Rxjavaapp
学习RxJava操作符的APP,新增RxJava2.x介绍
Stars: ✭ 1,049 (+1917.31%)
Mutual labels:  rxjava
Statussaver For Whatsapp
A simple app to save Whatsapp Status Images! Developed using MVP, rxJava, Dagger2 etc.
Stars: ✭ 30 (-42.31%)
Mutual labels:  rxjava
Mvvm Kotlin Android Architecture
MVVM + Kotlin + Retrofit2 + Hilt + Coroutines + Kotlin Flow + mockK + Espresso + Junit5
Stars: ✭ 1,014 (+1850%)
Mutual labels:  rxjava
Awesome Android Kotlin Apps
👓 A curated list of awesome android kotlin apps by open-source contributors.
Stars: ✭ 1,058 (+1934.62%)
Mutual labels:  rxjava
Thirtyinch
a MVP library for Android favoring a stateful Presenter
Stars: ✭ 1,052 (+1923.08%)
Mutual labels:  rxjava
Bigbang
Android base project used by Xmartlabs team
Stars: ✭ 47 (-9.62%)
Mutual labels:  rxjava

RxNearby

Nearby handling APIs for Android Apps using RxJava

Download

In your app build.gradle, add

dependencies {
    compile 'com.hkurokawa.rxnearby:rxnearby:1.0.0'
}

Usage

Nearby Messages

Subscribe

You can watch a sequence of the received messages as an Observable.

RxNearby.subscribe(this, statusResolver)
        .subscribe(new Action1<Message>() {
          @Override
          public void call(Message message) {
            // do something
          }
        });

Note you have to provide how to resolve a resolvable status (which means status.hasResolution() returns true) is returned during a sequence of Nearby API calls with the second argument. With this argument, you can specify when the retrial of the subscription should be executed. Internally, it uses Observable.retryWhen() method. See ReactiveX - Retry operator for more information.

final Func1<Status, Observable<Void>> statusResolver = new Func1<Status, Observable<Void>>() {
  @Override
  public Observable<Void> call(Status status) {
    status.startResolutionForResult(MainActivity.this, REQ_RESOLVE_MESSEAGE_API_ERROR);
    return retry;
  }
};

Publish

You have to prepare an Observable which emits Message events. Everytime it emits an event, RxNearby Message Publish API is called.

RxNearby.publish(this, sendMessageSubject, statusResolver)
        .subscribe(new Action1<PublishResult>() {
          @Override
          public void call(PublishResult publishResult) {
            // do something
          }
        });

Nearby Connections

T. B. D.

Sample

A sample app. to do a simple publish/subject task is under /rxnearby-sample

rxnearby-sample

License

Copyright (C) 2015 Hiroshi Kurokawa

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.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].