strongloop-community/loopback-sdk-android

In the context of LocalInstallation, what is the context of GCM ?

Closed this issue · 1 comments

In the example code provided in the API, there is about gcm.register(...) http://apidocs.strongloop.com/loopback-sdk-android/api/index.html. No glue what it is until I found a blog article https://strongloop.com/strongblog/android-push-notifications-loopback-node-js/

Does localInstallation need Google Cloud Messsage to work ?!

My use case is to get static content at application startup, it can change time to time (but not so often). App it self canot change it. Does localInstallation is the best way to solve this requirement ?

LocalInstallation was created specifically for push notifications via Google Cloud Messaging, it represents server-side model Installation from the component loopback-component-push.

My use case is to get static content at application startup, it can change time to time (but not so often). App it self canot change it. Does localInstallation is the best way to solve this requirement ?

I would personally create my own wrapper around Android's SharedPreferences to store this infrequently changed static content. This way you can easily add custom logic on when to update the content and possibly also use If-Modified checks to save some bandwidth (data & battery usage).