Skip to content
This repository has been archived by the owner on Jan 4, 2018. It is now read-only.
/ PushService Public archive

Microservice for pushing message to the App through Google Cloud Messaging

License

Notifications You must be signed in to change notification settings

HTWK-App/PushService

Repository files navigation

HTWK Push Microservice - Preview

Build Status License Language Framework Lines of Code

This microservice adds the ability to push messages to android devices, running the HTWK-App (Push branch). It's just a preview and not everything is working by now. The Idea was to NOT show a notification at every push, only at a selection of pushed messages. Unfortunately, this isn't possible with the default Cordova Push-Plugin.

Using this Service

Once your service is running all you need to do is to issue commands to one of the following URLs at:

curl -X PUT    http://localhost:9000/regid/<id>  - Register Device ID (issued at App start)
curl -X DELETE http://localhost:9000/regid/<id>  - Unregister Device ID
curl -X POST   http://localhost:9000/pushto/<id> - Push a default message to Device with ID id

Compilation/Running the Server

Install the Typesafe Acticator.

For developement mode, execute the following commands:

# May take some time...
activator update
activator run

To package the application for production mode, execute the following command. You will be told where the resulting dist zip is placed. Inside this zip, theres a run script. Start it and your ready to go.

activator dist

Please note that this application need a key to push to Googles GCM Servers. This key is NOT (!!!) included in this repository. Add your key inside the file ** app/controllers/GCM.scala ** at line 25.

About

Microservice for pushing message to the App through Google Cloud Messaging

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages