Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proyecto prueba uso de pantallas y protocolo VOIP USSD
- Loading branch information
0 parents
commit 2814b8a
Showing
116 changed files
with
3,671 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
*.iml | ||
.gradle | ||
/local.properties | ||
/.idea/workspace.xml | ||
/.idea/libraries | ||
.DS_Store | ||
/build | ||
/captures | ||
.externalNativeBuild |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>BIOX_USSD</name> | ||
<comment>Project BIOX_USSD created by Buildship.</comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.buildship.core.gradleprojectbuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Proyecto MANEJO USSD | ||
|
||
### by Romell Dominguez | ||
[![](snapshot/icono.png)](https://www.romellfudi.com/) | ||
|
||
Para manejar la comunicaci贸n ussd, hay que tener presente que la interfaz depende del SO y del fabricante. | ||
|
||
## USSD LIBRARY | ||
|
||
Construir una clase que extienda de los servicios de accesibilidad: | ||
|
||
![image](snapshot/G.png) | ||
|
||
En ella capturara la informaci贸n de la pantalla USSD con el SO la visualice, para ello existen 2 maneras: | ||
|
||
* via c贸digo: | ||
|
||
![image](snapshot/H.png) | ||
|
||
* via xml, el cual deberas vincular en el manifest de tu aplicaci贸n: | ||
|
||
```xml | ||
<?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"/> | ||
``` | ||
|
||
Este es un peque帽o extracto de como buscar el boton "ENVIAR" Y hacer click | ||
|
||
![image](snapshot/I.png) | ||
|
||
### Aplicaci贸n | ||
|
||
En este proyecto manejo 2 flavors, uno para pruebas (development) y otro de producci贸n (production) | ||
|
||
![image](snapshot/A.png) | ||
|
||
Configuramos en el archivo build.gradle, la extensi贸n para leer librerias *.aar (la cu谩l crearemos y exportaremos) | ||
|
||
![image](snapshot/E.png) | ||
|
||
Agregamos los archivos excluyentes de las librerias para evitar conflictos | ||
|
||
![image](snapshot/B.png) | ||
|
||
Configuramos la dependencia de la libraria ussdlibrary mediante los prefijs {debugCompile: llamar a m贸dulo de la libreria, releaseCompile: llamar al empaquetado *.aar} | ||
|
||
![image](snapshot/C.png) | ||
|
||
Dejamos configurado nuestro keystore con fines recreativos xD | ||
|
||
![image](snapshot/D.png) | ||
|
||
Teniendo importada las dependencias, en el manifest de la aplicaci贸n se debe escribir el servicio con los permisos necesarios | ||
|
||
![image](snapshot/J.png) | ||
|
||
![image](snapshot/F.png) | ||
|
||
### Uso de la l铆nea voip | ||
|
||
En esta secci贸n dejo las l铆neas claves para realizar la conexi贸n VOIP-USSD | ||
|
||
![image](snapshot/K.png) | ||
|
||
Una vez inicializado la llamada el servidor telcom comenzar谩 a enviar las *famosas pantallas **ussd*** | ||
|
||
![image](snapshot/telcom.png) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/> | ||
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>app</name> | ||
<comment>Project app created by Buildship.</comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.buildship.core.gradleprojectbuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
connection.project.dir=.. | ||
eclipse.preferences.version=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
apply plugin: 'com.android.application' | ||
|
||
android { | ||
signingConfigs { | ||
config { | ||
keyAlias 'freddyfudi' | ||
keyPassword 'freddyfudi' | ||
storeFile file('keystore.jks') | ||
storePassword 'freddyfudi' | ||
} | ||
} | ||
compileSdkVersion 26 | ||
buildToolsVersion "26.0.2" | ||
defaultConfig { | ||
applicationId "fudi.freddy.biox_ussd" | ||
minSdkVersion 26 | ||
targetSdkVersion compileSdkVersion | ||
versionCode 1 | ||
versionName "1.0" | ||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" | ||
} | ||
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' | ||
shrinkResources false | ||
} | ||
} | ||
packagingOptions { | ||
exclude 'META-INF/LICENSE' | ||
exclude 'META-INF/NOTICE' | ||
} | ||
} | ||
|
||
dependencies { | ||
compile 'com.android.support:appcompat-v7:26.+' | ||
compile 'com.android.support:design:26.+' | ||
debugCompile project(':ussdlibrary') | ||
releaseCompile(name: 'ussdlibrary-1.0.a', ext: 'aar') | ||
} |
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Add project specific ProGuard rules here. | ||
# By default, the flags in this file are appended to flags specified | ||
# in /Users/romelldominguez/Library/Android/sdk/tools/proguard/proguard-android.txt | ||
# You can edit the include path and order by changing the proguardFiles | ||
# directive in build.gradle. | ||
# | ||
# For more details, see | ||
# http://developer.android.com/guide/developing/tools/proguard.html | ||
|
||
# Add any project specific keep options here: | ||
|
||
# If your project uses WebView with JS, uncomment the following | ||
# and specify the fully qualified class name to the JavaScript interface | ||
# class: | ||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview { | ||
# public *; | ||
#} | ||
|
||
# Uncomment this to preserve the line number information for | ||
# debugging stack traces. | ||
#-keepattributes SourceFile,LineNumberTable | ||
|
||
# If you keep the line number information, uncomment this to | ||
# hide the original source file name. | ||
#-renamesourcefileattribute SourceFile |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":1},"path":"app-release.apk","properties":{"packageId":"fudi.freddy.biox_ussd","split":"","minSdkVersion":"26"}}] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | ||
|
||
package="fudi.freddy.biox_ussd"> | ||
<uses-permission android:name="android.permission.CALL_PHONE" /> | ||
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> | ||
<uses-permission android:name="android.permission.READ_PHONE_STATE" /> | ||
|
||
<application | ||
android:allowBackup="true" | ||
android:icon="@mipmap/ic_launcher" | ||
android:label="@string/app_name" | ||
android:theme="@style/AppTheme"> | ||
|
||
<!-- --> | ||
<service | ||
android:name="fudi.freddy.ussdlibrary.USSDService" | ||
android:permission="android.permission.BIND_ACCESSIBILITY_SERVICE"> | ||
<intent-filter> | ||
<action android:name="android.accessibilityservice.AccessibilityService" /> | ||
</intent-filter> | ||
</service> | ||
|
||
<activity | ||
android:name=".act.MainMenuActivity" | ||
android:label="@string/title_activity_main_menu" | ||
android:launchMode="singleTop" | ||
android:screenOrientation="sensorPortrait" | ||
android:theme="@style/AppTheme.NoActionBar" | ||
android:windowSoftInputMode="stateAlwaysHidden"> | ||
<intent-filter> | ||
<action android:name="android.intent.action.MAIN" /> | ||
<category android:name="android.intent.category.LAUNCHER" /> | ||
</intent-filter> | ||
</activity> | ||
|
||
|
||
</application> | ||
|
||
</manifest> |
Oops, something went wrong.