All Projects → dreiklangdev → Breadcast

dreiklangdev / Breadcast

Licence: apache-2.0
Small Broadcast Receiver Library for Android

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Breadcast

annotate
Create 3D labelled bounding boxes in RViz
Stars: ✭ 104 (+593.33%)
Mutual labels:  annotation, annotations
AnnotationProcessing
✔️ㅤ[ARTICLE] Writing your own Annotation Processors in Android
Stars: ✭ 47 (+213.33%)
Mutual labels:  annotation, annotations
dart sealed
Dart and Flutter sealed class generator and annotations, with match methods and other utilities. There is also super_enum compatible API.
Stars: ✭ 16 (+6.67%)
Mutual labels:  annotation, annotations
Genometools
GenomeTools genome analysis system.
Stars: ✭ 186 (+1140%)
Mutual labels:  library, annotation
Event
The Hoa\Event library
Stars: ✭ 319 (+2026.67%)
Mutual labels:  event, library
Geotic
Entity Component System library for javascript
Stars: ✭ 97 (+546.67%)
Mutual labels:  event, library
CEventCenter
一个Android事件分发中心库,基于对象池及接口回调实现。实现类似BroadcastReceiver/RxBus/EventBus等的消息事件传递功能,用于在Activity/Fragment/Service之间的消息传递通讯。
Stars: ✭ 116 (+673.33%)
Mutual labels:  event, broadcast
Router
🍭灵活的组件化路由框架.
Stars: ✭ 1,502 (+9913.33%)
Mutual labels:  annotations, annotation
Memex
Browser Extension to full-text search your browsing history & bookmarks.
Stars: ✭ 3,344 (+22193.33%)
Mutual labels:  annotations, annotation
spectree
API spec validator and OpenAPI document generator for Python web frameworks.
Stars: ✭ 190 (+1166.67%)
Mutual labels:  annotation, annotations
Easydeviceinfo
📱 [Android Library] Get device information in a super easy way.
Stars: ✭ 1,698 (+11220%)
Mutual labels:  library, annotations
Label Studio
Label Studio is a multi-type data labeling and annotation tool with standardized output format
Stars: ✭ 7,264 (+48326.67%)
Mutual labels:  annotations, annotation
React Image Annotation
An infinitely customizable image annotation library built on React
Stars: ✭ 203 (+1253.33%)
Mutual labels:  annotations, annotation
laravel-broadcast-demo
Article: Laravel PWA to implement Broadcasting
Stars: ✭ 17 (+13.33%)
Mutual labels:  event, broadcast
Http Router
🎉 Release 2.0 is released! Very fast HTTP router for PHP 7.1+ (incl. PHP8 with attributes) based on PSR-7 and PSR-15 with support for annotations and OpenApi (Swagger)
Stars: ✭ 124 (+726.67%)
Mutual labels:  annotations, annotation
aptk
A toolkit project to enable you to build annotation processors more easily
Stars: ✭ 28 (+86.67%)
Mutual labels:  annotation, annotations
Nova
NOVA is a tool for annotating and analyzing behaviours in social interactions. It supports Annotators using Machine Learning already during the coding process. Further it features both, discrete labels and continuous scores and a visuzalization of streams recorded with the SSI Framework.
Stars: ✭ 110 (+633.33%)
Mutual labels:  annotations, annotation
AnnotationProcessorStarter
Project to set up basics of a Java annotation processor
Stars: ✭ 19 (+26.67%)
Mutual labels:  annotation, annotations
Cvat
Powerful and efficient Computer Vision Annotation Tool (CVAT)
Stars: ✭ 6,557 (+43613.33%)
Mutual labels:  annotations, annotation
Yedda
YEDDA: A Lightweight Collaborative Text Span Annotation Tool. Code for ACL 2018 Best Demo Paper Nomination.
Stars: ✭ 704 (+4593.33%)
Mutual labels:  event, annotations
Base: Download Processor: Download Annotation: Download

bread Breadcast

Small Broadcast Receiver Library for Android

... simplifies listening to broadcasts by hiding what would be boilerplate code.

  • One for All: Single BroadcastReceiver instance for every action
  • Clean look: Generates the code behind the curtains
  • Thread-Modes: Multithreaded callback via annotation option
  • Simple: Broadcast listening possible in one statement

Before:

class MyReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        switch (intent.getAction()) {
            case Intent.ACTION_SCREEN_OFF:
                ...
            case Intent.ACTION_SCREEN_ON:
                ...
        }
    }
}
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_SCREEN_OFF);
filter.addAction(Intent.ACTION_SCREEN_ON);
context.registerBroadcast(new MyReceiver(), filter);

With Breadcast you can choose between 2 ways:

1. Breadcast Standalone (Base package)

new Breadcaster(context)
    .action(Intent.ACTION_SCREEN_OFF, (context, intent) -> ... )
    .action(Intent.ACTION_SCREEN_ON, (context, intent) -> ... )
    .register();

2. Breadcast Annotation

Breadcast.init(context);
class MyClass { // extends ...
    MyClass() {
        Breadcast.instance().register(this); // required for non-static methods
    }
    
    @Receive(action = Intent.ACTION_SCREEN_OFF)
    void onScreenOff() { ... }
    
    @Receive(action = Intent.ACTION_SCREEN_ON)
    void onScreenOn() { ... }
}

More examples

@Receive(action = {Intent.ACTION_SCREEN_ON, Intent.ACTION_SCREEN_OFF})
onScreenChange(Context context, Intent intent) { ... } // multiple
	
@Receive(action = "custom1", threadMode = ThreadModus.ASYNC)
onCustomAsync() { ... } // asynchronous

@Receive(action = Intent.ACTION_SHUTDOWN)
static withoutRegister() { ... } // static - called regardless of object registration	

To define actions via manifest (implicit/static), use ManifestBreadcast

<receiver android:name="io.dreiklang.breadcast.base.statics.ManifestBreadcast">
    <intent-filter>
        <action android:name="android.intent.action.BOOT_COMPLETED" />
    </intent-filter>
</receiver>
@Receive(action = Intent.ACTION_BOOT_COMPLETED)
static onBoot() { ... } // must be static

Important: You must init() Breadcast nevertheless!

Notes

Download

Gradle

dependencies {
    // required
    implementation 'io.dreiklang:breadcast-base:1.1.0'
    
    // if you use the annotation
    implementation 'io.dreiklang:breadcast-annotation:1.1.0'
    annotationProcessor 'io.dreiklang:breadcast-processor:1.1.0'
}

Please open an issue case if you find one. It's merely 1-2 minutes against literally tons of neurons roasted for debunking them. :)

Thank you and have fun!

License

Copyright 2018 Nhu Huy Le

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.

Logo icon by Icons8

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].