@@ -4,6 +4,7 @@ | |||||
"bundledWebRuntime": false, | "bundledWebRuntime": false, | ||||
"npmClient": "npm", | "npmClient": "npm", | ||||
"webDir": "www", | "webDir": "www", | ||||
"linuxAndroidStudioPath": "/home/kj1352/android-studio/android-studio/bin/studio.sh", | |||||
"plugins": { | "plugins": { | ||||
"SplashScreen": { | "SplashScreen": { | ||||
"launchShowDuration": 0 | "launchShowDuration": 0 | ||||
@@ -1797,6 +1797,14 @@ | |||||
} | } | ||||
} | } | ||||
}, | }, | ||||
"@ionic-native/android-full-screen": { | |||||
"version": "5.32.1", | |||||
"resolved": "https://registry.npmjs.org/@ionic-native/android-full-screen/-/android-full-screen-5.32.1.tgz", | |||||
"integrity": "sha512-UIA2sAYYr9GMp+TBXxJ/0E97XpKkAvtJLb8jOz/ckyRa2MvxgrFTIU3KAyh2/vKoSjDxegvjelZil+1tgH18hA==", | |||||
"requires": { | |||||
"@types/cordova": "^0.0.34" | |||||
} | |||||
}, | |||||
"@ionic-native/app-version": { | "@ionic-native/app-version": { | ||||
"version": "5.32.0", | "version": "5.32.0", | ||||
"resolved": "https://registry.npmjs.org/@ionic-native/app-version/-/app-version-5.32.0.tgz", | "resolved": "https://registry.npmjs.org/@ionic-native/app-version/-/app-version-5.32.0.tgz", | ||||
@@ -4729,6 +4737,11 @@ | |||||
"resolved": "https://registry.npmjs.org/cordova-plugin-file/-/cordova-plugin-file-6.0.2.tgz", | "resolved": "https://registry.npmjs.org/cordova-plugin-file/-/cordova-plugin-file-6.0.2.tgz", | ||||
"integrity": "sha512-m7cughw327CjONN/qjzsTpSesLaeybksQh420/gRuSXJX5Zt9NfgsSbqqKDon6jnQ9Mm7h7imgyO2uJ34XMBtA==" | "integrity": "sha512-m7cughw327CjONN/qjzsTpSesLaeybksQh420/gRuSXJX5Zt9NfgsSbqqKDon6jnQ9Mm7h7imgyO2uJ34XMBtA==" | ||||
}, | }, | ||||
"cordova-plugin-fullscreen": { | |||||
"version": "1.3.0", | |||||
"resolved": "https://registry.npmjs.org/cordova-plugin-fullscreen/-/cordova-plugin-fullscreen-1.3.0.tgz", | |||||
"integrity": "sha512-K0SQMUyemQrezNlnfyHXQd8BgpwR3TS/fx456GueRCUdro5QG6tCzDDVBCVEGeKroDhXWmabAlhvO3gPoqw/tg==" | |||||
}, | |||||
"cordova-plugin-ionic-keyboard": { | "cordova-plugin-ionic-keyboard": { | ||||
"version": "2.2.0", | "version": "2.2.0", | ||||
"resolved": "https://registry.npmjs.org/cordova-plugin-ionic-keyboard/-/cordova-plugin-ionic-keyboard-2.2.0.tgz", | "resolved": "https://registry.npmjs.org/cordova-plugin-ionic-keyboard/-/cordova-plugin-ionic-keyboard-2.2.0.tgz", | ||||
@@ -29,6 +29,7 @@ | |||||
"@capacitor-community/facebook-login": "^2.0.0", | "@capacitor-community/facebook-login": "^2.0.0", | ||||
"@capacitor/android": "^2.4.7", | "@capacitor/android": "^2.4.7", | ||||
"@capacitor/core": "2.4.7", | "@capacitor/core": "2.4.7", | ||||
"@ionic-native/android-full-screen": "^5.32.1", | |||||
"@ionic-native/app-version": "^5.32.0", | "@ionic-native/app-version": "^5.32.0", | ||||
"@ionic-native/core": "^5.0.0", | "@ionic-native/core": "^5.0.0", | ||||
"@ionic-native/http": "^5.32.0", | "@ionic-native/http": "^5.32.0", | ||||
@@ -39,6 +40,7 @@ | |||||
"cordova-plugin-advanced-http": "^3.1.0", | "cordova-plugin-advanced-http": "^3.1.0", | ||||
"cordova-plugin-app-version": "^0.1.12", | "cordova-plugin-app-version": "^0.1.12", | ||||
"cordova-plugin-file": "^6.0.2", | "cordova-plugin-file": "^6.0.2", | ||||
"cordova-plugin-fullscreen": "^1.3.0", | |||||
"cordova-plugin-x-socialsharing": "^6.0.3", | "cordova-plugin-x-socialsharing": "^6.0.3", | ||||
"cordova-res": "^0.15.3", | "cordova-res": "^0.15.3", | ||||
"es6-promise-plugin": "^4.2.2", | "es6-promise-plugin": "^4.2.2", | ||||
@@ -3,6 +3,7 @@ import { Component } from '@angular/core'; | |||||
import { Platform } from '@ionic/angular'; | import { Platform } from '@ionic/angular'; | ||||
import { SplashScreen } from '@ionic-native/splash-screen/ngx'; | import { SplashScreen } from '@ionic-native/splash-screen/ngx'; | ||||
import { StatusBar } from '@ionic-native/status-bar/ngx'; | import { StatusBar } from '@ionic-native/status-bar/ngx'; | ||||
import { AndroidFullScreen } from '@ionic-native/android-full-screen/ngx'; | |||||
@Component({ | @Component({ | ||||
selector: 'app-root', | selector: 'app-root', | ||||
@@ -15,7 +16,8 @@ export class AppComponent { | |||||
constructor( | constructor( | ||||
private platform: Platform, | private platform: Platform, | ||||
private splashScreen: SplashScreen, | private splashScreen: SplashScreen, | ||||
private statusBar: StatusBar | |||||
private statusBar: StatusBar, | |||||
private androidFullScreen: AndroidFullScreen | |||||
) { | ) { | ||||
this.initializeApp(); | this.initializeApp(); | ||||
} | } | ||||
@@ -24,9 +26,8 @@ export class AppComponent { | |||||
this.platform.ready().then(() => { | this.platform.ready().then(() => { | ||||
this.statusBar.styleDefault(); | this.statusBar.styleDefault(); | ||||
this.splashScreen.hide(); | this.splashScreen.hide(); | ||||
localStorage.isPartyChatOn = 'no'; | |||||
this.androidFullScreen.isImmersiveModeSupported().then(() => this.androidFullScreen.immersiveMode()); | |||||
}); | }); | ||||
} | } | ||||
} | } |
@@ -8,6 +8,7 @@ import { StatusBar } from '@ionic-native/status-bar/ngx'; | |||||
import { HTTP } from '@ionic-native/http/ngx'; | import { HTTP } from '@ionic-native/http/ngx'; | ||||
import { SocialSharing } from '@ionic-native/social-sharing/ngx'; | import { SocialSharing } from '@ionic-native/social-sharing/ngx'; | ||||
import { AppVersion } from '@ionic-native/app-version/ngx'; | import { AppVersion } from '@ionic-native/app-version/ngx'; | ||||
import { AndroidFullScreen } from '@ionic-native/android-full-screen/ngx'; | |||||
import { AppRoutingModule } from './app-routing.module'; | import { AppRoutingModule } from './app-routing.module'; | ||||
import { AppComponent } from './app.component'; | import { AppComponent } from './app.component'; | ||||
@@ -36,6 +37,7 @@ import { UserService } from './services/user.service'; | |||||
SplashScreen, | SplashScreen, | ||||
SocialSharing, | SocialSharing, | ||||
AppVersion, | AppVersion, | ||||
AndroidFullScreen, | |||||
NewsService, | NewsService, | ||||
MatchService, | MatchService, | ||||
UserService, | UserService, | ||||
@@ -53,7 +53,7 @@ export class FacebookLoginComponent implements OnInit { | |||||
} else { | } else { | ||||
this.hideAll = true; | this.hideAll = true; | ||||
} | |||||
} | |||||
} | } | ||||
async login() { | async login() { | ||||
@@ -82,14 +82,6 @@ export class FacebookLoginComponent implements OnInit { | |||||
if (result.accessToken) { | if (result.accessToken) { | ||||
this.token = result.accessToken; | this.token = result.accessToken; | ||||
this.loadUserData(); | this.loadUserData(); | ||||
localStorage.setItem('FBToken', JSON.stringify(this.token)); | |||||
this.userService.getUserProfile().then((data) => { | |||||
localStorage.setItem('ServerUserData', JSON.stringify(data)); | |||||
}, err => alert(JSON.stringify(err))); | |||||
} else { | } else { | ||||
// Not logged in. | // Not logged in. | ||||
} | } | ||||
@@ -104,18 +96,23 @@ export class FacebookLoginComponent implements OnInit { | |||||
console.log(JSON.stringify(err)); | console.log(JSON.stringify(err)); | ||||
alert("Falied to fetch user data"); | alert("Falied to fetch user data"); | ||||
}); | }); | ||||
localStorage.setItem('FBToken', JSON.stringify(this.token)); | |||||
this.userService.getUserProfile().then((data) => { | |||||
localStorage.setItem('ServerUserData', JSON.stringify(data)); | |||||
}, err => alert(JSON.stringify(err))); | |||||
} | } | ||||
async logout() { | async logout() { | ||||
await this.fbLogin.logout().then(() => { | await this.fbLogin.logout().then(() => { | ||||
console.log("Logged Out"); | console.log("Logged Out"); | ||||
this.user = null; | |||||
this.token = null; | |||||
localStorage.removeItem('FBUser'); | |||||
localStorage.removeItem('FBToken'); | |||||
localStorage.removeItem('ServerUserData'); | |||||
App.exitApp(); | |||||
}, (err) => alert(JSON.stringify(err))); | }, (err) => alert(JSON.stringify(err))); | ||||
this.user = null; | |||||
this.token = null; | |||||
localStorage.removeItem('FBUser'); | |||||
localStorage.removeItem('FBToken'); | |||||
localStorage.removeItem('ServerUserData'); | |||||
App.exitApp(); | |||||
} | } | ||||
} | } |