parent
3838b3a2d6
commit
d6c69708fa
@ -44,7 +44,6 @@
|
||||
<uses-feature android:name="android.hardware.camera" android:required="true" />
|
||||
</config-file>
|
||||
<resource-file src="resources/android/xml/network_security_config.xml" target="app/src/main/res/xml/network_security_config.xml" />
|
||||
<resource-file src="google-services.json" target="app/google-services.json" />
|
||||
<allow-intent href="market:*" />
|
||||
<icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" />
|
||||
<icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" />
|
||||
|
||||
@ -1,39 +0,0 @@
|
||||
{
|
||||
"project_info": {
|
||||
"project_number": "223378697047",
|
||||
"project_id": "vnms-8672d",
|
||||
"storage_bucket": "vnms-8672d.appspot.com"
|
||||
},
|
||||
"client": [
|
||||
{
|
||||
"client_info": {
|
||||
"mobilesdk_app_id": "1:223378697047:android:d5887e9a0bcc9c84f06c12",
|
||||
"android_client_info": {
|
||||
"package_name": "com.Bigbamboo.vnms"
|
||||
}
|
||||
},
|
||||
"oauth_client": [
|
||||
{
|
||||
"client_id": "223378697047-prebc4oi7h7107lpa5nmrkejmir8de2l.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
],
|
||||
"api_key": [
|
||||
{
|
||||
"current_key": "AIzaSyBE05C1K9vOh6blvbF2wmI5Thbg9qNey1U"
|
||||
}
|
||||
],
|
||||
"services": {
|
||||
"appinvite_service": {
|
||||
"other_platform_oauth_client": [
|
||||
{
|
||||
"client_id": "223378697047-prebc4oi7h7107lpa5nmrkejmir8de2l.apps.googleusercontent.com",
|
||||
"client_type": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"configuration_version": "1"
|
||||
}
|
||||
10864
package-lock.json
generated
10864
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
11
package.json
11
package.json
@ -23,14 +23,11 @@
|
||||
"@awesome-cordova-plugins/camera": "^6.2.0",
|
||||
"@awesome-cordova-plugins/splash-screen": "^6.2.0",
|
||||
"@awesome-cordova-plugins/status-bar": "^6.2.0",
|
||||
"@ionic-native/fcm": "^5.36.0",
|
||||
"@ionic-native/firebase": "^5.36.0",
|
||||
"@ionic/angular": "^6.1.9",
|
||||
"@ionic/cli": "^7.1.1",
|
||||
"@ionic/cordova-builders": "^7.0.0",
|
||||
"@ionic/storage": "^4.0.0",
|
||||
"@ionic/storage-angular": "^3.0.6",
|
||||
"firebase": "^10.1.0",
|
||||
"ionicons": "^6.0.3",
|
||||
"ng2-charts": "^4.1.1",
|
||||
"rxjs": "~7.5.0",
|
||||
@ -55,7 +52,6 @@
|
||||
"cordova-android": "^12.0.0",
|
||||
"cordova-plugin-camera": "^6.0.0",
|
||||
"cordova-plugin-device": "^2.0.2",
|
||||
"cordova-plugin-fcm-with-dependecy-updated": "^7.8.0",
|
||||
"cordova-plugin-ionic-keyboard": "^2.0.5",
|
||||
"cordova-plugin-ionic-webview": "^5.0.0",
|
||||
"cordova-plugin-splashscreen": "5.0.2",
|
||||
@ -85,9 +81,10 @@
|
||||
"cordova-plugin-ionic-keyboard": {},
|
||||
"cordova-plugin-camera": {
|
||||
"ANDROIDX_CORE_VERSION": "1.6.+"
|
||||
},
|
||||
"cordova-plugin-fcm-with-dependecy-updated": {}
|
||||
}
|
||||
},
|
||||
"platforms": []
|
||||
"platforms": [
|
||||
"android"
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -7,9 +7,6 @@ import { StatusBar } from '@awesome-cordova-plugins/status-bar/ngx';
|
||||
import { Storage } from '@ionic/storage-angular';
|
||||
import { Pages } from './interfaces/pages';
|
||||
import { VnmsService } from './pages/vnms/vnms.service';
|
||||
|
||||
import { Firebase } from '@ionic-native/firebase/ngx';
|
||||
import { FCM } from '@ionic-native/fcm/ngx';
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
templateUrl: 'app.component.html',
|
||||
@ -26,8 +23,6 @@ export class AppComponent {
|
||||
private splashScreen: SplashScreen,
|
||||
private statusBar: StatusBar,private storage: Storage,
|
||||
public navCtrl: NavController,public _api:VnmsService,
|
||||
private firebase: Firebase,
|
||||
private fcm: FCM
|
||||
) {
|
||||
this.initStorage();
|
||||
|
||||
@ -259,31 +254,9 @@ export class AppComponent {
|
||||
}
|
||||
|
||||
initializeApp() {
|
||||
console.log("entry")
|
||||
this.platform.ready().then(() => {
|
||||
this.statusBar.styleDefault();
|
||||
this.splashScreen.hide();
|
||||
// this.firebase.initializeApp(environment.firebase);
|
||||
|
||||
// Get the FCM token
|
||||
this.fcm.getToken().then(token => {
|
||||
console.log('FCM Token:', token);
|
||||
// You can save the token on your server to send notifications later.
|
||||
});
|
||||
|
||||
// Handle incoming notifications
|
||||
this.fcm.onNotification().subscribe(data => {
|
||||
console.log('Received notification:', data);
|
||||
// Handle the received notification here
|
||||
});
|
||||
|
||||
// Request permission for push notifications
|
||||
let fcm:any= this.fcm
|
||||
fcm.requestPermission().then(() => {
|
||||
console.log('Permission granted!');
|
||||
}).catch((error:any) => {
|
||||
console.error('Permission denied:', error);
|
||||
});
|
||||
}).catch(() => {});
|
||||
}
|
||||
async initStorage() {
|
||||
|
||||
@ -29,8 +29,6 @@ import { StatusBar } from '@awesome-cordova-plugins/status-bar/ngx';
|
||||
import { vnmsModule } from './pages/vnms/vnms.module';
|
||||
import { AuthGuard } from './guard/auth.guard';
|
||||
import { TokenInterceptor } from './guard/token.interceptor';
|
||||
import { FCM } from '@ionic-native/fcm/ngx';
|
||||
import { Firebase } from '@ionic-native/firebase/ngx';
|
||||
@NgModule({
|
||||
declarations: [AppComponent,AuthenticationComponent,vnmsComponent],
|
||||
imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule,
|
||||
@ -52,7 +50,7 @@ import { Firebase } from '@ionic-native/firebase/ngx';
|
||||
MatIconModule,
|
||||
MatButtonModule,
|
||||
],
|
||||
providers: [ Firebase,FCM, StatusBar,AuthGuard, {
|
||||
providers: [ StatusBar,AuthGuard, {
|
||||
provide: HTTP_INTERCEPTORS,
|
||||
useClass: TokenInterceptor,
|
||||
multi: true
|
||||
|
||||
Loading…
Reference in New Issue
Block a user