Integrate IAV flow in Android Native App


(Tharun Agarwal) #1

How can we integrate the IAV flow to add funding source in Android Apps? On the web side we are using Dwolla.js and we would like to use our own APIs which encapsulate the Dwolla APIs for integration.


(Stephen Ausman) #2

Hey Tharun,

I haven’t tried this with Android yet, but you should be able to include a WebView in your native application and use something like https://github.com/alinz/react-native-webview-bridge to communicate between your native app and the WebView.

Here is a related post you may find helpful:

An alternative could be to just load the WebView and have your native app and your server communicate. For example, the server could notify the app when the user has completed the IAV flow instead of the WebView notifying the native app.


(Tharun Agarwal) #3

Thanks Stephen. We are using webview route for integration. But we are struck at the final piece of integration. What we did is - created a web page and hosted it on our server and loading the dwolla.js file with the script to call the dwolla.start() function in the page. Our native app is using our Web API to generate the IAV token and pass it to webview by loading the webpage as I just discussed above. Once the web page is loaded in the view, we could see the transaction flowing smoothly to add a funding source and receive the response as well. But we are unable to pass the response back to native app as the response is Ajax based and we are not finding a suitable solution to pass the response back to the native app window from javascript file. Any suggestions would really help. Using React is something new for us and we are not sure whether it works seamlessly on all versions of Android and iOS.


(Stephen Ausman) #4

Hey Tharun,

You shouldn’t need to use React Native, I just meant to link to that as a proof of concept. It looks like there is some similar stuff out there for Android but I am not sure what the best options are. Here’s one example I found http://www.cuelogic.com/blog/simple-android-java-javascript-bridge/

Basically you will need to find a way to send a message from your WebView to your native code.