ussd_service 0.0.3+1 copy "ussd_service: ^0.0.3+1" to clipboard
ussd_service: ^0.0.3+1 copied to clipboard

outdated

A Flutter plugin to make silent USSD requests and read their responses, using Android's sendUssdRequest. iOS is not supported.

Ussd plugin for Flutter #

This plugin makes it possible to access Android's sendUssdRequest method from a Flutter application.

Installation #

Add ussd_service as a dependency in your pubspec.yaml.

Make sure that your AndroidManifext.xml file includes the following permission:

<uses-permission android:name="android.permission.CALL_PHONE" />

Usage #

Before you use this plugin, you must:

You may then use the plugin:

import 'package:ussd_service/ussd_service.dart';

makeMyRequest() async {
  int subscriptionId = 1; // sim card subscription ID
  String code = "*21#"; // ussd code payload
  try {
    String ussdResponseMessage = await UssdService.makeRequest(subscriptionId, code);
    print("succes! message: $ussdResponseMessage");
  } catch(e) {
    debugPrint("error! code: ${e.code} - message: ${e.message}");
  }
};

makeMyRequest();
60
likes
0
pub points
76%
popularity

Publisher

verified publishervincent-kammerer.com

A Flutter plugin to make silent USSD requests and read their responses, using Android's sendUssdRequest. iOS is not supported.

Repository (GitHub)
View/report issues

Documentation

Documentation

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on ussd_service