Google Voice integration, push-notifications
Example: Android app, Google Voice integration, push-notifications
Task
This example will show how to integrate Google Voice commands with LogicMachine and how to use push-notifications on your Android device on specific events.
Video tutorial
LogicMachine app is available in Play store. All the rest configuration is the same as in iOS video tutorial.
Push-notification integration
Script to send push-notification to specific Android device:
- pusher = dofile("/home/apps/store/data/cloud/lua/pusher.lua")
-
- status, errors = pusher.push_notification('08a7a67cc15d5325c0bbaffbd1106c0e5a914b8ea6e850f4210a4a2cd260c835', 'Test Message')
- log(status, errors)
Script to send push-notifications to all Android devices:
- pusher = dofile("/home/apps/store/data/cloud/lua/pusher.lua")
-
-
- local ids = {}
- for _, d in ipairs(pusher.get_android_devices()) do
- table.insert(ids, d.id)
- end
-
- local status, errors = pusher.push_notification(ids, 'Your house is on FIRE!')
- log(status, errors)
Here you can download FB editor libraries for push-notifications. Install it through Scripting -> User libraries -> Restore