Giter VIP home page Giter VIP logo

modi-sdk-android's Introduction

modi-sdk-android

===============

distribution

Easy😆 and fast💨 MODI SDK API.

Quickstart

Install the latest MODI SDK API if you haven't installed it yet

Add it in your root build.gradle at the end of repositories:

allprojects {
        repositories {
                ...
                maven { url 'https://jitpack.io' }
        }
}

Add the dependency

dependencies {
        implementation 'com.github.LUXROBO:modi-sdk-android:0.1.1'
        implementation 'com.polidea.rxandroidble2:rxandroidble:1.11.1'
}

Import com.luxrobo.modisdk package and create ModiManager Object::

import com.luxrobo.modisdk.core.ModiManager
...
...
private ModiManager mModiManager = ModiManager.getInstance()

Initialize ModiManager

var mModiManager = ModiManager().init(context, mModiClient)

private val mModiClient = object : ModiClient {

    override fun stopScan() {
    
    }
    
    override fun onScan() {
    
    }
    
    override fun onScanFailure() {
    
    }
    
    override fun onFoundDevice(bleScanResult : ScanResult) {
    
    }
    
    override fun onDiscoveredService() {
    
    }
    
    override fun onDiscoverServiceFailure() {
    
    }
    
    override fun onConnecting() {
    
    }
    
    override fun onConnected() {
    
    }
    
    override fun onConnectionFailure(e : Throwable) {
    
    }
    
    override fun onDisconnected() {
    
    }
    
    override fun onReceivedData(data: String) {
    
    }
    
    override fun onReceivedData(data: ByteArray) {
    
    }
    
    override fun onOffEvent() {
    
    }
    
    override fun disconnectedByModulePowerOff() {
     
    }
}

Scan and Connect::

mModiManager.scan()
...
...
mModiManager.connect(deviceAddress)

modi-sdk-android's People

Contributors

kstlove avatar brooks-o avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

modi-sdk-android's Issues

Modi module multi conect support

Is your feature request related to a problem? Please describe.
�모디의 다중 연결 지원

Describe the solution you'd like
모디 모듈들의 다중 목록 연결을 위한 리스트 관리

Describe alternatives you've considered
네트워크 모듈은 제외

Additional context

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.