Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sys1yagi/alarm-manager-simplify

Alarm Manager Simplify is a code generation library to simplify the code for AlarmManager on Android.
https://github.com/sys1yagi/alarm-manager-simplify

Last synced: 14 days ago
JSON representation

Alarm Manager Simplify is a code generation library to simplify the code for AlarmManager on Android.

Awesome Lists containing this project

README

        

# Alarm Manager Simplify

[![Circle CI](https://circleci.com/gh/sys1yagi/alarm-manager-simplify.svg?style=svg)](https://circleci.com/gh/sys1yagi/alarm-manager-simplify)

Alarm Manager Simplify is a code generation library to simplify the code for AlarmManager on Android.

Handling of AlarmManager's complicated. PendingIntent, WakefulBroadcastReceiver, IntentService...

## Architecture

## How to use

### Implement AlarmProcessor and add annotation

```java
@Simplify("SimpleAction")
public class SimpleActionProcessor implements AlarmProcessor {
@Override
public void process(Context context, Intent intent) {
Log.d("SimpleAction", "SimpleAction do");
}
}
```

### Add to AndroidManifest.xml

```xml


```

### Schedule alarm.

Set up a alarm using generated Scheduler.

```java
SimpleActionProcessorScheduler.scheduleRtcWakeup(context, 1000);
```

### Installation

This library is distributed by [JitPack](https://jitpack.io/). Add dependencies your build.gradle

```
apt 'com.github.sys1yagi.alarm-manager-simplify:processor:0.3.1'
compile 'com.github.sys1yagi.alarm-manager-simplify:library:0.3.1'
```

## Development

__Show version__

```
$ ./gradlew version
```

__Bump version__

```
$ ./gradlew bumpMajor
$ ./gradlew bumpMinor
$ ./gradlew bumpPatch
```

__Generate README__

```
$ ./gradlew genReadMe
```