mercredi 9 août 2017

Listening to form POST in Android native app?

I am working with a third-party API that only posts the response in the form of a "form post" to a "returnURL". I have the ability to provide the returnURL.

What makes the execution complicated is that I am calling this API from a native Android App. So, my "outgoing call to API" works well but I dont have a way to "catch" the response as it is posted to a "returnURL". What returnURL should I provide and how can I "listen" to the form POST?

Two solution that comes to mind are:

  1. provide returnURL of the Android App - Does an Android App have a returnURL? If yes, I could provide that as the returnURL but is it possible to "listen" to form post-ed response to that URL in Android native?

  2. returnURL of a web - The second way could be: to provide a returnURL of my website (say http://ift.tt/2uGIrs3) + listening mechanism to catch the form post-ed html + I build an API that lets me query it from the Android App.

I am looking for suggestions on which of the above two are possible or if there are better ways to do this? Unfortunately, I have no control over the API - its a third party product.

Thanks in advance for taking the time to read and suggest!

Aucun commentaire:

Enregistrer un commentaire