Some checks are pending
Build Android (APK + AAB) / build-android (push) Waiting to run
Bug: ao clicar "Entrar com Google" no APK Capacitor, app abria Chrome,
user logava OK ("Logado, volte pro app"), mas ao voltar pro app o login
não completava — ficava em loop pedindo pra logar de novo.
Causa: Android matava o WebView do app quando ele ia pra background
(usuario indo pro Chrome). Ao reabrir o app, _googleAuthPolling interval
estava perdido e o session_id (em variável JS) também.
Fix: persiste session_id em localStorage com timestamp. Adiciona
resumePollingIfPending() chamado em:
- Bootstrap (sempre, 500ms após init)
- visibilitychange visible (volta do background)
Também faz uma chamada imediata de poll antes de iniciar interval —
caso os tokens já estejam prontos quando o app reabre.
TTL de 10min no localStorage (mesmo TTL do Map no servidor) — após
isso considera expirado e limpa.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
63 lines
2.4 KiB
Groovy
63 lines
2.4 KiB
Groovy
apply plugin: 'com.android.application'
|
|
|
|
android {
|
|
namespace "br.com.pontualtech.shivao"
|
|
compileSdk rootProject.ext.compileSdkVersion
|
|
defaultConfig {
|
|
applicationId "br.com.pontualtech.shivao"
|
|
minSdkVersion rootProject.ext.minSdkVersion
|
|
targetSdkVersion rootProject.ext.targetSdkVersion
|
|
versionCode 9
|
|
versionName "1.6.2"
|
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
aaptOptions {
|
|
// Files and dirs to omit from the packaged assets dir, modified to accommodate modern web apps.
|
|
// Default: https://android.googlesource.com/platform/frameworks/base/+/282e181b58cf72b6ca770dc7ca5f91f135444502/tools/aapt/AaptAssets.cpp#61
|
|
ignoreAssetsPattern '!.svn:!.git:!.ds_store:!*.scc:.*:!CVS:!thumbs.db:!picasa.ini:!*~'
|
|
}
|
|
}
|
|
signingConfigs {
|
|
release {
|
|
storeFile file('shivao-release.keystore')
|
|
storePassword 'ShivaoKeystore2026!'
|
|
keyAlias 'shivao'
|
|
keyPassword 'ShivaoKeystore2026!'
|
|
}
|
|
}
|
|
buildTypes {
|
|
release {
|
|
minifyEnabled false
|
|
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
signingConfig signingConfigs.release
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
flatDir{
|
|
dirs '../capacitor-cordova-android-plugins/src/main/libs', 'libs'
|
|
}
|
|
}
|
|
|
|
dependencies {
|
|
implementation fileTree(include: ['*.jar'], dir: 'libs')
|
|
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
implementation "androidx.coordinatorlayout:coordinatorlayout:$androidxCoordinatorLayoutVersion"
|
|
implementation "androidx.core:core-splashscreen:$coreSplashScreenVersion"
|
|
implementation project(':capacitor-android')
|
|
testImplementation "junit:junit:$junitVersion"
|
|
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
implementation project(':capacitor-cordova-android-plugins')
|
|
}
|
|
|
|
apply from: 'capacitor.build.gradle'
|
|
|
|
try {
|
|
def servicesJSON = file('google-services.json')
|
|
if (servicesJSON.text) {
|
|
apply plugin: 'com.google.gms.google-services'
|
|
}
|
|
} catch(Exception e) {
|
|
logger.info("google-services.json not found, google-services plugin not applied. Push Notifications won't work")
|
|
}
|