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

How to see downloaded file in iphone

$
0
0

@sagar1412 wrote:

hi,i am use file.documentDirectory path for download xls file.after download, used file opener for display xls.but same time i am try to find xls file on my iphone (file manager app) but not show

my main purpose is i am download xls type file but if xls type supportive app not install on our mobile my file not show .after that i try to find in file managar app here my xls file not see

Posts: 1

Participants: 1

Read full topic


CSS Utilities don't work in pages

$
0
0

@JEricaM wrote:

Hi to everyone :slightly_smiling_face:
I’ve started a Pwa Ionic + Stencil toolkit project

And I’ve the Ionic css utils in my app.css

/** Optional CSS utils that can be commented out */
@import "~@ionic/core/css/padding.css";
@import "~@ionic/core/css/float-elements.css";
@import "~@ionic/core/css/text-alignment.css";
@import "~@ionic/core/css/text-transformation.css";
@import "~@ionic/core/css/flex-utils.css";
@import "~@ionic/core/css/display.css";

If I use the css utils classes like .ion-text-justify inside a page of my pwa, the util don’t work unless I unclude the optionals @imports inside my page css.

I don’t understand why I have this problem because I include in the app.css under /global

Thank you for the help

Posts: 1

Participants: 1

Read full topic

iOS Build Failed Neither Config

Events ion-picker

$
0
0

@bbarascou wrote:

Hello everyone,

i’m trying to display a message before opening the picker using the event ionPickerWillPresent.
But i don’t know how to use it properly.

Can you help me pls ?

This is how i create the picker

    let options: PickerOptions = {
      buttons: [
        {
          text: "Annuler",
          role: 'cancel'
        },
        {
          text: 'Ok',
          handler: (value: any) => {
     


          }
        }
      ],
      columns: [{
        name: 'Minutes',
        options: this.getColumnOptions()
      }]
    };
    let picker = await this.pickerController.create(options);
    picker.present();

Posts: 1

Participants: 1

Read full topic

How to serve ionic in light mode instead of light mode

$
0
0

@Blanketsniffer wrote:

while I am building my app, when i serve it, browser shows the app in the dark mode by default, how do I switch to the light mode so that i can also see how it looks without the dark mode ?

Posts: 1

Participants: 1

Read full topic

ion-item-sliding multiple selection

$
0
0

@oscarMoberest wrote:

I had a ionic3 project with a list of notifications using ion-item-sliding items. You could select one or multiple notifications (items). Everytime you slid an item to the right, the notification was marked as selected and then you could delete them all, or mark them as read. After doing something, all open items closed programmatically. That’s the expected behavior.

Now I’ve recently migrated the project to the last version of ionic and now I can only select/slide 1 item at a time. When an item is open and I try to slide another, the first one closes automatically. So it’s impossible to select multiple items.

Maybe it’s me doing something wrong, but after a lot of search I haven’t found any documentation about this, not a single mention. I would like to know, is it possible to allow multiple selection with ion-item-sliding? And how?

Posts: 1

Participants: 1

Read full topic

How to pass selected as formControl value in Reactive Form?

$
0
0

@Sweg wrote:

I am trying to add a <ion-radio-group> to a reactive form in my Ionic / Angular app.

Here is the Typescript:

ngOnInit() {
    this.form = new FormGroup({
      userType: new FormControl(null, {
        updateOn: 'blur',
        validators: [Validators.required]
      }),
}

And here is the HTML:

<form [formGroup]="form">
    <ion-radio-group>
        <ion-row>
                <ion-col size-sm="3" offset-sm="3">
                    <ion-label>User Type:</ion-label>
                </ion-col>
        </ion-row>
        <ion-row>
            <ion-col size-sm="3" offset-sm="3">
                <ion-item lines="none">
                    <ion-label>Customer</ion-label>
                    <ion-radio value="customer"></ion-radio>
                </ion-item>
            </ion-col>
            <ion-col size-sm="3">
                <ion-item lines="none">
                    <ion-label>Mechanic</ion-label>
                    <ion-radio value="mechanic"></ion-radio>
                </ion-item>
            </ion-col>
        </ion-row>
    </ion-radio-group>
    <ion-button color="primary" (click)="onSubmit()">Submit</ion-button>
</form>

When I click the Submit button, the below code is ran, & “form invalid” is logged.

onSubmit() {
    if (this.form.invalid) {
      console.log('form invalid');
      return;
    }

Can someone please tell me what changes are required so that I can pass the value of the selected <ion-radio> as userType as part of this form?

Posts: 1

Participants: 1

Read full topic

Ion-slides not working with ion-segment after update on ionic5

$
0
0

@William_Wallace wrote:

Hey there,
I try to stay as short as I can and hope somebody can help me. I am happy about any help that I can get, because I am running out of ideas now.

It is a bit more complex, but I try to stay focused:

  • ion-segment-button
  • ion-slides in the templates
  • ion tabs combined with ion side menu as Navigation concept for the app

So far so good.

I control my sliders with the ion-segment-buttons and wit worked like a charm

Since the update on Ionic 5 that is past. I am running into some really strange things, that makes me believes I am in some kind of “Stranger Things”-Episode maybe. Just kidding, it is really strange. But let’s stay focus.

The problem is as follows:

  • I can change my ion-slides with the ion-segment-buttons only in the first view that gets loaded (ionic serve, also on devices)

On the first view everything is fine. When I change the view via tabbed menu, it is over. I am not able to change the slides. The view is updating, also the indicator on the segment buttons. But the slides does not work anymore. When I start from the second view as “init”-View all works good. There I describe this as a strange error.

Not the getActiveIndex, not the slideTo method. Just really strange. But it still shows me the slider and no error for sure.

Also the (ionSlideDidLoad) event is triggereing more than just one on the second view (saw it via console.log) but my DOM looks ok I guess.

  • I was thinking it is something with the DOM or Platform-Ready, but any try in that way did not solve anything. - Also thought it could be something on the breaking changes for ionic5. But did not found something
  • Then I also made sure that the sidemenu and tab-menu has nothing to do with it. Test it with Side and tab. both same (so routing should be fine too i guess)
  • Also tried the (ionChange)=“segmentChange($event)” on the ionSegment, but same error in the not init view… getActiveIndex or SlideTo is doing just nothing.

Ok, so far so good. my template looks short like this one here:

And also important, I call data from an external API that got rendered inside the slides.

Thank you in advance for any help! I have really no more idea and just hoping I have something really stupid not seen here. :frowning:

<ion-header>
    <ion-toolbar mode="ios">
        <ion-buttons slot="start">
            <ion-back-button text=""></ion-back-button>
        </ion-buttons>
        <ion-buttons slot="end">
            <ion-menu-button></ion-menu-button>
        </ion-buttons>
        <ion-title>Logo</ion-title>
    </ion-toolbar>
    <div class="ion-segment-background">
        <ion-segment  mode="md" class="SwipedTabs-tabs sr-slider-scroll" [(ngModel)]="tabIndex">
            <ion-segment-button *ngFor='let tab of tabs ; let i = index ' (click)="selectTab(slide, i)" value="{{i}}" >
                {{tab}}
            </ion-segment-button>
        </ion-segment>
    </div>

</ion-header>

<ion-content>

<ion-slides *ngIf="ready" #SwipedTabsSliderNews
              (ionSlidesDidLoad) = "onSliderInit($event)"
              (ionSlideTransitionEnd)="updateTabIndex($event)"
              [pager]="false"
              [options]="{autoHeight: true}">


            <!-- First Slide -->
            <ion-slide id="first">
            </ion-slide>

      <!-- Second Slide -->
            <ion-slide id="second">
            </ion-slide>

      <!-- third Slide -->
            <ion-slide id="third">
               <!-- this is in every slide for sure, but also commented it out, no change, just wanna show it anyway --> 
               <ion-infinite-scroll *ngIf="tabIndex == 2" threshold="100px" (ionInfinite)="loadInfiniteData($event, 'events')" >
                        <ion-infinite-scroll-content
                                class="ion-infinite-customs"
                                loadingSpinner="circles"
                                loadingText="Loading....">
                        </ion-infinite-scroll-content>
                    </ion-infinite-scroll>
            </ion-slide>

</ion-content>

And then here some stuff from the ts-file: There is for sure more, but I still try to stay as short as I can.

imports ... and so on (Ion Slides for sure!) 

export class NewsPage implements OnInit {

@ViewChild('SwipedTabsSliderNews') public SwipedTabsSliderNews: IonSlides;

constructor(){
    this.tabs = ["Tab 1 ","Tab 3", "Tab 3"];
    this.tabIndex = 0;
}

  selectTab(slide, index) {
    console.log("News: Inside selectTab with index " + index);
    console.log(slide);
    slide.slideTo(index);
    slide.getActiveIndex().then(index => {
      console.log("News inside activeindex on selectTab" + index);
      console.log(typeof(index));
      this.tabIndex = index;
      console.log(this.tabIndex);
      console.log(typeof(this.tabIndex));
    });
  }

  updateTabIndex($event){
    this.SwipedTabsSliderNews.getActiveIndex().then(index => {
      this.tabIndex = index;
    });
  }

  onSliderInit(event){
//this one got triggered multiple times when it is not the "initial View"
    console.log("On Slider Init");
    console.log(event);
  }

}

Thanks everyone!

Posts: 1

Participants: 1

Read full topic


Ionic http on ios

$
0
0

@labeatkadriu wrote:

Hi guys i made a E-Shop with ionic and angular, now i build in android everthing work fine but in ios its not getting product and anything else.
Any help ,

Posts: 1

Participants: 1

Read full topic

How to use multiple ion-radio controls in reactive form?

$
0
0

@Sweg wrote:

In my Ionic / Angular app, I am trying to allow users to select a user type when signing up.

For example, I want them to choose whether they are a Customer or a Supplier.

I tried to add these 2 options to an <ion-radio-group> as part of a reactive form.

I have tried adding formConrolName to the <ion-radio-group>, & then using the value of the ion-radio, but that is not working.

I’m just wondering what is the best work-around option that can allow me to enable this functionality?

Posts: 1

Participants: 1

Read full topic

Something about view life clycle : ngAfterViewInit Issue

$
0
0

@peterkhang69 wrote:

Can you please help me with an issue. Its urgent and important

(<any>window).cancelCallback = ()=>{
        debugger;
        console.log("Cancel callback was created with window instance");
        this.loader.dismiss();
    };

This is the callback method for payment. It is added to window every time I enter the view hence upon payment completion or cancellation the respective callback method is called as many number of times as I have entered that specific ts file where the callback methods are written. How should I get them added only once or remove them upon leaving the view. Kindly help as this is very urgent.

Ive tried writing this in ngAfterViewInit but it still does the same thing

From slack channel

Posts: 1

Participants: 1

Read full topic

Capacitor + Ionic4 : customurlscheme not redirecting to app from the browser app

Speech recognition on Apple devices no longer works after stop and restart

$
0
0

@ksc1 wrote:

Hi
we are currently using speech recognition to perform a test. The task is to assign numbers to symbols and the assignment is done by speech recognition.
The test runs for 90 seconds. Here we have the problem that Apple only allows recognition for 60 seconds. We solved this by stopping and restarting the recognition after 52 seconds.

But now we have problems with ios 13.3.1 and ios 13.4.1 that we can not start the service successfully after 52 seconds.

The plugin we use has not been updated for 2 years. https://github.com/pbakondy/cordova-plugin-speechrecognition
Does anyone know of a newer alternative?

We get the following error message:
startListening() recognitionTask error: Error Domain=kAFAssistantErrorDomain Code=209 “(null)”

We appreciate any information on solutions!

Posts: 1

Participants: 1

Read full topic

Image cache from disk cache problem

$
0
0

@HaLe207 wrote:

On my website angular, when i go to page first time, it load all image (from asset) and when back this page again, it will not load image again or load from disk cache. But on in my ionic v4 app, all time when i back to page, all image reload again. Pls help me. Thank you.

Posts: 1

Participants: 1

Read full topic

Is it possible to connect an app to two distinct Firebase accounts?

$
0
0

@ioclaudio wrote:

Hi,
I have an Ionic4 app that uses the Firebase Analytics plugin (https://ionicframework.com/docs/native/firebase-analytics) to manage analytics.

Now I have to add Push Notifications to the App.

I’ve seen a lot of people use AngularFire and the Firebase plugin (https://ionicframework.com/docs/native/firebase).

Now, for this app, people that manage Analytics is different from people that manage Push Notifications, so my question is: Is it possible to connect an Ionic app to two different instances of Firebase?
Can I have, for example, two google-services.json and two GoogleService-Info.plist files?
Have you ever done this?

Thank you very much

cld

Posts: 1

Participants: 1

Read full topic


Issues with tabs

$
0
0

@Nadzz1 wrote:

Hi, I’m new to using Ionic, and haven’t really used Angular before, I have some backend help but I need some frontend help, I have been trying for days to get this tabs system to work however, it doesn’t seem to work, I made an alternative by adding this after the ionic-content tag on each page:

<ion-tab-button (click)="gotoMatches()">

  <ion-icon name="people-circle" color="danger"></ion-icon>

  <ion-label>Matches</ion-label>

</ion-tab-button>

<ion-tab-button tab="usermessages">

  <ion-icon name="chatbox-ellipses"></ion-icon>

  <ion-label>Messages</ion-label>

  <ion-badge color="danger">6</ion-badge>

</ion-tab-button>

<ion-tab-button tab="map">

  <ion-icon name="options"></ion-icon>

  <ion-label>Filter</ion-label>

</ion-tab-button>

<ion-tab-button tab="about">

  <ion-icon name="person-circle"></ion-icon>

  <ion-label>My Account</ion-label>

</ion-tab-button>

To redirect, I am using a function which is goToMatches() and it works, however now my scrolling has been blocked and wont scroll at all and I have no idea on how to rectify it, I have also tried to do it the normal way with routing ect however it doesn’t ever seem to work, thank you for taking your time to read this,

Kind Regards
Nadz

Posts: 1

Participants: 1

Read full topic

Ask InAppBrowser to always use _blank

$
0
0

@vitonimal wrote:

Hello! I am using ionic 4 and capacitor. I am trying to use inappbrowser to open a simple google page inside the app, but when the call is made it opens my safari browser instead of a popup.

I am using @ionic-native/in-app-browser ^5.1.0
and the Cordova plugin is 3.2.0

It seems like InAppBrowser uses the system option by default, which opens up the system browser. However, I am using an rpm package for oidc and I do not have control on it unless I wrap it.

Is there a way to ask InAppBrowser to always use _blank?

I also added InAppBrowser in the providers array of the App Module.

What am I missing?

Thank you so much

Posts: 1

Participants: 1

Read full topic

How would I use the interfaces Ionic uses behind the scenes?

$
0
0

@twojtylak wrote:

Hey everyone!

I am trying to use the ToastOptions interface that Ionic uses for their ToastController. I have found the file where the interface exists and it is being exported, but I can’t seem to get it imported into my service. Is there a way to use it directly without having to duplicate it?

Posts: 2

Participants: 2

Read full topic

How to create checksum ionic 3

Unable to detach callback method from window object

$
0
0

@NaveedShaikh12 wrote:

Hi Everyone,

So I am required to execute a Payment script with callback methods upon entering PaymentView.ts file. These callbacks method [cancelCallback, errorCallback etc…] needs to be written with absolute uri. So I wrote them in the below fashion.

(window).cancelCallback = ()=>{
debugger;
console.log(“Cancel callback was created with window instance”);
this.loader.dismiss();
};

Now when I exit the PaymentView, and reenter the PaymentView, these methods gets piled up, as in the number of times I enter PaymentView, that number of times the callbackMethods will be fired. This is really serious issue, kindly post your thoughts on urgency.

Thanks!

Posts: 1

Participants: 1

Read full topic

Viewing all 70442 articles
Browse latest View live


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