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

Ios 13.4.1 connection problem

$
0
0

@khalilbhs wrote:

all is well in disconnected mode the request sent without token after the connection I had an error message just for ios 13.4.1 “Request header field Authorization is not allowed by Access-Control-Allow-Headers.” help me please

Posts: 1

Participants: 1

Read full topic


Database Connection heidiSql in Ionic React

$
0
0

@Masuth wrote:

I m new to ionic react .I want to know the details that how to configure the database using JavaScript method. Actually i referred google for that result tey have given in typescript only.So kindly suggest me the best way thank u.

Posts: 1

Participants: 1

Read full topic

Ionic Screen Density

$
0
0

@vignesh-R wrote:

How to get screen display density like display matrics in android? what is the way to find sreen density in ionic?

Posts: 1

Participants: 1

Read full topic

Disable livereload on ionic 4/5

$
0
0

@DeveloppeurArg wrote:

Please, how to disable livereload in the ionic 4 application. To not reload the browser each time the project is saved.
I try
ionic serve --no-livereload
ionic serve -livereload false
ionic serve --no-live-reload

My ionic info

Ionic:

   Ionic CLI                     : 6.9.2
   Ionic Framework               : @ionic/angular 5.1.1
   @angular-devkit/build-angular : 0.901.6
   @angular-devkit/schematics    : 9.1.6
   @angular/cli                  : 9.1.6
   @ionic/angular-toolkit        : 2.2.0

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.1.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 6 other plugins)

Utility:

   cordova-res : 0.14.0
   native-run  : 1.0.0

System:

   Android SDK Tools : 26.1.1
   NodeJS            : v10.16.3
   npm               : 6.9.0
   OS                : Linux 4.15

Posts: 1

Participants: 1

Read full topic

Using plugin in service vs in page as best performance

$
0
0

@ebeliejinfren wrote:

Hello
for using some plugin like Social Sharing or Storage , … we can use them in page or use them in service and call from page.

i want to know which scenario is more performance ?

  1. import and use some reusable plugin and function and call them in pages

  2. in any page that we need some reusable function or plugin, import and use it in same page

Thanks

Posts: 1

Participants: 1

Read full topic

Inapp browser post data

Platform iOS 3.4 no detect

$
0
0

@hugo75 wrote:

Platform (@ ionic / angular) does not detect the platform for ios 3.4 (tested on ipad ios 3.4 emulator)

Posts: 1

Participants: 1

Read full topic

Scroll position bugs

$
0
0

@KevinB1 wrote:

There are 2 big bugs with scroll position in Ionic:

Bugs

  1. When going back, the previous page always starts at top, instead of remembering the old scroll position
  2. When going to a next page, the next page scrolls down to the same scroll position as the previous page on firefox. This makes it nearly unusable on Firefox. Its the same for mobile and for desktop.

Workarounds
So for the 1st one, there is a workaround, but its really very annoying to use it, especially on big application. For each single page, we have to add scroll listener (bad performance) and store the scroll position. Then, on ionviewdidenter, we have to manually scroll back down to this position.

For the 2nd one, there has been a workaround for ionic v4, which stopped working with v5: To scroll to 0 in ionviewwillenter. Firefox is 10% marketshare on desktop, so this is quite bad.

Problems with Workarounds
Ionic itself says on “onPageScroll”: Because of performance reasons, ionScroll events are disabled by default.
So its bad to have a workaround that decreases the performance on every single page.

Github ticket
I opened a ticket on Github a while ago, but after one initial response it seems to be ignored.
If you too have this problem, please support the ticket by adding a comment:

Posts: 1

Participants: 1

Read full topic


Run a Background Service every Xmins to get User's Location Firebase

$
0
0

@AshleyDerek wrote:

I want to run a background service when the app is in the background or even closed=killed. So the service basically gets the current user’s location every 10mins, checks it with the previous location of the user, and if the distance between the last location and current location is more than 500m i want to send them a notification. How can I achieve this?
I am also using firebase for my backend. I read about push notifications from firebase, but I want to send notifications based on the user’s current location which would differ from user to user.
I’ve looked at all possible answers, but none of them meet my requirements.

Thank You in Advance!

Posts: 1

Participants: 1

Read full topic

Help Me to Import Material Design!

How to use an ion-input type=file?

$
0
0

@JEricaM wrote:

I’m using a ionic-starter-pwa and I would like to let the user upload some images.

I’m a little bit confused about the doc


this page says If the value of the type attribute is "file" , so file should be a value of the type attribute but is not.

The type attribute don’t accept file value infact it’s not mentioned inside the doc and If I try to use *type=file *inside an ion-input, typescript gives me this error Type ‘“file”’ is not assignable to type ‘TextFieldTypes’.

So my question is: there is a documentation problem or I’m missing something important?

Posts: 1

Participants: 1

Read full topic

Ion-range value is always equal to zero

$
0
0

@ManelHK wrote:

Hello all,

I want to show the progress value in the ion-range but it’s always equal to the default value howerver the value retreived from the database is not usualy zero.
Another thing, I want to change the value in realtime by the event onChangeProgress($event) but it’s not working too.
image

This is my html file:

   <ion-item>
        <h6><b>Progress: {{progress}}%</b></h6>
      </ion-item>
 <ion-item>
        <ion-label floating ></ion-label>
        <ion-range min="0" max="100"  [(ngMdodel)]="rangeval" pin="true" color="secondary"(ngModelChange)="onChangeProgress($event)"></ion-range>
        <ion-icon slot="start" color="success" size="small" name="cellular-outline"></ion-icon>
        <ion-icon slot="end" color="success"  name="cellular"></ion-icon>
      </ion-item>

this is my TS

import { Component, OnInit } from '@angular/core';
import { LoadingController } from '@ionic/angular';
import { RestService } from '../rest.service';
import { ActivatedRoute, Router } from '@angular/router';
import { FormBuilder, Validators } from "@angular/forms";

@Component({
  selector: 'app-one-task',
  templateUrl: './one-task.page.html',
  styleUrls: ['./one-task.page.scss'],
})
export class OneTaskPage implements OnInit {
   _task: any = {};
  id=null;rangeval=0;progress:any;
  constructor(public api: RestService,
    public loadingController: LoadingController,
    public route: ActivatedRoute,
    public router: Router) { }
  async getonetask() {
    const loading = await this.loadingController.create({
      message: 'Loading',
      duration:2000
    });
    await loading.present();
    this.id=this.route.snapshot.paramMap.get('id');
    await this.api.getonetask(this.id)
      .subscribe(res => {
        console.log(res);
        this._task = res;
       this.rangeval=this._task.Progress;//value of ion-range
       this.progress= this.rangeval;//value of progress
        loading.dismiss();
      }, err => {
        console.log(err);
        loading.dismiss();
      });
  }
  onChangeProgress(){
    this.progress= this.rangeval;
  }
  ngOnInit() {
    this.getonetask();
  }

}

I hope you can help me soon.
Thanks

Posts: 1

Participants: 1

Read full topic

Doesn't asks for permissions on initial load

$
0
0

@divyasmehta wrote:

I have an ionic project. I am deploying this app into android. I want to access device’s microphone for which I have added permission in AndroidManifest.xml:

I have also added following code:

this.androidPermissions.checkPermission(this.androidPermissions.PERMISSION.RECORD_AUDIO).then(

        result => console.log('Has record audio permission?', result.hasPermission),

        err => {

          this.androidPermissions.requestPermission(this.androidPermissions.PERMISSION.RECORD_AUDIO).then((data: any) => {

            if (data.hasPermission) {

              console.log("have record audio permission");

            }

          });

        }

      );

yet it is not asking user for permissions on initial load. I am using Cordova. It is not going in the error section while checking for permissions.
Can anyone help me with this?

Posts: 1

Participants: 1

Read full topic

Unable to resolve project :capacitor-android in android studio

$
0
0

@arjoglekar24 wrote:

Hi,
The gradle sync fails with the error Unable to resolve project :capacitor-android.
Also this folder seems to be empty.
Could somebody please provide the solution to this.

Posts: 1

Participants: 1

Read full topic

Stencil Electron net::ERR_FILE_NOT_FOUND

$
0
0

@johnwargo wrote:

I built a Stencil app and when it was all done, I added Capacitor Electron to it. When I run the app:

stencil build
npx cap sync
npx cap open electron

The Electron container opens and the base index.html file loads, but as soon as it tries to load the first bundled .js file, I get the following error:

GET file:///D:/build/p-267af940.js net::ERR_FILE_NOT_FOUND

I read a bunch of the related posts here and on stack overflow and haven’t found a solution that works for me. For example, I tried changing the <base href="./"> as mentioned in many of the articles, to no avail.

I’m fairly certain this is a content security policy issue, but I can’t find any guidelines anywhere about how to set it up correctly and this recent post is still unanswered: Looking for comprehensive content-security-policy guideline.

When I first launched the app, I got a security policy error which I searched for and found a recommendation to set it like this:

<meta http-equiv="Content-Security-Policy" content="script-src 'self';">

That fixed that issue, but now I can’t load any local files. I’ll start playing around with policy settings, but what’s the recommendation for Stencil, Capacitor, and Electron?

Posts: 1

Participants: 1

Read full topic


Button is aligned right in the toolbar but the icon is not shown

$
0
0

@UnnatiPatadia wrote:

Button is aligned right in the toolbar but the icon is not shown.

Only white box appear.

.html

<ion-header>
  <ion-toolbar>
    <ion-buttons slot="start">
      <ion-menu-button></ion-menu-button>
    </ion-buttons>

    <ion-title style="text-align: center;">RE-MED+</ion-title>

    <ion-buttons slot="primary">
      <ion-button>
        <ion-icon slot="icon-only" name="exit"></ion-icon>
      </ion-button>
    </ion-buttons>

  </ion-toolbar>
</ion-header>

It looks like this.

enter image description here

I want Like this

enter image description here

Posts: 1

Participants: 1

Read full topic

iOS capacitor Push Notifications not being received

$
0
0

@Simbaclaw wrote:

Hi everyone,

I’m trying to get an app with push notifications working.
Everything seems to be working fine on androids part.

However, when I send a notification towards the iOS app, it isn’t being received.

I followed this tutorial:
https://capacitor.ionicframework.com/docs/guides/push-notifications-firebase/

Whenever the iOS app starts up it behaves well by displaying a message to request for permission.
Once permission is granted I’m greeted with the message push registration successful, and I get back the FCM token from the alert.

However, when I send a notification from firebase console towards the iOS app, it doesn’t want to be received on both the background or foreground of the app. While the message does get displayed on android.

The part where I had to generate a APNS certificate, I went through correctly. However I set the wrong email address (not the apple id email address) when creating the Certificate Signing Request. I hope that is not what is causing the issues right now.

After I’ve imported the APNS certificate into my keychain app on mac OS, I’ve tried exporting the private key to a p12 file so that I can upload this as the certificate for firebase, since firebase uses p12 files.
When exporting the key I’m given the option to setup a password. I generated a strong password.

Could it be that this certificate key should have no password set?
Because when adding the APNS certificate to the keychain app I wasn’t asked to set any sort of password.

Could it be that the version that is compiled with the iOS app uses no password for the APNS certificate, while the firebase p12 file expects a password? And that this is causing issues?

I hope someone can clarify in which step I went wrong.

Yours truly,
simbaclaws

Posts: 2

Participants: 1

Read full topic

Ionic 3 Native Audio Not Working After On DB Meter

$
0
0

@leongofcom wrote:

I have a problem playing audio with native audio after trigger the db meter. The code work fine on android but not on ios. The audio can play and can set volume but after trigger the get db meter, the audio cannot play anymore and have to restart the app, the volume button also cannot be control.

Load media after platform ready

this.nativeAudio.preloadComplex('noise', 'assets/audio/noise.mp4',1, 1,0).then(() => { 
    }, (err) => {
      alert('LOAD NOISE ERROR');
    });  

Play Sound

this.nativeAudio.loop('noise').then((res) => {
    }, (err) => {
      alert('PLAY ERROR');
    });

Use DB METER

let totaldb = [];
this.interval = setInterval(()=>{
  this.subscription = this.dbMeter.start().subscribe((data) => {
    this.db = data;
    if(data>0){
      totaldb.push(data);
    }
  });

  if(totaldb.length>5){
    this.loading.dismiss();

    clearInterval(this.interval);
    this.subscription.unsubscribe();
    this.dbMeter.delete().then(() => {
    }, (error) => {
      alert('STOP DB ERROR');
    });

    this.db = 0;
    for(let a = 0;a<totaldb.length;a++){
      this.db = this.db + totaldb[a];
    }
  
    this.db = this.db/totaldb.length;
    this.db = this.db.toFixed(1);
  }
}, 1000);

Ionic Info
Ionic:
ionic (Ionic CLI) : 4.12.0
Ionic Framework : ionic-angular 3.9.9
@ionic/app-scripts : 3.2.4

Cordova:
cordova (Cordova CLI) : not installed
Cordova Platforms : android 8.1.0, browser 6.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.2.1, (and 8 other plugins)

Any solution on this?

Posts: 1

Participants: 1

Read full topic

Ionic 4 - Admob and FCM version mismatch

$
0
0

@kennedymca wrote:

Hi,

I am using FCM and Admob plugins, i am getting google services version mismatch issue, how to resolve this?

Posts: 1

Participants: 1

Read full topic

How to use scrollToBottom with IonContent in React

$
0
0

@gaweleczek wrote:

Hi,

I’m building a chat app and I want to make sure that the user always sees the bottom of the list of messages.

<IonContent ref={this.messagesRef}>

and then I call this function from a few places

 scrollToBottom = () => {
        if (!this.messagesRef || !this.messagesRef.current) return;
        //window.scrollTo(0, this.messagesRef.current.offsetTop)
        this.messagesRef.current.scrollToBottom();
        //scrollIntoView({ behavior: "smooth" });
        console.log("ScrollToTheBottom");
    }

But when I do this I get the following error:

TypeError: this.messagesRef.current.scrollToBottom is not a function

What am I doing wrong here?

Thanks!

Posts: 1

Participants: 1

Read full topic

Viewing all 71247 articles
Browse latest View live


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