capcom6/android-sms-gateway

[feature] Add support for USSD code execution

Closed this issue · 7 comments

Is your feature request related to a problem? Please describe.
Currently, users are unable to run USSD codes directly from the app, limiting functionality for those in regions where USSD is a primary method for mobile services, notably in Africa.
For example, many users use USSD to check their balance, transfer funds or buy mobile airtime.

Describe your solution
I would like the application to natively support USSD code execution. This would enable users to trigger USSD operations via the Web APIs (such as checking an account balance, purchasing airtime or transferring funds). The application should send the USSD code automatically when the user triggers the desired action through a Web API, offering a seamless experience between the application and USSD interactions.

Additional context
This feature is particularly important for users in regions where mobile wallets, airtime purchases, and other mobile financial transactions are predominantly facilitated via USSD codes

I've already forked the project on GitHub and started implementing this feature. Throughout the process, I may need to contact you for advice and additional details to ensure the successful implementation of this feature.

@capcom6

@DevAlves1993

Thank you for your proposal.

The primary feature of the app is working with SMS, not USSD or calls. Adding support for USSD would significantly increase the complexity of the app and require changes on the backend side as well. Additionally, working with calls and USSD on Android is subject to additional restrictions from the OS.

I prefer the philosophy of "do one thing and do it well," similar to Linux tools. It would be great if you add this feature to your fork, but I don't have plans to incorporate it into the main app at this time.

I'm considering a separate project for calls and USSD functionality, but there's no ETA for this yet.

@Macson-Maluwa

USSD (Unstructured Supplementary Service Data) is not directly about sending money. Even if we implement a USSD feature in the app, it wouldn't enable receiving payments.

To enable actual money transfers or payments, you would need to integrate with a service provider or mobile operator that offers such functionality. This typically involves partnerships and adherence to financial regulations.

@capcom6

Thank you for your detailed response. I completely understand your point of view regarding the app's core focus on SMS and the potential complexity of integrating USSD support.

If possible, please keep us updated on this thread when you start working on the separate project for calls and USSD functionality. It would be great to follow along with your progress.

Thanks again!

@Macson-Maluwa

Yes, it is possible to perform actions through a sequence of USSD syntax. For example, to purchase a Data Pass, the following fictitious USSD code could be used:
#111*1*2*4*070707070707#.
This sequence replicates the entire USSD journey for buying a Data Pass. The actual syntax can vary depending on the country and mobile operator, but the principle remains the same.

In the case of money transfers via USSD, the client would follow a similar structured syntax to trigger the transfer. The USSD request would be executed directly by the client’s device, and their mobile account would be debited accordingly, similar to when using an SMS gateway. Again, the specifics would depend on the country and the operator involved.

This is just a simplified and fictitious example, but it demonstrates how USSD can be utilized to perform actions programmatically.