Skip to content
Bind and Unbind custom everyone events with everyone arguments method in everywhere
Java
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/main
.gitignore
README.md
build.gradle
proguard-rules.pro

README.md

WindHotspot for Android

Bind and Unbind custom everyone events with everyone arguments method in everywhere

Maven

<dependency>
  <groupId>xyz.windjs.android</groupId>
  <artifactId>WindHotspot</artifactId>
  <version>0.0.1</version>
  <type>pom</type>
</dependency>

Gradle

repositories {
  jcenter()
}
dependencies {
  compile 'xyz.windjs.android:WindHotspot:0.0.1'
}

Init for use it

WindHotspot.init(); // Use it from onCreate Application or Activity only one

Register event

#1

Call call = new Call() {
            @Override
            public void run(Object... objectes) {
                if(objectes.length > 1) Log.d("OK Event", (String) objectes[0]); //String object follow with object u call event
            }
        };
WindHotspot.getInstance().bind("TestEvent", call);

#2

class YourClass implements Call{
    
    public YourClass(){
      WindHotspot.getInstance().bind("TestEvent", this);
    }

    @Override
    public void run(Object... objectes) {
        Log.e("FUCK", (String) objectes[0]);
    }
}

Unbind Event

WindHotspot.getInstance().unbind("TestEvent", call);

Call Event

WindHotspot.getInstance().call("TestEvent", "Rest", 123, object);
You can’t perform that action at this time.