A complete Android WebView application with integrated payment gateway for Setu's COU WL (Customer Onboard Utility - White Label) solution.
- URL input field in the center of the screen
- Submit button to open the website
- WebView to display websites with payment integration
- JavaScript interface for Setu payment gateway
- Mock payment screen with UPI and Card options
- URL validation and network connectivity checks
- Clean and modern UI design
- Complete payment callback handling
- Open the project in Android Studio
- Sync the project with Gradle files
- Build and run the app on your device or emulator
MainActivity.java- URL input and app entry pointWebViewActivity.java- WebView with JavaScript payment interfacePaymentScreen.java- Mock payment gateway implementationWebAppInterface.java- JavaScript bridge for Setu integrationactivity_main.xml- Main screen layoutactivity_webview.xml- WebView screen layoutactivity_payment_screen.xml- Payment screen layoutAndroidManifest.xml- App configuration with internet permissions
The app includes full integration with Setu's payment gateway:
- JavaScript Interface:
Android.initiatePayment()andAndroid.unload() - Payment Methods: UPI and Card payments
- Callback Handling: Returns payment results to WebView
- Mock Processing: Simulates real payment transactions
The app requires the following permissions:
INTERNET- To load web pagesACCESS_NETWORK_STATE- To check network connectivity
- Launch the Setu COU WL app
- Enter a website URL or use test URLs:
file:///android_asset/test.html- Basic WebView testfile:///android_asset/payment_test.html- Payment integration test
- Click "Open Website" button
- The website will load in the WebView
- Test payment integration if the website calls
Android.initiatePayment() - Use the back button to navigate within the WebView or exit the app
Use the built-in test page: file:///android_asset/payment_test.html
- ✅ Verify Android interface detection
- 🔧 Configure payment parameters
- 💰 Test payment initiation
- 📋 View callback results