Skip to content

Commit 5ca35ef

Browse files
Merge pull request #20 from Creadores-Program/edge
Upgrade SDK versions, refactor code, and improve styles and permissions
2 parents badb84b + 00dccda commit 5ca35ef

34 files changed

Lines changed: 880 additions & 257 deletions

File tree

.github/workflows/Build.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,23 @@ jobs:
2828
env:
2929
CREAPRODROIDKEYCONTREAPP: ${{ secrets.CREAPRODROIDKEYCONTREAPP }}
3030
run: ./gradlew :app:assembleDebug --no-daemon
31+
- name: Enable KVM group perms
32+
run: |
33+
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
34+
sudo udevadm control --reload-rules
35+
sudo udevadm trigger --name-match=kvm
36+
- name: Test App
37+
uses: ReactiveCircus/android-emulator-runner@v2.38.0
38+
with:
39+
api-level: 16
40+
target: default
41+
arch: x86
42+
profile: Nexus 4
43+
script: |
44+
adb wait-for-device
45+
adb install "app/build/outputs/apk/debug/app-debug.apk"
46+
chmod +x ./tests/test-app.sh
47+
./tests/test-app.sh
3148
3249
- name: Upload APK artifact
3350
uses: actions/upload-artifact@v7

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
# CreaProDroid
22

3-
CreaProDroid es un asistente de inteligencia artificial diseñado específicamente para dispositivos Android antiguos (versiones 4.2 a 8.1). Este asistente utiliza la tecnología de Google Gemini y Pollinations.ai, y está optimizado para ofrecer una experiencia fluida y útil en dispositivos con recursos limitados.
3+
CreaProDroid es un asistente de inteligencia artificial diseñado específicamente para dispositivos Android antiguos (versiones 4.1 a 9). Este asistente utiliza la tecnología de Google Gemini y Pollinations.ai, y está optimizado para ofrecer una experiencia fluida y útil en dispositivos con recursos limitados.
44
Si este no es compatible puedes probar [CreaProPhone J2ME](https://github.com/Creadores-Program/CreaProPhone) con [J2ME Loader de SpoxgoStore](https://spoxgostore-blogspot.com/p/j2me-loader.html) que extiende la compatibilidad a Android 2.3
55

66
## **Características**
77
- **Asistente de IA**: Responde preguntas, realiza tareas y ofrece asistencia personalizada.
8-
- **Compatibilidad con Android Antiguo**: Diseñado para funcionar en dispositivos con Android 4.2 a 8.1.
8+
- **Compatibilidad con Android Antiguo**: Diseñado para funcionar en dispositivos con Android 4.1 a 9.
99
- **Reconocimiento de Voz**: Permite interactuar mediante comandos de voz.
1010
- **Generación de Imágenes**: Genera imágenes basadas en descripciones proporcionadas por el usuario con Pollinations.ai.
1111
- **Apertura de Aplicaciones**: Puede abrir aplicaciones instaladas en el dispositivo.
1212
- **Soporte para Archivos**: Procesa archivos de texto proporcionados por el usuario.
1313
- **Interfaz Amigable**: Diseño intuitivo y fácil de usar.
1414

1515
## **Requisitos**
16-
- **Versión de Android**: 4.2 (Jelly Bean) a 8.1 (Oreo).
16+
- **Versión de Android**: 4.1 (Jelly Bean) a 9 (Pie).
1717
- **Permisos Necesarios**:
1818
- Acceso a Internet.
1919
- Lectura y escritura en almacenamiento externo.
@@ -63,12 +63,10 @@ Para preguntas o soporte, contacta a [Creadores Program](https://github.com/Crea
6363
- Github Copilot
6464
- Microsoft Copilot
6565
- Gemini
66-
- MarkdownToHtml for es5
66+
- MarkdownToHtml
6767
- Google Fonts
68-
- Support Custom Tabs
6968
- Okhttp
7069
- okio
71-
- Support App Compats
72-
- Support Compat v4
70+
- Androidx Browser custom tabs
7371
- Pollinations.ai
7472
- Conscrypt

app/build.gradle

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,17 @@ plugins {
33
}
44
dependencies {
55
implementation 'com.squareup.okhttp3:okhttp:3.12.13'
6-
implementation 'org.conscrypt:conscrypt-android:2.5.2'
7-
implementation files('libs/Compatv4.jar')
8-
implementation files('libs/zappcompats.jar')
9-
implementation files('libs/customTabs.jar')
6+
implementation 'org.conscrypt:conscrypt-android:2.5.3'
7+
implementation 'androidx.browser:browser:1.3.0'
108
}
119

1210
android {
1311
namespace 'org.CreadoresProgram.CreaProDroid'
14-
compileSdkVersion 21
12+
compileSdkVersion 28
1513

1614
defaultConfig {
17-
minSdkVersion 17
18-
targetSdkVersion 21
15+
minSdkVersion 16
16+
targetSdkVersion 28
1917
versionCode 6
2018
versionName "1.4.0-beta"
2119
}

app/libs/Compatv4.jar

-613 KB
Binary file not shown.

app/libs/customTabs.jar

-63.9 KB
Binary file not shown.

app/libs/zappcompats.jar

-704 KB
Binary file not shown.

app/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="org.CreadoresProgram.CreaProDroid" android:versionCode="6" android:versionName="1.4.0-beta">
4-
<uses-sdk android:minSdkVersion="17" android:targetSdkVersion="21" />
4+
<uses-sdk android:minSdkVersion="16" android:targetSdkVersion="28" />
55
<uses-permission android:name="android.permission.INTERNET" />
66
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
77
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

app/src/main/assets/IA/MaxIA/CreaProDroid.md

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# CreaProDroid (Tu)
22

3-
CreaProDroid es un asistente de inteligencia artificial diseñado específicamente para dispositivos Android antiguos (versiones 4.2 a 8.1). Este asistente utiliza la tecnología de Google Gemini y Pollinations.ai, y está optimizado para ofrecer una experiencia fluida y útil en dispositivos con recursos limitados.
3+
CreaProDroid es un asistente de inteligencia artificial diseñado específicamente para dispositivos Android antiguos (versiones 4.1 a 9). Este asistente utiliza la tecnología de Google Gemini y Pollinations.ai, y está optimizado para ofrecer una experiencia fluida y útil en dispositivos con recursos limitados.
44

55
## **Características**
66
- **Asistente de IA**: Responde preguntas, realiza tareas y ofrece asistencia personalizada.
7-
- **Compatibilidad con Android Antiguo**: Diseñado para funcionar en dispositivos con Android 4.2 a 8.1.
7+
- **Compatibilidad con Android Antiguo**: Diseñado para funcionar en dispositivos con Android 4.1 a 9.
88
- **Reconocimiento de Voz**: Permite interactuar mediante comandos de voz.
99
- **Generación de Imágenes**: Genera imágenes basadas en descripciones proporcionadas por el usuario con Pollinations.ai.
1010
- **Apertura de Aplicaciones**: Puede abrir aplicaciones instaladas en el dispositivo.
1111
- **Soporte para Archivos**: Procesa archivos de texto proporcionados por el usuario.
1212
- **Interfaz Amigable**: Diseño intuitivo y fácil de usar.
1313

1414
## **Requisitos**
15-
- **Versión de Android**: 4.2 (Jelly Bean) a 8.1 (Oreo).
15+
- **Versión de Android**: 4.1 (Jelly Bean) a 9 (Pie).
1616
- **Permisos Necesarios**:
1717
- Acceso a Internet.
1818
- Lectura y escritura en almacenamiento externo.
@@ -93,16 +93,20 @@ Para preguntas o soporte, contacta a [Creadores Program](https://github.com/Crea
9393
- Se arreglo el bug de tls antiguo en algunas peticiones de red.
9494
- Se arreglo el bug que hacia que al abrir la app o actualizar el modelo de Ia fuera Invalido y usara el chatbot offline hasta cambiarlo manualmente desde Configuración (Ya no debe pasar).
9595
- Se arregló el bug de String en Java que usaba == y no equals (ya debe funcionar correctamente)
96-
- Arreglos sutiles en css.
96+
- Arreglo de bugs de css en bloque de código y en android 4.1-4.4.
9797
- Optimización de clientes de red.
9898
- Actualizacion de Base de Datos
9999
- Actualizar CreadorCraftChatventure a CreadorCraft Chat Edition (CreadorCraftChatventure v2.0)
100+
- Extender la compatibilidad de 4.2-8.1 a 4.1-9
101+
- Arreglar Bugs de Markdown
102+
- Añadir traducciones de inglés, francés, italiano y portugués.
103+
- Mejorar chatbot Offline en algoritmo de reconocimiento de preguntas.
100104

101105
## Creditos
102106
- Github Copilot
103107
- Microsoft Copilot
104108
- Gemini
105-
- MarkdownToHtml for es5
109+
- MarkdownToHtml
106110
- Google Fonts
107111
- Support Custom Tabs
108112
- Okhttp

app/src/main/assets/index.html

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,52 +5,61 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1.0, height=device-height, user-scalable=no minimum-scale=1.0, maximum-scale=1.0">
66
<title>CreaProDroid</title>
77
<link rel="stylesheet" href="./style.css"/>
8-
<script src="./libsJs/Simple-Markdown.js"></script>
8+
<script src="./libsJs/markdown-to-html-cpd-edition.js"></script>
99
<script src="./main.js"></script>
1010
</head>
1111
<body>
1212
<div id="Home" class="InterfaceH">
13-
<div class="chat-header" style="position: -webkit-sticky; position: sticky; top: 0;">
13+
<div class="chat-header">
1414
<h1>CreaProDroid</h1>
1515
<div id="openHistoryChats" style="width: 40px; height: 40px; background: url('./resources/chat_paste_go.png') 50% 50% no-repeat; background-size: contain;" onclick="document.getElementById('Home').style.display = 'none'; document.getElementById('OldsChats').style.display = 'block'; updateHistoryChatHtml();"></div>
1616
<div id="configBtn" style="width: 40px; height: 40px; background: url('./resources/settings.png') 50% 50% no-repeat; background-size: contain;" onclick="document.getElementById('Home').style.display = 'none'; document.getElementById('Config').style.display = 'block';"></div>
1717
</div>
1818
<div class="chat-container" id="Chat"></div>
19-
<div class="input-container" style="position: -webkit-sticky; position: sticky; bottom: 0;">
19+
<div class="input-container">
2020
<button id="upFile" onclick="Android.openFileUploader()" style="background: url('./resources/addCircle.png') 50% 50% no-repeat; background-size: contain;"></button>
21-
<input type="text" id="inputChat" placeholder="Escribe un mensaje..." onkeydown="if(event.keyCode == 13){ if(document.getElementById('inputChat').value != null && document.getElementById('inputChat').value.trim() != ''){ sendMessage(document.getElementById('inputChat').value +filesI, false); document.getElementById('inputChat').value = ''; filesI = ''; } }" />
21+
<input type="text" id="inputChat" onkeydown="if(event.keyCode == 13){ if(document.getElementById('inputChat').value != null && document.getElementById('inputChat').value.trim() != ''){ sendMessage(document.getElementById('inputChat').value +filesI, false); document.getElementById('inputChat').value = ''; filesI = ''; } }" />
2222
<button id="sendBtn" style="background: url('./resources/send.png') 50% 50% no-repeat; background-size: contain;" onclick="if(document.getElementById('inputChat').value != null && document.getElementById('inputChat').value.trim() != ''){ sendMessage(document.getElementById('inputChat').value +filesI, false); document.getElementById('inputChat').value = ''; filesI = ''; }"></button>
2323
<button onclick="Android.stopSpeak(); Android.startSpeechRecognition();" style="background: url('./resources/mic.png') 50% 50% no-repeat; background-size: contain;"></button>
24-
<button onclick="if(confirm('Quieres Borrar la conversacion?')){ Android.clearChat(); document.getElementById('Chat').innerHTML = ''; }" style="background: url('./resources/chat_error.png') 50% 50% no-repeat;"></button>
24+
<button onclick="if(confirm(window.langPage.borrarConversacion)){ Android.clearChat(); document.getElementById('Chat').innerHTML = ''; }" style="background: url('./resources/chat_error.png') 50% 50% no-repeat;"></button>
25+
</div>
26+
</div>
27+
<div class="InterfaceH HideDef" id="ReqPerms">
28+
<div id="reqPerms-header" style="position: -webkit-sticky; position: sticky; top: 0;">
29+
<h1 langId="permisos"></h1>
30+
</div>
31+
<div id="reqPermsDesq">
32+
<p langId="permisosDesq"></p><button langId="verGithub" class="github-btn" onclick="Android.openUrl('https://github.com/Creadores-Program/CreaProDroid')"></button><br/>
33+
<button langId="aceptarPermisos" id="reqPermsBtn" onclick="Android.reqPerms(); if(Android.hasPerms()){ document.getElementById('ReqPerms').style.display = 'none'; document.getElementById('Home').style.display = 'block'; }"></button>
2534
</div>
2635
</div>
2736
<div class="InterfaceH HideDef" id="OldsChats">
2837
<div id="oldChats-header" style="position: -webkit-sticky; position: sticky; top: 0;">
2938
<div id="backOlCBtn" style="width: 40px; height: 40px; background: url('./resources/close.png') 50% 50% no-repeat; background-size: contain;" onclick="document.getElementById('OldsChats').style.display = 'none'; document.getElementById('Home').style.display = 'block';"></div>
30-
<h1>Chats Anteriores</h1>
39+
<h1 langId="chatsAnterior"></h1>
3140
</div>
3241
<div id="oldChats-container"></div>
3342
</div>
3443
<div id="Config" class="InterfaceH HideDef">
3544
<div id="config-header" style="position: -webkit-sticky; position: sticky; top: 0;">
3645
<div id="backConfBtn" style="width: 40px; height: 40px; background: url('./resources/close.png') 50% 50% no-repeat; background-size: contain;" onclick="document.getElementById('Config').style.display = 'none'; document.getElementById('Home').style.display = 'block';"></div>
37-
<h1>Configuración</h1>
46+
<h1 langId="config"></h1>
3847
</div>
3948
<div id="config-container">
40-
<button onclick="subApiKey = encodeURIComponent(prompt('Escribe tu API key:')); if(subApiKey == null || subApiKey.trim() == ''){ alert('No se puede continuar sin la API key.'); throw new Error('No se puede continuar sin la API key.'); } try{ if(Android.promptGemini('Este Es Un Test de ti porfavor responde un Saludo!', subApiKey) == '{{KeyInvalidTest74284}}') throw new Error('Error Key Invalida!'); }catch(e){ alert('Error Key Invalida!'); throw new Error('Error Key Invalida!'); } Android.clearChat(); localStorage.setItem('apiKey', subApiKey); apiKey = subApiKey; delete subApiKey;">Actualizar API Key de Gemini</button><br/>
41-
<button onclick="var subUserName = prompt('Escribe tu nombre:'); if(subUserName == null || subUserName.trim() == ''){ alert('No se puede continuar sin el nombre.'); throw new Error('No se puede continuar sin el nombre.'); }else if(subUserName.length < 5 || subUserName.length > 20){ alert('El nombre debe tener entre 5 y 20 caracteres.'); throw new Error('El nombre debe tener entre 5 y 20 caracteres.'); } Android.setUserName(subUserName); localStorage.setItem('userName', userName); userName = subUserName; delete subUserName;">Actualizar Nombre</button><br/>
42-
<label id="modelIA-label" for="modelIA"></label>
49+
<button langId="actualizApiKey" onclick="subApiKey = prompt(window.langPage.escribirApikey); if(subApiKey == null || subApiKey.trim() == ''){ alert(window.langPage.noContinuarSinApiKey); throw new Error(window.langPage.noContinuarSinApiKey); } try{ if(Android.promptGemini('Este Es Un Test de ti porfavor responde un Saludo!', subApiKey) == '{{KeyInvalidTest74284}}') throw new Error(window.langPage.keyInvalida); }catch(e){ alert(window.langPage.keyInvalida); throw e; } Android.clearChat(); localStorage.setItem('apiKey', subApiKey); apiKey = subApiKey; delete subApiKey;"></button><br/>
50+
<button langId="actualizNombre" onclick="var subUserName = prompt(window.langPage.escribeNombre); if(subUserName == null || subUserName.trim() == ''){ alert(window.langPage.noContinuarSinNombre); throw new Error(window.langPage.noContinuarSinNombre); }else if(subUserName.length < 5 || subUserName.length > 20){ alert(window.langPage.nombreInvalido); throw new Error(window.langPage.nombreInvalido); } Android.setUserName(subUserName); localStorage.setItem('userName', userName); userName = subUserName; delete subUserName;"></button><br/>
51+
<label langId="selecModeloIa" id="modelIA-label" for="modelIA"></label>
4352
<select id="modelIA">
4453
<option value="0">Gemini Pro</option>
4554
<option value="1" selected=selected>Gemini Flash</option>
4655
<option value="2">Gemini Flash Lite</option>
4756
</select><br/>
48-
<button onclick="Android.clearCache(); alert('Cache Borrada!');">Borrar Cache</button>
49-
<button onclick="verifyUpdate(true);">Buscar Actualizaciones</button><br/>
57+
<button langId="borrarCache" onclick="Android.clearCache(); alert(window.langPage.cacheBorrada);"></button>
58+
<button langId="buscarActualiz" onclick="verifyUpdate(true);"></button><br/>
5059
<div class="custom-prompt-container">
51-
<label for="customPrompt" style="font-weight: bold;color: #e0e0e0;">Instrucción personalizada para la IA:</label>
52-
<textarea id="customPrompt" rows="3" style="width: 100%;margin: 8px;background: #2c2c2c;color: #fff;border-radius: 8px;padding: 10px;font-size: 15px;"></textarea>
53-
<button onclick="setCustomPrompt()">Guardar</button>
60+
<label langId="instrucPerson" for="customPrompt" style="font-weight: bold;color: #e0e0e0;"></label>
61+
<textarea id="customPrompt" rows="3" style="width: 80%;margin: 8px;background: #2c2c2c;color: #fff;border-radius: 8px;padding: 10px;font-size: 15px;"></textarea>
62+
<button langId="guardar" onclick="setCustomPrompt()"></button>
5463
</div><br/>
5564
<h2>Plugins:</h2><br/>
5665
<div class="plugin-switch-container">
@@ -59,33 +68,39 @@ <h2>Plugins:</h2><br/>
5968
<span class="slider"></span>
6069
<span class="plugin-label">
6170
Contacts
62-
<span class="plugin-desc">Accede a tus contactos y muestra nombres, teléfonos y correos.</span>
71+
<span langId="contactosPluginDesq" class="plugin-desc"></span>
6372
</span>
6473
</label>
6574
<label class="plugin-switch">
6675
<input type="checkbox" id="pluginDeviceInfo">
6776
<span class="slider"></span>
6877
<span class="plugin-label">
6978
Device Info
70-
<span class="plugin-desc">Obtiene información del dispositivo.</span>
79+
<span langId="dispositivoPluginDesq" class="plugin-desc"></span>
7180
</span>
7281
</label>
7382
<label class="plugin-switch">
7483
<input type="checkbox" id="pluginPersonality">
7584
<span class="slider"></span>
7685
<span class="plugin-label">
7786
Personality
78-
<span class="plugin-desc">Permite que la IA tenga su propia personalidad segun los chats.</span>
87+
<span langId="personalidadPluginDesq" class="plugin-desc"></span>
7988
</span>
8089
</label>
8190
<label class="plugin-switch">
8291
<input type="checkbox" id="pluginAvancedActions">
8392
<span class="slider"></span>
8493
<span class="plugin-label">
8594
Avanced Actions
86-
<span class="plugin-desc">Permite ejecutar acciones avanzadas y comandos especiales.</span>
95+
<span langId="accionesPluginDesq" class="plugin-desc"></span>
8796
</span>
8897
</label>
98+
</div><br/>
99+
<h2 langId="acercaDe"></h2><br/>
100+
<div class="about-section">
101+
<h3>CreaProDroid</h3>
102+
<p langId="acercaDeDesq"></p>
103+
<button langId="verGithub" class="github-btn" onclick="Android.openUrl('https://github.com/Creadores-Program/CreaProDroid')"></button>
89104
</div>
90105
</div>
91106
</div>

0 commit comments

Comments
 (0)