Mobile Application Deeplink Setup
Proper deeplink configuration is required for handling application redirection after payment completion — especially for e-wallet and online banking flows that redirect back to your app. See E-Wallet Payment Flow for the full app-to-app sequence.
This guide is based on the Mobile XDK Deeplink Redirection setup used across Fiuu Mobile XDK frameworks.
Overview
For this guide, the example application scheme is yourappscheme.
1. Add Deep Link Scheme to Your Application
1.1 Android
Create a new activity (e.g. DeeplinkActivity) and add an intent-filter in AndroidManifest.xml:
<activity
android:name=".DeeplinkActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="yourappscheme" />
</intent-filter>
</activity>
The scheme must use letters only, be all lowercase, and be a unique identifier that represents your app.
1.2 Deeplink Handling
Handle the scheme in your activity using the incoming intent. This example uses React Native, but the same pattern applies to Flutter, Ionic Capacitor, and other hybrid platforms.
Kotlin:
class DeeplinkActivity : ReactActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
val intent = intent
if (intent != null) {
Log.d("TAG", "Intent received: ${intent.data}")
if (isTaskRoot) {
intent.addFlags(
Intent.FLAG_ACTIVITY_REORDER_TO_FRONT or Intent.FLAG_ACTIVITY_CLEAR_TASK
)
intent.setClass(this, MainActivity::class.java)
startActivity(intent)
finish()
} else {
finish()
}
} else {
Log.d("TAG", "Intent is null")
}
}
}
Java:
public class DeepLinkActivity extends ReactActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Intent intent = getIntent();
if (intent != null) {
if (isTaskRoot()) {
intent.addFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT |
Intent.FLAG_ACTIVITY_CLEAR_TASK);
intent.setClass(this, MainActivity.class);
startActivity(intent);
finish();
} else {
finish();
}
} else {
Log.d("TAG", "intent is null");
}
}
}
1.3 iOS
Add Xcode URL Schemes:
- Open your project in Xcode.
- Navigate to TARGETS → Info → URL Types.
- Add a new URL Type with your scheme (e.g.
yourappscheme).
URL Schemes must use letters only, be all lowercase, and be a unique identifier that represents your app.
2. Register App Scheme on Fiuu Portal
- Log in to the Fiuu Merchant Portal.
- Navigate to Merchant Profile → Profile Settings → Registered a Serial Device / App Name.
- Add your scheme ending with
://in the App Url / Deeplink field.- Example:
yourappscheme:// - If your app uses a host, include it:
yourappscheme://yourapphost
- Example:
- The Serial No / App Name value must match your
mp_app_nameparameter in the XDK.
3. Run and Test
3.1 Android
- Clean and rebuild your app.
- Run using a release build after registering your App Url.
# React Native
npx react-native run-android --mode=release
# Flutter
flutter run --release
Or change the Active Build Variant to release before running, or install a release APK directly.
3.2 iOS
- Clean and rebuild your app.
- Set the Run Build Configuration to Release:
- Product → Scheme → Edit Scheme → Run → Build Configuration → Release
- Run your app.
3.3 Verify
Test a payment flow that redirects back to your app (e.g. e-wallet or online banking). Confirm your deeplink activity receives the intent and returns the user to your main screen.
TNG eWallet Note (iOS Swift)
For Touch 'n Go eWallet on iOS, you may need to close the XDK manually after deeplink completion:
vc.startXDK(completion: onResults,
onFinishDeepLink: { vc.closePayment() })
See the Swift integration guide for details.