oneapp_sdk 1.0.6
oneapp_sdk: ^1.0.6 copied to clipboard
OneApp Cobranding SDK - Flutter plugin for payment processing.
oneapp_sdk – Flutter Integration Guide #
The OneApp Cobranding SDK provides secure mobile authentication, payments, device binding, user profile access, wallet balance inquiry, TPIN management, and more.
This SDK is designed for FinTech, Payments, and Wallet applications.
Important Note #
Our company will provide the Organization ID and Secret Key to integrate this SDK.
Without these values, the SDK will not function.
- Always call modesetup() first before any SDK action.
- Do not call SDK methods without a valid BuildContext.
- Organization credentials are required from the company.
- SDK handles permission dialogs automatically.
Installation #
Add this to your pubspec.yaml:
dependencies:
oneapp_sdk:
path: ./oneapp_sdk # OR use git/path based on your setup
Import package:
import 'package:oneapp_sdk/oneapp_sdk.dart';
Android Setup #
Add required permissions in your AndroidManifest.xml:
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION"/>
<uses-permission android:name="android.permission.CAMERA"/>
<uses-permission android:name="android.permission.SEND_SMS"/>
<uses-permission android:name="android.permission.READ_SMS"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
The SDK automatically requests these permissions when needed.
Initialize OneApp SDK #
Call modesetup() before using any other SDK method.
bool status = await OneAppSdk.modesetup(
context,
"TEST", // or "LIVE"
"ORG_ID", // Provided by company
"SECRET_KEY", // Provided by company
"9999999999", // User Mobile Number
"TOKEN_HERE", // Token from your backend
false, // isRegistration
Colors.green, // optional theme color
);
if (status) {
}
Runtime Permissions #
SDK automatically handles required permissions:
- Location
- Camera
- SMS
- Phone
If the user permanently denies a permission, the SDK automatically shows an Open Settings dialog.
🌎 Environment Modes #
| Mode | Description |
|---|---|
TEST |
QA environment |
LIVE |
Production environment |
Use the correct ORG_ID and SECRET_KEY provided by the company.
🎨 Theme Customization #
You can customize the SDK theme color:
OneAppSdk.modesetup(context, "TEST", ORG_ID, KEY, number, token, false, Colors.blue);