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

Regarding ionic native Google and Linkedin plugin conflict in IOS

$
0
0

@Lakshmareddy wrote:

After integrating the ionic native google plugin and linkedin plugin in ios both are getting conflict. Without linkedin plugin google works fine and getting back to app after successful auth. If linkedin plugin is present after successful auth google+ plugin redirecting to the google.com. How can do. Please help me. I need both google plus login and linkedin login.

Posts: 1

Participants: 1

Read full topic


Custom selector component css not working outside global.css

$
0
0

@christianpugliese wrote:

Ionic 4, I’ve got a few custom components, I can’t get the styles to work on the selector if I add them to the component scss file

on “phone-input.component.scss” does not work:

phone-input{
  background: red;
}

if I add to “global.scss” it does work

phone-input{
  background: red;
}

Posts: 1

Participants: 1

Read full topic

Working with tabs

$
0
0

@Triumworks wrote:

I am struggling with working with tabs as it presents a unique problem. If I try to navigate from the tabs page to another (both tabs or regular page) the header remains.

Sorry for directing you to another site but see more details here.

Posts: 3

Participants: 2

Read full topic

"The object can not be found here" error when accessing camera

$
0
0

@scottieslg wrote:

My client is occasionally getting an error when trying to access the camera or photo gallery that says “The object can not be found here.”

Usually if they close and re-open the app, it will work for a while, but then eventually stops working and I get this error recorded.

From what I have been able to gather, it looks like this is related to accessing the camera or photo gallery.

Any ideas what might be causing this and how to fix it?

Posts: 2

Participants: 2

Read full topic

Local Notifications not showing in specific time

$
0
0

@aligassan wrote:

l am using ionic 4 , l use Native plugin local notifications to show up notifications in specific time .

l use this code to show me notification in 5 pm in local time of device but he doesn’t show !

this.localNotifications.schedule({
   text: 'Hi ',
   trigger: {at: new Date(new Date().getTime(),5 *1000)},
   led: 'FF0000',
   sound: null
});

l follow up this doc of plugin here but it is same problem not showing any notification .

he is working only if l delete ,5 *1000 from trigger and he is showing notification in repeating way .

any idea please ?

Posts: 1

Participants: 1

Read full topic

Error sdk build android apk

Google translate like web for ionic

$
0
0

@skp wrote:

Hello,

i want use google translate like website(below image) for my ionic app. i dont want to use google translate api because i have to translate each word for my entire app.

image

its working while devloping the app but in apk it is not working.

Anyone can help me.
Thanks

Posts: 1

Participants: 1

Read full topic

Failed to load resource: Request header field 'fmyCustomField' is not allowed by Access-Control-Allow-Headers

$
0
0

@lsantaniello wrote:

I receive error during server http call.

Failed to load resource: Request header field lang is not allowed by Access-Control-Allow-Headers.

In my request I need to add a custom header field.

This is my request header.

httpHeaders = {
      headers: new HttpHeaders({
        'Content-Type':  'application/json',
        'Access-Control-Allow-Headers': 'lang',
        'lang': this.session.language
      })
    };

Server side (.htaccess):

Header Set Access-Control-Allow-Origin "*"
Header Set Access-Control-Allow-Headers "*"

Support me please

Posts: 1

Participants: 1

Read full topic


Error http request CORS implementation

$
0
0

@jisaballo wrote:

Hi

I have an error with an http request.

We have implemented CORS on the server and all our transactions respond correctly except one.

This transaction sometimes responds well and sometimes does not. When it does not show up correctly, we get the message:

{“headers”:{“normalizedNames”:{},“lazyUpdate”:null,“headers”:{}},“status”:0,“statusText”:“Unknown Error”,“url”:null,“ok”:false,“name”:“HttpErrorResponse”,“message”:“Http failure response for (unknown url): 0 Unknown Error”,“error”:{“isTrusted”:true}}

The only difference I’ve noticed is that the times it responds well is when takes less time to respond.My question is.

Is there any configuration parameter in the CORS or in the http request that controls the time that is expected by the endpoint response?

Endpoint Headers
Access-Control-Allow-Origin: *
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET, PUT, POST, DELETE, OPTIONS
Access-Control-Max-Age: 1000
Access-Control-Allow-Headers: Content-Type, X-Auth-Token , Authorization, Accept
Cache-Control: no-cache, private
X-RateLimit-Limit: 60
X-RateLimit-Remaining: 59
Content-Length: 86
Content-Type: application/json

Posts: 1

Participants: 1

Read full topic

ngIf doesn't reflect the changes trough events

$
0
0

@akil27 wrote:

I am subscribing to an event in my home page in which I am changing the one of the objects in my array in the callback function and the view needs to change accordingly. When I publish the event in another page callback function works and object changes but when I come back to the home page I don’t see the visual changes. Is this normal behavior of angular or what should I do to see the changes?

Posts: 1

Participants: 1

Read full topic

(ionic-v3) Preventing ion-menu from closing on click

$
0
0

@caio1985 wrote:

Hi,

I’m using intro.js to help users understand the app menu.

Right now, when the menu is opened, I fire the library to guide the user on how to use the menu. However, when that happens, ion-menu is hidden automatically.

Intro.js shows sort of a popup which you can hit next and it will highlight the component you select, showing a brief description of it. But I believe for some reason ion-menu is capturing those click events and hiding itself.

How can I keep the menu opened while presenting the user with this onboarding experience provided by Intro.js?

This is how the menu is declared on the page:
<ion-menu #myMenu (ionOpen)=“menuOpened()” *ngIf=“releaseVersion” type=“overlay” [content]=“myContent”>

Thanks!
Caio

Posts: 1

Participants: 1

Read full topic

Capacitor writeFile - Saving pdf file is in invalid format

$
0
0

@wekas wrote:

I am generating a pdf using pdfMake and writing it to an android device so that I can open it.
I am using Capacitor and the file system command does not appear to take a blob (this worked in cordova) so I am sending it a base64.
It seems to write ok but when I open the pdf it says the format is invalid.

Note: The cordova file plugin does not work with Capacitor (Cordova plugins not working with Capacitor) so it seems I am stuck with Capacitor file system commands.

Can I write to blob in capacitor or is there a problem with my code??

Help please, I have spend days on this!

   this.pdfObj = pdfMake.createPdf(docDefinition);

    if (this.plt.is('cordova')) {
      this.pdfObj.getBase64((data) => {
        this.pdfBase64 = data;
        console.log(this.pdfBase64);
      });
    }
  }

  downloadPdf() {
    const { Filesystem } = Plugins;

    if (this.plt.is('cordova')) {
      console.log('3');
        // Save the PDF to the data Directory of our App
        const fileName = 'defectreport.pdf';
        try {
          Filesystem.writeFile({
            path: fileName,
            data: this.pdfBase64,
            directory: FilesystemDirectory.Data,
            encoding: FilesystemEncoding.UTF8
          }).then((writeFileResult) => {
            console.log('File Written');
            Filesystem.getUri({
                directory: FilesystemDirectory.Data,
                path: fileName
            }).then((getUriResult) => {
                console.log(getUriResult);
                const path = getUriResult.uri;
                this.fileOpener.open(path, 'application/pdf')
                .then(() => console.log('File is opened'))
                .catch(error => console.log('Error openening file', error));
            }, (error) => {
                console.log(error);
            });
          });
          console.log('writeFile complete');
        } catch (error) {
          console.error('Unable to write file', error);
        }

Posts: 1

Participants: 1

Read full topic

Do you know how to save and open a pdf using Capacitor and Ionic 4?

$
0
0

@wekas wrote:

I can generate a pdf (using pdfmake), save and open it on an android emulator fine with Cordova. There are a lot of examples of how to do this.
What I can’t seem to do is do this using Capacitor.

Any examples or suggestions would be massively appreciated :slight_smile:

See my attempt here:

Posts: 1

Participants: 1

Read full topic

Style is not applied to ion-button

$
0
0

@brianmackey wrote:

<ion-button shape="round" fill="outline">Outline + Round</ion-button>

This button is displayed as just white text. It doesn’t even look like a button. This is how the Ionic 4 documentation says things should work. However, the existing code works fine:

<button ion-button shape="round" fill="outline" class="card-button" (click)="onCancelClicked()" align="right">Cancel</button>

I reproduced this in stackblitz.

The package json says:

"@ionic-native/core": "4.3.0",
"@ionic/app-scripts": "3.0.0",

So why does the app not work? I inherited this app from another developer. So it’s possible they were on Ionic 3 or older at some point…I have no idea. What can I check?

Ionic:

ionic (Ionic CLI) : 4.10.3 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.7.1
@ionic/app-scripts : 3.0.0

Cordova:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : ios 4.5.5
Cordova Plugins : cordova-plugin-ionic 1.1.9, (and 9 other plugins)

System:

ios-deploy : 1.9.4
NodeJS : v8.15.0 (/usr/local/bin/node)
npm : 6.4.1
OS : macOS Mojave
Xcode : Xcode 10.1 Build version 10B61

Posts: 1

Participants: 1

Read full topic

Calendar in ionic


For loop an HTTP request logical error

$
0
0

@dmlkl wrote:

Hello,

Can anyone guide me on this? Below is the sample code. I tried to call an HTTP request inside the for loop, but the loop doesn’t wait for HTTP request finish already enter the next loop.

  • requestService.GetTelemetryData is the HTTP request.
GetGeneralInfo(){

for (let i = 0; i < deviceData.length; i++) {
conso.log("Loop Start")
            this.requestService.GetTelemetryData(loginAcc['token'], deviceData[i]["id"]["id"]).then((telemetryData) => {

              console.log("After GetTelemetryData()");
              let status = JSON.parse(telemetryData['status']);

              if (status == 401) {
                console.log("Token Expired...")

                this.requestService.RefreshToken(loginAcc['token'], loginAcc['refreshToken']).then(refreshTokenResponse => {

                 //i need to terminated the for loop and recall this method with new token
                  this.GetGeneralInfo();
                });

              }
              else if (status == 200) {
                console.log("Token is valid and data is given....")
                let data = JSON.parse(telemetryData['data']);
              }
            })
          }
}


The codes will continue for loop without waiting for the HTTP request finish. Let say the device data length is 2, for loop will print “Loop start” twice then only print "After GetTelemetryData()"

Currently

“Loop Start”
“Loop Start”
“After GetTelemetryData()”
“After GetTelemetryData()”

Expectation

“Loop Start”
“After GetTelemetryData()”
“Loop Start”
“After GetTelemetryData()”

Can guide me on this? Thanks.

Posts: 1

Participants: 1

Read full topic

How to start ionic3 app?

$
0
0

@basti wrote:

I want to start an ionic3 app, because I want a similar environment like another app which I created.

ionic start myApp sidemenu

creates an ionic4 app. For an ionic1 app

ionic start myApp sidemenu --type ionic1

is designated.

So, is there still an opportunity to start an ionic3 app?

Posts: 1

Participants: 1

Read full topic

How To Output in Event From Popover in Ionic 4?

$
0
0

@kalimulhaq wrote:

I would like to @Output an Event from from Popover component to Parent component.
My Popover Component is

import { Component, OnInit, Output, EventEmitter } from '@angular/core';

@Component({
  selector: 'app-order',
  templateUrl: './order.component.html',
  styleUrls: ['./order.component.scss']
})
export class OrderComponent implements OnInit {
  @Output()
  onSelection = new EventEmitter<any>();

  constructor() {}

  ngOnInit() {}

  public selected() {
    this.onSelection.emit();
  }
}

Parent Component is

async sortPopover(ev: any) {
    const popover = await this.popoverController.create({
      component: OrderComponent,
      event: ev,
      translucent: true
    });
    return await popover.present();
  }

I what to receive the onSelection event from Popover component into Parent component.

Dose any body how to do that?

Posts: 1

Participants: 1

Read full topic

Getting image from image library

$
0
0

@elaias wrote:

Hi everyone!

Ionic 3, Angular CLI 7, Angular 5.

Not able to get an image from the library.

It fails on calling getPicture. I’m getting an error:

“Object(WEBPACK_IMPORTED_MODULE_1__ionic_native_core[“cordova”]) is not a function. (In ‘Object(WEBPACK_IMPORTED_MODULE_1__ionic_native_core[“cordova”])(this, “getPicture”, { “callbackOrder”: “reverse” }, arguments)’, ‘Object(WEBPACK_IMPORTED_MODULE_1__ionic_native_core[“cordova”])’ is an instance of Object)”

I already tried putting all native plugins to version 5.0.0-beta.15 but it doesn’t help.

Could anyone help me please?

Posts: 1

Participants: 1

Read full topic

How do i save the selected item in cart

$
0
0

@harshm90 wrote:

Hello,
Im really stuck at the place where I am unable to search what should i search :frowning:
I am doing a school project on restaurant app and i am stuck at the cart page where i add a single item i am able to see that item when i go back to menu page to add another the item disappears :open_mouth: how do i make him stay there unless & untill the user removes it from cart. please help badly stuck here :frowning:

Posts: 1

Participants: 1

Read full topic

Viewing all 71531 articles
Browse latest View live


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