Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiwinter committed Jun 25, 2015
2 parents 81dd89a + 0653c64 commit 586e2a5
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# android-remote-notifications
An Google GCM/Amazon SNS alternative
## Main features
- Independent user notifications (no Google GCM or Amazon SNS), just put a JSON file in the cloud
- Framework will update available notifications automatically in defined time intervals (`now`, `daily`, `weekly`, `monthly`)
- Flexible parameters:
- start date for notification (distribute early, show later)
- amount of times the notification should be shown
- interval between showing notifications (`always`, `every day`, `every week`, `every month`)
- specify on which app version (`versionCode`) the notification should be shown
- Show notifications as `AlertDialog` or `Toast` message (defined by the remote JSON file)
- `AlertDialog`: Specify button captions and actions: `Open Store`-Action, `Open URL`-Action, `Exit App`-Action, all defined by a JSON file on your server
- perfect to inform your users about discounts on one of your other apps or premium version
- pro tip: as some users don't always update to the latest app versions you should integrate this framework in an early phase if you plan to use it at a later time.

## How to integrate
### The easy way
- Call `RemoteNotifications.start(context, url, UpdatePolicy.NOW);` in your `onCreate()` or `onResume()` method

this will
- start an update of the notifications (use `UpdatePolicy.WEEKLY` in production environment to update once a week)
- show due notifications to the user

### If you want more control
```java
RemoteNotifications rn = new RemoteNotifications(context);
rn.updateNotifications(UpdatePolicy.NOW);
rn.showNotifications(); // if update still runs, event will be queued and carried out later

// -or, register a listener on update completion-
rn.updateNotifications(UpdatePolicy.NOW, finishListener);
```

## Demo
### App
[Download](https://drive.google.com/uc?export=download&id=0B0qVR-zttDRCeXo0SF9RMVhZZHM)
### Source
[MainActivity](https://github.com/kaiwinter/android-remote-notifications/blob/master/example/src/main/java/com/github/kaiwinter/androidremotenotifications/example/MainActivity.java)

## Screenshots
![Preview](http://i.imgur.com/Hp1aowm.png)

0 comments on commit 586e2a5

Please sign in to comment.