ussd_handler 0.0.4
ussd_handler: ^0.0.4 copied to clipboard
A complete Flutter plugin for handling USSD codes on Android and iOS with advanced features including multi-USSD sessions.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
0.0.4 2026-19-08 #
π Fixed #
- USSD URL Encoding (iOS): Fixed a critical bug where USSD codes containing
#(e.g.,*123#) were silently truncated before reaching the phone dialer. The#character is the URI fragment separator; it is now percent-encoded as%23when building thetel:URL. - iOS Dual-SIM Detection:
simCountandsupportsDualSimwere hardcoded to1andfalse. Both are now computed dynamically from active SIM providers viaserviceSubscriberCellularProviders; iPhone XS and later with eSIM + physical SIM report the correct values. - Missing
try-catchin Permission Methods: Added missing error handling to the Android code paths ofcheckPhonePermissions,shouldShowPermissionRationale,isPermissionPermanentlyDenied, andopenAppSettings. OnlyrequestPhonePermissionshad a try-catch; unhandledPlatformExceptionin the others propagated silently to the caller. - Incorrect
getSystemInfoPlatform Annotation: The platform interface doc incorrectly statedgetSystemInfowas Android-only; it works on both platforms.
π§ Changed #
- iOS Deprecated CoreTelephony API: Replaced
CTTelephonyNetworkInfo.subscriberCellularProvider(deprecated iOS 16) withserviceSubscriberCellularProviders, the multi-SIMβcapable replacement available since iOS 12. - iOS
systemInfo.deviceNameRemoved: Starting with iOS 16,UIDevice.current.namereturns a generic"iPhone"string without a special entitlement. The field has been removed from the iOSgetSystemInforesponse to avoid misleading values. - Podspec
swift_version: Bumped from'5.0'to'5.5'to align with the iOS 15.0 minimum deployment target introduced in 0.0.3. - iOS Permission Comments: Verbose multi-line comments in
ussd_handler_method_channel.dartiOS guards replaced with single-line annotations.
ποΈ Removed #
- Unused
CallKitImport: Removedimport CallKitfromUssdHandlerPlugin.swift; no CallKit API was referenced in the implementation. - Template TODO Comments: Cleaned up leftover scaffold comments from
ios/ussd_handler/Package.swift.
π Documentation #
- Added
///dartdoc to all previously undocumented public fields inUssdResponse,SystemInfo,AccessibilityEventChannelResult, andMultiSessionResult. - Added class-level doc to
UssdHandlerandUssdHandlerPlatform. - Added doc to
getPlatformVersion()in both the public API and the platform interface.
0.0.3 2026-18-08 #
β¨ Added #
- Swift Package Manager Support: Added
ios/ussd_handler/andios/FlutterFramework/as proper SPM packages, enabling modern dependency resolution on iOS without CocoaPods. - PrivacyInfo inside SPM:
PrivacyInfo.xcprivacyis now bundled within the SPM package source tree (ios/ussd_handler/Sources/ussd_handler/).
π§ Changed #
- iOS Minimum Deployment Target: Raised from iOS 12.0 to iOS 15.0 to support modern Swift concurrency and
CallKitAPIs. - Podspec source layout:
source_filesandresource_bundlespaths updated to match the new SPM directory structure. - Podspec version and author: Bumped to
0.0.2and corrected author metadata. - Logging: Replaced
printwithdebugPrintinussd_handler_method_channel.dartand the example app to respect Flutter's output throttling and suppress logs in release mode.
ποΈ Removed #
- CocoaPods integration: Removed
Podfile,Podfile.lock, and all CocoaPods references from the example iOS project (xcworkspace,xcconfig,project.pbxproj). - Legacy plugin class layout: Removed
ios/Classes/UssdHandlerPlugin.swiftandios/Resources/PrivacyInfo.xcprivacyin favour of the SPM package structure.
π¦ Dependencies #
- Bumped transitive dependency
vm_servicefrom15.2.0to15.3.0in the example app.
0.0.2 2026-15-08 #
β¨ Added #
- Native Permission Management: Added full standalone methods to check and request
CALL_PHONEandREAD_PHONE_STATEpermissions natively (checkPhonePermissionsandrequestPhonePermissions) without third-party dependencies. - Permanent Denial Detection: Added
isPermissionPermanentlyDeniedto detect if the user selected the "Don't ask again" option during the native permission dialog. - Permission Rationale Support: Added
shouldShowPermissionRationaleutilizing Android's native rationale API to know when to show educational UI to the user. - System Settings Redirect: Added
openAppSettingsto easily forward users to the application details screen so they can grant blocked permissions manually.
π§ Changed #
- Manifest Conflict Resolution: Fixed a critical
Manifest merger failederror by restructuring how permissions and metadata are handled across application boundaries. - Documentation: Updated the API reference and code block examples inside
README.mdto reflect the new native permission helper methods.
ποΈ Removed #
- Manifest
tools:replace: Removed the incorrect<meta-data tools:replace="android:resource" />tag inside the package's internalAndroidManifest.xmlwhich was breaking the main application's build process.
0.0.1 2026-14-08 #
β¨ Added #
Main Features
- Standard USSD: Basic USSD code execution with system response
- Direct USSD: Getting USSD responses without showing system dialogs (Android)
- Multi-Session USSD: Maintaining active USSD sessions for automated menu navigation
- Multi-SIM Support: Complete functionality for devices with multiple SIMs
- Automatic single SIM selection
- Native selector for multiple SIMs
- Manual SIM specification (subscriptionId)
Accessibility Services
- USSD Accessibility Service: Automatic capture of USSD responses from the system
- Automated Navigation: Automatic navigation through complex USSD menus
- Accessibility Configuration: Automatic opening of system configurations
System Information
- Device Diagnostics: Detailed information about permissions, network, SIM, etc.
- Permission Verification: Checking and automatic request of necessary permissions
- USSD Support Verification: Detection of device USSD capabilities
Static API
- Static Utility Class: All methods are static, no instantiation required
- Simplified API: Direct use with
UssdHandler.method()without creating objects
π‘οΈ Security #
- Permission Management: Automatic request and verification of required permissions
- Input Validation: Validation of USSD codes and input parameters
- Error Handling: Robust error handling and edge cases
π± Supported Platforms #
- Android: Complete support with all features
- iOS: Basic support (operating system limitations)
π― Technical Features #
- Configurable Timeout: Custom timeout configuration for direct USSD
- Detailed Logging: Logging system for diagnostics and debugging
- Thread Safety: Safe operations for concurrent use
- Backward Compatibility: Compatibility with previous Android versions
π Documentation #
- Complete README: Comprehensive documentation with usage examples
- Contribution Guide: Detailed process for contributors
- API Reference: Complete API documentation
π§ͺ Testing #
- Unit Tests: Complete coverage of main features
- Accessibility Tests: Specific tests for accessibility services
- Integration Tests: Verification on real devices
- Complete Mocks: Mock system for testing without hardware
π Compatibility #
- Flutter:
>=3.44.0 - Dart:
^3.13.0 - Android: API 24+ (Android 7.0+)
- iOS: iOS 15.0+
π§ Configuration #
- Android Permissions:
CALL_PHONE: Required for USSD codesREAD_PHONE_STATE: Device information
π Release Metrics #
- Code Files: 15+ main files
- Tests: 38+ automated tests
- Documentation: 3
- Examples: Complete example application
π First Release #
This is the first public release of the USSD Handler plugin. It includes all fundamental features for handling USSD codes in Flutter applications, with advanced support for multi-SIM, multi-USSD sessions, and accessibility services.
Featured Characteristics:
- π Simple and powerful static API
- π± Complete multi-SIM support
- π Automated USSD sessions
- π‘οΈ Robust permission management
- π Comprehensive documentation
- π§ͺ Complete tests
Next Steps:
- Community feedback
- Improvements based on real usage
- Performance optimizations
- iOS functionality expansion
Development Notes:
- Initial development version (0.0.1)
iOS-Specific Features
- iosFallbackToStandard Parameter: Allows
executeUssdDirectto useexecuteUssdas fallback on iOSiosFallbackToStandard: false(default): Maintains Android compatibility, returns null on iOSiosFallbackToStandard: true: Uses executeUssd internally on iOS, providing unified functionality- Only affects iOS, ignored on Android
- Allows cross-platform code without platform conditionals