show(message = '') { if (this.platform.is('cordova')) { this.toastNative.show(message, `${TOAST_DURATION}`, this.config.getToast('position', TOAST_POSITION)).subscribe(); } else { this.toastCtrl.create({ message, duration: this.config.getToast('duration', TOAST_DURATION) }).present(); } }
/** * opens the url with the system app if installed or in the browser * @param url url of the website */ openYouTube(url) { let app; if (this.platform.is('ios')) { app = 'youtube://'; } else if (this.platform.is('android')) { app = 'com.google.android.youtube'; } AppAvailability.check(app).then( function () { // Success callback open(url, '_system', 'location=no'); console.log('YouTube is available'); }, function () { // Error callback open(url, '_system', 'location=no'); console.log('YouTube is not available'); }); }
private initializeApp(): void { this.platform.ready().then(() => { // Okay, so the platform is ready and our plugins are available. // Here you can do any higher level native things you might need. // https://github.com/lathonez/clicker/issues/148#issuecomment-254436635 // StatusBar.styleDefault(); console.log('production: ' + environment.production); }); }
/** * opens the url with the system app if installed or in the browser * @param url url of the website */ openTwitter(url) { let app; if (this.platform.is('ios')) { app = 'twitter://'; } else if (this.platform.is('android')) { app = 'com.twitter.android'; } AppAvailability.check(app).then( function () { // Success callback open(url, '_system', 'location=no'); console.log('Twitter is available'); }, function () { // Error callback open(url, '_system', 'location=no'); console.log('Twitter is not available'); }); }
/** * opens the url with the system app if installed or in the browser * @param url url of the website */ openFacebook(url) { let app; if (this.platform.is('ios')) { app = 'fb://'; } else if (this.platform.is('android')) { app = 'com.facebook.katana'; } AppAvailability.check(app).then( function () { // Success callback open('fb://page/' + url, '_system', 'location=no'); console.log('Facebook is available'); }, function () { // Error callback open('https://www.facebook.com/' + url, '_system', 'location=no'); console.log('Facebook is not available'); }); }
ngOnInit() { //console.dir(this.el.nativeElement.attributes); if(this.color === 'light' && this.platform.is('ios')){ this.color = 'primary' this.el.nativeElement.style.color = `var(--color-${this.color})`; }else{ this.el.nativeElement.style.color = `var(--color-${this.color})`; } }
constructor(nav:NavController, platform:Platform) { this.nav = nav; platform.ready().then(() => { }); }
createDeleteButton(message, handler) { return { text: this.translate.instant(message), role: 'destructive', icon: !this.platform.is('ios') ? 'trash' : null, cssClass: 'WorkoutAction-delete', handler } }
initializeApp() { this.platform.ready().then(() => { // Okay, so the platform is ready and our plugins are available. // Here you can do any higher level native things you might need. StatusBar.styleDefault(); //Initialize facebook this.authProvider.initFacebook(); }); }
constructor(platform: Platform) { this.policy = "Privacy policy"; this.policyURL = "https://s3.priority-software.com/terms/master_privacy_policy.pdf"; if (platform.is("ios")) this.termsURL = "https://s3.priority-software.com/terms/master_termsofuse_appstore.pdf"; else this.termsURL = "https://s3.priority-software.com/terms/master_termsofuse_googleplay.pdf"; }