How do I implement a webhook in Android?

夙愿已清 提交于 2019-12-08 04:00:33

问题


I want to have URL for examplewww.example.com/status in my Android app to which I will be observing and will be receiving multiple POST requests from the Server. With each POST request, I will trigger a feature. I don't understand how can I implement a listener on a URL 24x7. All I want is a place to start with. If this is not possible then is Push Notifications a viable option?

Note: The webhook isn't supposed to be on the Server instead it should be on the Client (Android) and Server is supposed to send requests on the webhook.


回答1:


You can use firebase push notification . Use a web server to send push notification to your application, and perform the action inside the Firebase Event service.



来源:https://stackoverflow.com/questions/46336811/how-do-i-implement-a-webhook-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!