Im trying to implements googlePlus login for an Android app, but when i call the function
this.googlePlus.login({
'webClientId': 'XXXXXXXXXXXXXXX-XXXXXXXXXXXXXX.XXXX.XXXXXXXXXXXXXXXX.XXX',
'offline': true
}).then( obj=>
this.afAuth.signInWithCredential(firebase.auth.GoogleAuthProvider.credential(e.idToken));)
.catch(e => console.log('Error login', e));
It just finish without print anything in then or catch. Im trying to change the PLAY_SERVICES_VERSION to 11.8.0 following the documentation, but it doesn't work.
And SHA1 verification was ok executing this.googlePlus.getSigningCertificateFingerprint
Ionic Version
6.11.0 Cordova version: 10.0.0
My package.json
{
"name": "XXXX",
"version": "1.0.0",
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/common": "~8.2.14",
"@angular/core": "~8.2.14",
"@angular/fire": "^6.0.0",
"@angular/forms": "~8.2.14",
"@angular/platform-browser": "~8.2.14",
"@angular/platform-browser-dynamic": "~8.2.14",
"@angular/router": "~8.2.14",
"@capacitor/core": "2.0.2",
"@ionic-native/background-mode": "^5.28.0",
"@ionic-native/calendar": "^4.20.0",
"@ionic-native/core": "^5.0.7",
"@ionic-native/facebook": "^5.25.0",
"@ionic-native/fcm": "^5.28.0",
"@ionic-native/geolocation": "^5.26.0",
"@ionic-native/google-maps": "^5.5.0",
"@ionic-native/google-plus": "^5.24.0",
"@ionic-native/local-notifications": "^5.28.0",
"@ionic-native/native-geocoder": "^5.26.0",
"@ionic-native/splash-screen": "^5.0.0",
"@ionic-native/status-bar": "^5.0.0",
"@ionic/angular": "^5.0.0",
"angular-geocoder": "^9.2.0",
"cordova-android": "8.1.0",
"cordova-ios": "5.1.1",
"cordova-plugin-add-swift-support": "^2.0.2",
"cordova-plugin-calendar": "^5.1.5",
"cordova-plugin-facebook4": "^6.4.0",
"cordova-plugin-gaodelocation-chenyu": "^2.0.5",
"cordova-plugin-geolocation": "^4.0.2",
"cordova-plugin-googlemaps": "^2.7.1",
"cordova-plugin-googleplus": "^8.4.0",
"cordova-plugin-nativegeocoder": "^3.4.1",
"core-js": "^2.5.4",
"firebase": "^7.14.2",
"ionic2-calendar": "^0.6.6",
"native-run": "^1.0.0",
"rxjs": "~6.5.1",
"tslib": "^1.9.0",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.803.26",
"@angular/cli": "8.3.26",
"@angular/compiler": "~8.2.14",
"@angular/compiler-cli": "~8.2.14",
"@angular/language-service": "~8.2.14",
"@capacitor/cli": "2.0.2",
"@ionic/angular-toolkit": "^2.1.1",
"@ionic/lab": "^3.1.7",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "^5.0.0",
"cordova-plugin-androidx": "^2.0.0",
"cordova-plugin-androidx-adapter": "^1.1.1",
"cordova-plugin-background-mode": "^0.7.3",
"cordova-plugin-badge": "^0.8.8",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-fcm-with-dependecy-updated": "^7.3.1",
"cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-ionic-webview": "^4.2.1",
"cordova-plugin-local-notification": "^0.9.0-beta.3",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "^5.0.8",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"protractor": "^7.0.0",
"ts-node": "~7.0.0",
"tslint": "~5.15.0",
"typescript": "~3.4.3"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-googleplus": {
"REVERSED_CLIENT_ID": "com.googleusercontent.apps.714643824110-a9dslj384jl1pncf8tco5p48611nhaj3",
"PLAY_SERVICES_VERSION": "11.8.0"
},
"cordova-plugin-facebook4": {
"APP_ID": "XXXXXXXXXXXXXXXXXX",
"APP_NAME": "XXXXXX",
"FACEBOOK_HYBRID_APP_EVENTS": "false",
"FACEBOOK_ANDROID_SDK_VERSION": "5.13.0"
},
"cordova-plugin-geolocation": {},
"cordova-plugin-nativegeocoder": {},
"cordova-plugin-calendar": {},
"cordova-plugin-fcm-with-dependecy-updated": {
"ANDROID_FCM_VERSION": "19.0.0",
"ANDROID_GRADLE_TOOLS_VERSION": "3.5.3",
"ANDROID_GOOGLE_SERVICES_VERSION": "4.3.3",
"ANDROID_DEFAULT_NOTIFICATION_ICON": "@mipmap/ic_launcher"
},
"cordova-plugin-androidx": {},
"cordova-plugin-androidx-adapter": {},
"cordova-plugin-background-mode": {},
"cordova-plugin-local-notification": {}
},
"platforms": [
"android",
"ios"
]
}
}
Please some help, i spent more than a week trying to solve this.
Finally i found the problem, it happend when implements @ionic-native/background-mode, i just run this:
And it works for me.