Quantcast
Channel: Ionic Forum - Latest topics
Viewing all 70896 articles
Browse latest View live

httpErrorResponse

$
0
0

Hello, I really tried to solve this problem by myself with google and other but it’s been 5h so I’m exhausted now xD

I have an app that connect to a wordpress site to display latest articles (it’s not live yet, it’s a work in progress). In the ionic lab, it works perfectly both Android and iOS. On real device, it’s work on Android too but on iOS, when the app launch it display an error “httpErrorResponse” and refuse to make any connection …

I did try to whiteliste, add my domain in the config xml, adding , … nothing made it work T_T

The NSAppTransportSecurity is configured too :

NSAppTransportSecurity

NSExceptionDomains

kissui.moe

NSExceptionAllowsInsecureHTTPLoads


localhost

NSExceptionAllowsInsecureHTTPLoads



NSAllowsArbitraryLoads

So why doesn’t it work ??? grrrr

Any help who be very appreciated !

1 post - 1 participant

Read full topic


Now is about Android Studio

$
0
0

This issue bring me out of my mind.
I have my project tested and compiled on Android Studio several months ago. I continue working and now, when I compiled AS give me some errors of compatibility on severals plugins. I realized that there is an update. I updated AS and now, there are two errors.

Plugin Error
Plugin “Android Studio Prettify” is incompatible (supported only in IntelliJ IDEA).
Plugin “Android Parcelable code generator” is incompatible (supported only in IntelliJ IDEA).

How is it possible?
Now, IntelliJ is better than AS?

Had someone a problem like this?

1 post - 1 participant

Read full topic

Best practice for single use root level services

$
0
0

In many apps you need to initialize the application from reading data from here and there (http, storage etc) and keep a global state. That single use “data loader” service is run once.

Ideally the resources (i.e. memory) it occupies should be removed. This might have a simple answer but I want to learn the correct way.

Thank you in advance…

1 post - 1 participant

Read full topic

CSS Selector Not Found

$
0
0

I’m having a problem with my Ionic Angular since yesterday. It is as if the Sass file does not compile or not linked to the HTML/TS file or does not exist at all.

I have a page called waktusolat.page.html, and every class/id selector I declared in the any tags on the page have "CSS class/id selector <class/id name> not found message. I have already declared those selectors in the waktusolat.page.scss.

I’m using VSCode btw.

waktusolat.page.html (incomplete because I rewrote it, but even when I completed it previously, the same thing happens.)

<ion-split-pane contentId="main" when="xl">
    <ion-menu contentId="main" type="overlay">
        <ion-header>
            <ion-toolbar>
                <div *ngIf="!loginState" id="menuHeader">
                    <ion-img src="../assets/icon.png"></ion-img>
                    Selamat Datang ke iMasjid
                </div>
                <div *ngIf="loginState">Selamat Datang<br><span id="username"><b>{{ username }}</b></span></div>
            </ion-toolbar>
        </ion-header>
  
        <ion-content>
            <ion-list lines="full">
              <ion-item href="/home" routerDirection="root">
                  <ion-icon src="assets/icon/home.svg"></ion-icon>
                  <ion-label>Utama</ion-label>
              </ion-item>
              <ion-item *ngIf="loginState" button href="/kehadiransolat" routerDirection="back">
                  <ion-icon src="assets/icon/kehadiransolat.svg"></ion-icon>
                  <ion-label>Kehadiran Solat</ion-label>
              </ion-item>
              <ion-item *ngIf="loginState" button href="/kehadiranimam" routerDirection="back">
                  <ion-icon src="assets/icon/kehadiranimam.svg"></ion-icon>
                  <ion-label>Kehadiran Imam</ion-label>
              </ion-item>
              <!-- <ion-item *ngIf="loginState" button href="/etempahan" routerDirection="back">
                  <ion-icon src="assets/icon/booking.svg"></ion-icon>
                  <ion-label>E-Tempahan</ion-label>
              </ion-item>
              <ion-item *ngIf="loginState" button href="/jadualkuliah" routerDirection="back">
                  <ion-icon src="assets/icon/jadual.svg"></ion-icon>
                  <ion-label>Jadual Kuliah</ion-label>
              </ion-item> -->
              <ion-item *ngIf="loginState" button href="/qiblatfinder" routerDirection="back">
                  <ion-icon src="assets/icon/qiblat.svg"></ion-icon>
                  <ion-label>Qiblat Finder</ion-label>
              </ion-item>
              <ion-item id="activeMenu" *ngIf="loginState" button href="/waktusolat" routerDirection="back">
                  <ion-icon src="assets/icon/waktusolat.svg" color="primary"></ion-icon>
                  <ion-label>Waktu Solat</ion-label>
              </ion-item>
              <!-- <ion-item *ngIf="loginState" button href="/tasbihzikir" routerDirection="back">
                  <ion-icon src="assets/icon/tasbih.svg"></ion-icon>
                  <ion-label>Tasbih dan Zikir</ion-label>
              </ion-item>
              <ion-item *ngIf="loginState" button href="/lokasimasjid" routerDirection="back">
                  <ion-icon src="assets/icon/mosque.svg"></ion-icon>
                  <ion-label>Lokasi Masjid</ion-label>
              </ion-item>
              <ion-item *ngIf="loginState" button href="/iderma" routerDirection="back">
                  <ion-icon src="assets/icon/derma.svg"></ion-icon>
                  <ion-label>iDerma</ion-label>
              </ion-item>
              <ion-item *ngIf="loginState" button href="/quranhadis" routerDirection="back">
                  <ion-icon src="assets/icon/quran.svg"></ion-icon>
                  <ion-label>Quran dan Hadis</ion-label>
              </ion-item> -->
              <ion-item *ngIf="loginState" button href="/doaharian" routerDirection="back">
                  <ion-icon src="assets/icon/doa.svg"></ion-icon>
                  <ion-label>Doa Harian</ion-label>
              </ion-item>
              <ion-item *ngIf="loginState" button href="/logout" routerDirection="back">
                  <ion-icon src="assets/icon/logout.svg"></ion-icon>
                  <ion-label>Log Keluar</ion-label>
              </ion-item>
              <ion-item *ngIf="!loginState" button href="/login" routerDirection="forward">
                  <ion-icon src="assets/icon/login.svg"></ion-icon>
                  <ion-label>Log Masuk</ion-label>
              </ion-item>
              <ion-item *ngIf="!loginState" button href="/register" routerDirection="forward">
                  <ion-icon src="assets/icon/registration.svg"></ion-icon>
                  <ion-label>Daftar</ion-label>
              </ion-item>
            </ion-list>
        </ion-content>
    </ion-menu>

    <ion-content [fullscreen]="true" id="main">
        <ion-header>
            <ion-toolbar>
                <ion-menu-button slot="start" autoHide="true"></ion-menu-button>
                <ion-title>Waktu Solat</ion-title>
            </ion-toolbar>
        </ion-header>

        <div class="selectLocation" *ngIf="!resultExist">

        </div>
    </ion-content>
</ion-split-pane>

waktusolat.page.scss

ion-split-pane {
  --side-max-width: 320px;
}

ion-menu ion-header ion-toolbar {
  --min-height: 250px;
  --padding-top: 20px;
  --padding-bottom: 20px;
  --padding-start: 20px;
  --padding-end: 20px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  --background: var(--ion-color-success);
  --color: var(--ion-color-light)
}
ion-menu ion-content ion-list ion-item {
  --color-activated: var(--ion-color-success);
  --ripple-color: var(--ion-color-success);
}
ion-menu ion-content ion-list ion-item ion-label {
  padding: 0 10px;
}
#menuHeader {
  font-size: 22px;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}
#menuHeader ion-img {
  width: 100px;
  height: auto;
  margin-bottom: 10px;
}

#activeMenu {
  color: var(--ion-color-success);
  font-weight: bold;
}

 #activeMenu ion-icon {
    color: var(--ion-color-success);
  }
  
ion-content{
  background-color: cornsilk;
  
}

.selectLocation {
  margin: 10px 20px;
}

waktusolat.page.ts

import { Component, OnInit } from '@angular/core';
import { AuthService } from '../../auth/auth.service';
import { Storage } from '@ionic/storage';
import { HttpClient} from '@angular/common/http';
import { Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { Router } from '@angular/router';
import { Geolocation } from '@ionic-native/geolocation/ngx';

@Component({
  selector: 'app-waktusolat',
  templateUrl: './waktusolat.page.html',
  styleUrls: ['./waktusolat.page.scss'],
})
export class WaktusolatPage implements OnInit {
    username = 'username';
    loginState = false;

    baseURL = 'https://mpt.1906.my/api/prayer/';
    date = new Date();
    day = this.date.getDate();
    month = this.date.getMonth();
    year = this.date.getFullYear();

    notice = '';
    latitude: Number;
    longitude: Number;
    kawasan: String;
    kodkawasan: String;
    resultExist = false;
    waktuSolat: any;

    johor = {
        "Batu Pahat": "jhr-0",
        "Gemas": "jhr-1",
        "Johor Bahru": "jhr-2",
        "Kluang": "jhr-3",
        "Kota Tinggi": "jhr-4",
        "Mersing": "jhr-5",
        "Muar": "jhr-6",
        "Pemanggil": "jhr-7",
        "Pontian": "jhr-8",
        "Pulau Aur": "jhr-9",
        "Segamat": "jhr-10",
    }
    kedah = {
        "Baling": "kdh-0",
        "Bandar Baharu": "kdh-1",
        "Kota Setar": "kdh-2",
        "Kuala Muda": "kdh-3",
        "Kubang Pasu": "kdh-4",
        "Kulim": "kdh-5",
        "Langkawi": "kdh-6",
        "Padang Terap": "kdh-7",
        "Pendang": "kdh-8",
        "Pokok Sena": "kdh-9",
        "Puncak Gunung Jerai": "kdh-10",
        "Sik": "kdh-11",
        "Yan": "kdh-12",
    }
    kelantan = {
        "Bachok": "ktn-0",
        "Bertam": "ktn-1",
        "Jeli": "ktn-2",
        "Kota Bharu": "ktn-3",
        "Kuala Krai": "ktn-4",
        "Machang": "ktn-5",
        "Mukim Chiku": "ktn-6",
        "Mukim Galas": "ktn-7",
        "Pasir Mas": "ktn-8",
        "Pasir Puteh": "ktn-9",
        "Tanah Merah": "ktn-10",
        "Tumpat": "ktn-11",
    }
    melaka = {
        "Alor Gajah": "mlk-0",
        "Bandar Melaka": "mlk-1",
        "Jasin": "mlk-2",
        "Masjid Tanah": "mlk-3",
        "Merlimau": "mlk-4",
        "Nyalas": "mlk-5",
    }
    negeriSembilan = {
        "Jelebu": "ngs-0",
        "Jempol": "ngs-1",
        "Kuala Pilah": "ngs-2",
        "Port Dickson": "ngs-3",
        "Rembau": "ngs-4",
        "Seremban": "ngs-5",
        "Tampin": "ngs-6",
    }
    pahang = {
        "Bentong": "phg-0",
        "Bera": "phg-1",
        "Bukit Fraser": "phg-2",
        "Cameron Highland": "phg-3",
        "Chenor": "phg-4",
        "Genting Highlands": "phg-5",
        "Jerantut": "phg-6",
        "Kuala Lipis": "phg-7",
        "Kuantan": "phg-8",
        "Maran": "phg-9",
        "Muadzam Shah": "phg-10",
        "Pekan": "phg-11",
        "Pulau Tioman": "phg-12",
        "Raub": "phg-13",
        "Rompin": "phg-14",
        "Temerloh": "phg-15",
    }
    perak = {
        "Bagan Datoh": "prk-0",
        "Bagan Serai": "prk-1",
        "Batu Gajah": "prk-2",
        "Belum": "prk-3",
        "Beruas": "prk-4",
        "Bukit Larut": "prk-5",
        "Grik": "prk-6",
        "Ipoh": "prk-7",
        "Kampar": "prk-8",
        "Kampung Gajah": "prk-9",
        "Kuala Kangsar": "prk-10",
        "Lenggong": "prk-11",
        "Lumut": "prk-12",
        "Parit": "prk-13",
        "Parit Buntar": "prk-14",
        "Pengkalan Hulu": "prk-15",
        "Pulau Pangkor": "prk-16",
        "Selama": "prk-17",
        "Setiawan": "prk-18",
        "Slim River": "prk-19",
        "Sri Iskandar": "prk-20",
        "Sungai Siput": "prk-21",
        "Taiping": "prk-22",
        "Tanjung Malim": "prk-23",
        "Tapah": "prk-24",
        "Teluk Intan": "prk-25",
        "Temengor": "prk-26",
    }
    perlis = {
        "Arau": "pls-0",
        "Kangar": "pls-1",
        "Padang Besar": "pls-2",
    }
    pulauPinang = {
        "Pulau Penang": "png-0",
    }
    sabah = {
        "Balong": "sbh-0",
        "Bandar Bukit Garam": "sbh-1",
        "Beaufort": "sbh-2",
        "Beluran": "sbh-3",
        "Gunung Kinabalu": "sbh-4",
        "Kalabakan": "sbh-5",
        "Keningau": "sbh-6",
        "Kota Belud": "sbh-7",
        "Kota Kinabalu": "sbh-8",
        "Kota Marudu": "sbh-9",
        "Kuala Penyu": "sbh-10",
        "Kuamut": "sbh-11",
        "Kudat": "sbh-12",
        "Kunak": "sbh-13",
        "Lahad Datu": "sbh-14",
        "Long Pa Sia": "sbh-15",
        "Membakut": "sbh-16",
        "Merotai": "sbh-17",
        "Nabawan": "sbh-18",
        "Papar": "sbh-19",
        "Penampang": "sbh-20",
        "Pensiangan": "sbh-21",
        "Pinangah": "sbh-22",
        "Pitas": "sbh-23",
        "Pulau Banggi": "sbh-24",
        "Ranau": "sbh-25",
        "Sahabat": "sbh-26",
        "Sandakan": "sbh-27",
        "Semawang": "sbh-28",
        "Semporna": "sbh-29",
        "Silabukan": "sbh-30",
        "Sipitang": "sbh-31",
        "Tambisan": "sbh-32",
        "Tambunan": "sbh-33",
        "Tawau": "sbh-34",
        "Telupit": "sbh-35",
        "Temanggong": "sbh-36",
        "Tenom": "sbh-37",
        "Terusan, Sabah": "sbh-38",
        "Tuaran": "sbh-39",
        "Tungku": "sbh-40",
        "Weston": "sbh-41",
    }
    sarawak = {
        "Bau": "swk-0",
        "Bekenu": "swk-1",
        "Belaga": "swk-2",
        "Belawai": "swk-3",
        "Belingan": "swk-4",
        "Betong": "swk-5",
        "Bintulu": "swk-6",
        "Bintangor": "swk-7",
        "Dalat": "swk-8",
        "Daro": "swk-9",
        "Debak": "swk-10",
        "Engkelili": "swk-11",
        "Igan": "swk-12",
        "Julau": "swk-13",
        "Kabong": "swk-14",
        "Kanowit": "swk-15",
        "Kapit": "swk-16",
        "Kuching": "swk-17",
        "Lawas": "swk-18",
        "Limbang": "swk-19",
        "Lingga": "swk-20",
        "Lundu": "swk-21",
        "Marudi": "swk-22",
        "Matu": "swk-23",
        "Meludam": "swk-24",
        "Miri": "swk-25",
        "Niah": "swk-26",
        "Oya": "swk-27",
        "Pusa": "swk-28",
        "Rajang": "swk-29",
        "Roban": "swk-30",
        "Samarahan": "swk-31",
        "Saratok": "swk-32",
        "Sarikei": "swk-33",
        "Sebauh": "swk-34",
        "Sebuyau": "swk-35",
        "Sematan": "swk-36",
        "Serian": "swk-37",
        "Sibu": "swk-38",
        "Sibuti": "swk-39",
        "Simunjan": "swk-40",
        "Song": "swk-41",
        "Spaoh": "swk-42",
        "Sri Aman": "swk-43",
        "Sundar": "swk-44",
        "Tatau": "swk-45",
        "Terusan Sarawak": "swk-46",
    }
    selangor = {
        "Gombak": "sgr-0",
        "Hulu Langat": "sgr-1",
        "Hulu Selangor": "sgr-2",
        "Klang": "sgr-3",
        "Kuala Langat": "sgr-4",
        "Kuala Selangor": "sgr-5",
        "Petaling": "sgr-6",
        "Rawang": "sgr-7",
        "Sabak Bernam": "sgr-8",
        "Sepang": "sgr-9",
        "Shah Alam": "sgr-10",
    }
    terengganu = {
        "Besut": "trg-0",
        "Hulu Terengganu": "trg-1",
        "Kemaman/Dungun": "trg-2",
        "Kuala Terengganu": "trg-3",
        "Marang": "trg-4",
        "Setiu": "trg-5",
    }
    wilayahPersekutuan = {
        "Kuala Lumpur": "wlp-0",
        "Labuan": "wlp-1",
        "Putrajaya": "wlp-2",
    }

    arrayNegeri = ["Johor", "Kedah", "Kelantan", "Melaka", "Negeri Sembilan", "Pahang", "Perak", "Perlis", "Pulau Pinang", "Sabah", "Sarawak", "Selangor", "Terengganu", "Wilayah Persekutuan"];

    arrayKawasan = new Array();

    constructor(private authService: AuthService, private storage: Storage, private http: HttpClient, private geolocation: Geolocation) {}

    ngOnInit(): void {
        this.authService.isLoggedIn().subscribe(res => {
            if(res) {
                this.storage.get('USER_USERNAME').then(val => {
                    this.username = val;
                });
                this.loginState = true;
            }
        });
    }

    changeNegeri(value) {
        this.arrayKawasan = [];
        switch(value) {
            case 'Johor': 
                for(let i of Object.keys(this.johor)) {
                    this.arrayKawasan.push(i);
                }
                break;
            case 'Kedah':
                for(let i of Object.keys(this.kedah)) {
                    this.arrayKawasan.push(i);
                }
                break;
            case 'Kelantan':
                for(let i of Object.keys(this.kelantan)) {
                    this.arrayKawasan.push(i);
                }
                break;
            case 'Melaka':
                for(let i of Object.keys(this.melaka)) {
                    this.arrayKawasan.push(i);
                }
                break;
            case 'Negeri Sembilan':
                for(let i of Object.keys(this.negeriSembilan)) {
                    this.arrayKawasan.push(i);
                }
                break;
            case 'Pahang':
                for(let i of Object.keys(this.pahang)) {
                    this.arrayKawasan.push(i);
                }
                break;
            case 'Perak':
                for(let i of Object.keys(this.perak)) {
                    this.arrayKawasan.push(i);
                }
                break;
            case 'Perlis':
                for(let i of Object.keys(this.perlis)) {
                    this.arrayKawasan.push(i);
                }
                break;
            case 'Pulau Pinang':
                for(let i of Object.keys(this.pulauPinang)) {
                    this.arrayKawasan.push(i);
                }
                break;
            case 'Sabah':
                for(let i of Object.keys(this.sabah)) {
                    this.arrayKawasan.push(i);
                }
                break;
            case 'Sarawak':
                for(let i of Object.keys(this.sarawak)) {
                    this.arrayKawasan.push(i);
                }
                break;
            case 'Wilayah Persekutuan':
                for(let i of Object.keys(this.wilayahPersekutuan)) {
                    this.arrayKawasan.push(i);
                }
                break;
            default:
                this.arrayKawasan.push('Sila Pilih Negeri');
                break;
        }
    }

    getWaktuSolatByLocation() {
        this.http.get(`${this.baseURL}${this.kodkawasan}?year=${this.year}&month=${this.month}`).subscribe(result => {
            this.resultExist = true;
            this.waktuSolat = result['data'];
        }, err => {
            this.resultExist = false;
            this.notice = 'Waktu Solat Tidak Ditemui.';
        });
    }

    getWaktuSolatByCoordinates() {
        this.geolocation.getCurrentPosition().then(response => {
            this.latitude = response.coords.latitude;
            this.longitude = response.coords.longitude;

            this.http.get(`${this.baseURL}${this.latitude},${this.longitude}?year=${this.year}&month=${this.month}`).subscribe(result => {
                this.resultExist = true;
                this.waktuSolat = result['data'];
            }, err => {
                this.resultExist = false;
                this.notice = 'Waktu Solat Tidak Ditemui Untuk Lokasi Pengguna';
            });
        }).catch(err => {
            console.log('Lokasi tidak dapat diterima dari GPS: ' + err);
            this.notice = 'Lokasi Tidak Ditemui Oleh GPS.';
        });
    }
}

1 post - 1 participant

Read full topic

Source path does not exist: resources/android/xml/network_security_config.xml

Capacitor Lightsensor Plugin

$
0
0

I have made a lightsensor plugin for capacitor check it out in here:

-Get illuminance level on the device
-Get sensor information

Currently supported platform:
Android (Done)
Web (Done)
IOS (Todo)

1 post - 1 participant

Read full topic

Designing an application for our website

$
0
0

Hi there, we have a website for which we are looking into designing an application something which is easy to use by people doesn’t matter how experienced they are. The application we are looking to create should be accessible to all platforms and easy to use by anyone. Can iconic help me create a application which works for all platform is easy to use? Can I update the application myself and is it free of cost?

1 post - 1 participant

Read full topic

IonRouterOutlet doesn't work inside app.component

$
0
0

I’m using Ionic v5 and Angular v10,

And i’m trying to bind hardware back button event inside app.component . But every time when i try to access routerOutlet it returns undefined error.

[import { Component, ViewChild } from "@angular/core";

import { AlertController, IonRouterOutlet, Platform } from "@ionic/angular";
import { SplashScreen } from "@ionic-native/splash-screen/ngx";
import { StatusBar } from "@ionic-native/status-bar/ngx";
import { FcmService } from "@core/services/fcm-service/fcm.service";
import { AuthenticationService } from "@core/services/authenticatiion-service/authentication.service";
import { Location } from "@angular/common";
import { Plugins } from "@capacitor/core";

const { App } = Plugins;

@Component({
  selector: "app-root",
  templateUrl: "app.component.html",
  styleUrls: ["app.component.scss"],
})
export class AppComponent {
  @ViewChild(IonRouterOutlet, {static: true}) routerOutlet:  IonRouterOutlet;
  constructor(
    private platform: Platform,
    private splashScreen: SplashScreen,
    private statusBar: StatusBar,
    private fcmService: FcmService,
    private authService: AuthenticationService,
    private alertController: AlertController,
    private location: Location,
    private routerOutlet: IonRouterOutlet
  ) {
    this.authService.checkToken();
    this.initializeApp();
    this.backButtonEvent();
  }

  initializeApp() {
    this.platform.ready().then(() => {
      this.statusBar.styleDefault();
      this.splashScreen.hide();
      this.authService.changeRoutes();
      this.fcmService.initPush();
    });
  }

  backButtonEvent() {
    

    this.platform.backButton.subscribeWithPriority(10, () => {
      if (!this.routerOutlet.canGoBack()) {
        alert("event triggered !");
      }
    });
  }

  async presentAlertConfirm() {
    const alert = await this.alertController.create({
      cssClass: "my-custom-class",
      header: "Confirm",
      message: "Are you sure you want to exit ?",
      backdropDismiss: false,
      buttons: [
        {
          text: "Cancel",
          role: "cancel",
          cssClass: "secondary",
        },
        {
          text: "Logout",
          handler: () => {
            this.authService.logout();
            App.exitApp();
          },
        },
      ],
    });

    await alert.present();
  }
}

And hardware back button event is triggering but returns error on routerOutlet .

Any help ?

1 post - 1 participant

Read full topic


What's the best Plugin for Google Play Services

$
0
0

I’m talking leaderboards and in app purchases?

I know that a lot of these plugins no longer work

Cheers

1 post - 1 participant

Read full topic

How to change title of ionicons 5?

$
0
0

There is default hover title on each ionicons. but practically no one wants that hover title because requirement of icons are different for different places. I saw title inside shadow root. So how can I change that title or remove?

1 post - 1 participant

Read full topic

Present Native Screen with SAME state each time

$
0
0

So I have an ionic app built with capacitor in which I have 4 normal ionic pages and a single NATIVE PAGE. I can open and close this native page and get the data as I intend too. But the problem is, the native page obviously doesn’t work with the ionic stack. When I go from page 1 to page 2(NATIVE). upon finishing the task, I go back to page one, from where I then again route to page 3. The problem is, going back from page 3 takes to page 1 as expected and if I open page 2 from page 3 upon back, it’s a new instance everytime. whatever the user did is lost. So what I want is to somehow not destroy my native activity and just maybe hide/show it everytime without it being destroyed. I have tried launchmode=“singleInstance” doesn’t help. Right now I am clueless how it can be done,

1 post - 1 participant

Read full topic

Ionic iOS double-tap pause event doesn't trigger

$
0
0

When using the platform.pause and platform.resume functions, it doesn’t trigger the pause event on an iOS device when you double-tap the iOS native ‘home’ button.
When double tapping it shows the latest apps on your iOS device, but the pause event won’t be triggered then.

I saw this from years ago; https://stackoverflow.com/questions/46864659/cordova-pause-event-on-ios
Which concludes ‘This isn’t supported’

But I actually really need to see when the app gets closed / paused.
Is there any workaround for this? I can’t find anything online about this issue.

Thanks in advance!

1 post - 1 participant

Read full topic

Slow Ionic-Vue App

$
0
0

I am new to Ionic and using the latest version of Ionic/Vue3 to develop a tab based iOS and Android app. The only issue I am facing page is that page transition/change is painfully slow. The modal transitions work perfectly but the router push takes about a sec after clicking to do anything.

Other packages I am using are Tailwind CSS, Firebase, Vee-Validate and Vuex.

Can someone please guide me as to the best practices for optimizing.

Thank you

1 post - 1 participant

Read full topic

Advice on creating thumnails for videos

$
0
0

Hello! What would be a correct way to create thumbnails for videos? Is there a Capacitor plugin? Can be an existing Cordova/Phonegap plugin used?

1 post - 1 participant

Read full topic

Ng-fullcalendar event timeline issue

$
0
0

Hello. Im having issue with ng-fullcalendar.

As you can see, start time is correct but end time is not showing well.

Ionic:

   ionic (Ionic CLI)  : 4.12.0 (/Users/pc-areaindustries/.npm-global/lib/node_modules/ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.3

Cordova:

   cordova (Cordova CLI) : 7.1.0
   Cordova Platforms     : android 7.1.4
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.0.0, (and 21 other plugins)

System:

   Android SDK Tools : 26.1.1 (/Users/pc-areaindustries/Library/Android/sdk)
   NodeJS            : v8.16.2 (/Users/pc-areaindustries/.nvm/versions/node/v8.16.2/bin/node)
   npm               : 6.4.1
   OS                : macOS

package.json

"ng-fullcalendar": "^1.7.5",
"fullcalendar": "^3.6.2",

HTML

<ng-fullcalendar #ucCalendar [options]="calendarOptions" (eventClick)="eventClick($event.detail)"></ng-fullcalendar>

TS

this.calendarOptions = {
        defaultView: 'agendaDay',
        minTime: duration("06:00:00"),
        maxTime: duration("22:00:00"),
        contentHeight: 700,
        themeSystem: "standard",
        header: false,
        buttonText: {
          today: 'Oggi',
          month: 'Mese',
          week: 'Settimana',
          day: 'Giorno',
          list: 'Agenda'
        },

        allDayText: 'Tutto il giorno',
        slotLabelFormat: 'HH:mm',
        timeFormat: 'h:mm',
        // header: {
        //   left: 'prev,next today',
        //   center: 'title',
        //   right: 'month,agendaWeek,agendaDay,listWeek'
        // },
        // locale: "it",
        navLinks: false, // can click day/week names to navigate views
        editable: false,
        selectable: true,
        eventLimit: false, // allow "more" link when too many events
        events: [
          {
            "start": "2020-12-28 09:00:00",
            "end": "2020-12-28 13:00:00",
            "title": "DIANA CIPRIANO Trasporto e Montaggio  ",
            "color": "#008000",
            "recapito": "TRAVERSA VIII CORSO EUROPA ",
            "citta": "Casapesenna",
            "telefono": "3881172040",
            "id": 1
          },
          {
            "start": "2020-12-28 14:00:00",
            "end": "2020-12-28 16:00:00",
            "title": "NETTI MARCO RITIRO MERCE DA CLIENTE",
            // "color": "#E5E5E5",
            "recapito": "VIA DOMIZIANA KM 36.00",
            "citta": "CASTEL VOLTURNO",
            "telefono": "0815093922",
            "id": 2
          }
        ]
         //JSON.stringify(this.pianificazioneMensile()),

      }

1 post - 1 participant

Read full topic


Content Resize in Ionic5

$
0
0

Hi people,

in ionic v3 there is @ViewChild(Content) content: Content; and I can use this.content.resize(); but in ionicv5 Angular where is .resize() functions?

I tried import {IonContent} from "@ionic/angular"; but there isn’t that functions.

Thanks

2 posts - 2 participants

Read full topic

Admob plugin and consent / google UMP

$
0
0

Does anyone know a way to integrate the google ump sdk for asking Europeans their consent for showing personalized ads when using admob in Ionic ?

It seems to be mandatory to request the user’s consent in Europe and to use the google ump sdk for doing so, if we want to comply and get paid for showing admob ads. However, I was quite surprised to find almost nothing about this issue with Ionic apps. I am sure a lot of apps are using the admob plugin and must have faced this issue as well.

The only plugins I could find were incomplete or not considered stable. How do you guys deal with this ? Do you roll up your own consent dialog? I feel this solution is not enough to be compliant with google…

Any help would be fantastic!

Thanks

1 post - 1 participant

Read full topic

Image not showing in device

$
0
0

I’ve a simple grid and it contains a simple image which works perfect on chrome browser, but the image doesn’t show in mobile device (android).
The image in last column doesn’t show in mobile device while other two show perfectly and in browser all show perfectly

<ion-grid>
    <ion-row>
        <ion-col (click)="onClickCategory('Face Care','face-care')">
            <img src="assets/topCat_face.png" alt="">
            <ion-text>{{"home.faceCare"|translate}}</ion-text>
        </ion-col>
        <ion-col (click)="onClickCategory('Lip Care','lip-care')">
            <img src="assets/topCat_lipSticks.png" alt="">
            <ion-text>{{"home.lipCare"|translate}}</ion-text>
        </ion-col>
        <ion-col (click)="onClickCategory('Scalp And Hair Care','scalp-and-hair-care')">
            <img src="assets/topCat_hairs.png" alt="">
            <ion-text>{{"home.hairCare"|translate}}</ion-text>
        </ion-col>
    </ion-row>
</ion-grid>

1 post - 1 participant

Read full topic

Workaround needed for verified Ionic iOS Scrolling Bug

$
0
0

I’ve been struggling for weeks now with the scrolling bug described here:

Basically, in iOS 14.3, the “Search” and “Profile” pages of the below app won’t scroll when visited using the sidebar. After visiting the pages, toggling the sidebar on/off once will re-enable scrolling. This problem does not occur in iOS 13.7.

I do not understand the workarounds given in the original bug description. Is anyone able to specifically address my problem by looking at the exact code I posted in “problemApp”? Your help would be VERY appreciated. Thank you!

1 post - 1 participant

Read full topic

After login, app is not redirecting to tabspage in ionic 4 (IOS)

$
0
0

After login, the app is not navigating to tabspage in ionic 4, and this code working in android but not working in ios
tabs.router.module.ts code :

const routes: Routes = [
  {
    path: 'tabs',
    component: TabsPage,
    children: [
      {
        path: '',
        redirectTo: '/tabs/(home:home)',
        pathMatch: 'full',
      },
      {
        path: 'home',
        children: [
          {
            path: '',
            loadChildren: '../home/home.module#HomePageModule'
          }
        ]
      },
      {
        path: 'notificationhistory',
        children: [
          {
            path: '',
            loadChildren: '../notificationhistory/notificationhistory.module#NotificationhistoryPageModule'
          }
        ]
      },
      {
        path: 'chat',
        children: [
          {
            path: '',
            loadChildren: '../live-chat/live-chat.module#LiveChatPageModule'
          }
        ]
      },
      {
        path: 'contact',
        children: [
          {
            path: '',
            loadChildren: '../contact/contact.module#ContactPageModule'
          }
        ]
      }
    ]
  },
  
  {
    path: '',
    redirectTo: '/tabs/home',
    pathMatch: 'full'
  }
];

app-routing.module.ts code :

const routes: Routes = [
  { path: '', redirectTo:'login',pathMatch:'full' },
  { path: 'login', loadChildren: './login/login.module#LoginPageModule' },
  { path: '', loadChildren: './tabs/tabs.module#TabsPageModule',canActivate:[AuthGuardService] }
]

to navigate I use following code:

 this.navctrl.navigateRoot(["tabs/home"]);

above code is working in android but not working in ios. page stuck at login page in ios but if I redirect to another page then tabpage then it works perfectly in ios

1 post - 1 participant

Read full topic

Viewing all 70896 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>