Skip to content

mkasajim/VoIpUSSD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Handler USSD windows API API platform

by Romell Dominguez

Target Development:

To comunicate with ussd display, It is necessary to have present that the interface depends on the SO and on the manufacturer of Android device.

USSD LIBRARY

Build a accessibility service class:

image

Capture information from USSD displaying windows, excist two ways:

  • Writting code:

image

  • Writting xml, this link manifest to SO:
<?xml version="1.0" encoding="utf-8"?>
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
    android:accessibilityEventTypes
        ="typeWindowStateChanged"
    android:packageNames="com.android.phone"
    android:accessibilityFeedbackType="feedbackGeneric"
    android:accessibilityFlags="flagDefault"
    android:canRetrieveWindowContent="true"
    android:description="@string/accessibility_service_description"
    android:notificationTimeout="0"/>

Application

Configure build.gradle file, add exteension for run aar libraries(witch we build and export)

allprojects { repositories { ...
        flatDir { dirs 'libs' } } }

Configure ussd library dependencies on app module {debugCompile: attach library module, releaseCompile: import *.aar library}

dependencies {
    ...
    debugCompile project(':ussdlibrary')
    releaseCompile(name: 'ussdlibrary-1.0.a', ext: 'aar')
}

Puts dependencies on manifest, into manifest put CALL_PHONE, READ_PHONE_STATE and SYSTEM_ALERT_WINDOW:

image

image

Use Voip line

In this secction leave the lines to call to Telcom (ussd hadh number) for connected it:

ussdPhoneNumber = ussdPhoneNumber.replace("#", uri);
Uri uriPhone = Uri.parse("tel:" + ussdPhoneNumber);
context.startActivity(new Intent(Intent.ACTION_CALL, uriPhone));

Once initialized the call will begin to receive and send the famous USSD windows

image

<style> img[src*='#center'] { width:500px; display: block; margin: auto; } img[src*='#gif'] { width:200px; display: block; margin: auto; } </style>

About

:octocat: 📞 IMEI (USSD) Library in Android Devices by @romellfudi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 53.2%
  • Kotlin 45.6%
  • HTML 1.1%
  • SCSS 0.1%