Integración OneSignal y configuración HTTP nativo

- Configurar OneSignal con nuevo App ID
- Agregar network_security_config.xml para permitir HTTP
- Habilitar CapacitorHttp nativo en capacitor.config.ts
- Actualizar SDK a Android 34
- Configurar API_URL fija (192.168.10.207:8080)
- Agregar onesignal.service.ts

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
CarlosTorres
2026-01-21 05:09:51 +00:00
parent dfcb1168b9
commit 103f7f45a0
11 changed files with 330 additions and 22 deletions

View File

@@ -9,20 +9,22 @@ android {
apply from: "../capacitor-cordova-android-plugins/cordova.variables.gradle"
dependencies {
implementation project(':capacitor-community-facebook-login')
implementation project(':capacitor-community-http')
implementation project(':capacitor-app')
implementation project(':capacitor-browser')
implementation project(':capacitor-camera')
implementation project(':capacitor-filesystem')
implementation project(':capacitor-geolocation')
implementation project(':capacitor-haptics')
implementation project(':capacitor-keyboard')
implementation project(':capacitor-preferences')
implementation project(':capacitor-splash-screen')
implementation project(':capacitor-status-bar')
implementation "com.squareup.okhttp3:okhttp-urlconnection:3.10.0"
implementation "com.android.support:support-v4:27.+"
implementation "com.facebook.android:facebook-android-sdk:5.13.0"
implementation "com.google.android.gms:play-services-auth:15.0.1"
implementation "com.google.android.gms:play-services-identity:15.0.1"
implementation "com.google.android.gms:play-services-location:16.+"
implementation "com.onesignal:OneSignal:3.16.0"
implementation project(':codetrix-studio-capacitor-google-auth')
implementation "com.onesignal:OneSignal:5.1.38"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.7.10"
}
apply from: "../../node_modules/cordova-plugin-googlemaps/src/android/frameworks/tbxml-android.gradle"
apply from: "../../node_modules/cordova-plugin-googlemaps/src/android/frameworks/pgm-custom.gradle"
apply from: "../../node_modules/onesignal-cordova-plugin/build-extras-onesignal.gradle"
if (hasProperty('postBuildExtras')) {

View File

@@ -7,6 +7,8 @@
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:usesCleartextTraffic="true"
android:networkSecurityConfig="@xml/network_security_config"
android:theme="@style/AppTheme">
<activity

View File

@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system" />
</trust-anchors>
</base-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">192.168.10.207</domain>
</domain-config>
</network-security-config>