I would like to use LTE Beacon to send different messages to the App according to different events to trigger some functions in the phone. How can I make this happen? Which is the most convenient way?
I would suggest using push notifications. In Cloud code you can call remote service using REST and pass your message, phone would be subscribed to this notification and your code will be called to perform an action.
On Android you can use Firebase Push Notifications. Sending message via REST
On iOS: Notifications
Thanks, I have seen the “pusher/push-notification” API and tried it. I’m not sure the difference between publish notification to users and interests. Besides, am I in the right way?
For iOS applications, the setup is not simple and requires a service like Pusher, AWS, etc., to host the server side of it. I’m sure you figured out that each instance of your iOS app + device combination has a unique identifier, which Apple provides to the app and the app needs to make that available to push service. You will need some other mechanism to know the end user to whom the identifier belongs so that you can do a lookup in the push process and send the notification to the APNS, which then delivers it to the device. The above only works for native iOS applications. I’m sure it works in a similar way on Android.
Have you looked into Websockets?
I think I have a similar requirement. I modified one of the LTE app templates to turn the center LED on or off with button press, store the LED state, and queue and sync the event to the Estimote cloud. The cloud app then makes an API call to my AWS server with the device identifier and LED state. My server then uses Websockets to broadcast the state to all the clients. There is definitely a latency before the Estimate cloud gets the sync’d event and the latency propagates all the way to the end client.
As a secondary means of getting the LED state to the clients, I enabled custom advertising in the LTE Beacon, which embeds the LED state. For now, I’m using an iOS app to capture the LED state and relay it to my AWS service. The latency is barely noticeable from button press to the clients’ web pages showing the LED state.
BTW, I tried the push notification from AWS to IOS clients and gave up and settled on the much simpler Websockets. I may change my mind when I scale the solutions, however.
Thanks budy, I am trying Pusher- FCM- android app, looks like it can be done in this way. I’ll check Websockets if it is more convenient. thank you so much!