Unable to implement callback in Android

狂风中的少年 提交于 2019-12-05 21:44:39

You store requests in database, so it can has unique id (autoincrement). Then you can store callbacks in memory with relation request id -> callback. On response you can call it.

If you want, return id to developers. Then they can bind and unbind and get results when they need, even the response had got yesterday.

Take a look on TransferUtility from Amazon AWS SDK for example.

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