Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all 48980 articles
Browse latest View live

iOS doesn't open Plans/Maps from link

$
0
0

@AdamGelineau wrote:

Hey guys,

I’m building an Ionic 3 app and I have an issue with a maps link on iOS.
I have a button and a geolocation associated to it. When I click on it, the app should open Plans, Maps or Waze and get me to the geolocation I want.
Things is, it’s working perfectly on Android, but nothing happens on iOS…

I don’t know what to do.

Here is my button:

 <a [href]="getRestoGeo()" title="Itinéraire"><button ion-button class="btn-menu">M'y rendre</button></a>

And here is my getRestoGeo() function:

getRestoGeo(): SafeUrl {
    let url = "geo:";
    if(this.platform.is('ios')) {
        url = "maps://";
    }
    return this.sanitizer.bypassSecurityTrustUrl(url + this.resto.latitude + ", " + this.resto.longitude + "?q=" + this.resto.name + " " + this.resto.address + " " + this.resto.zipCode + " " + this.resto.city);
}

I’ve tried with many ways, like “maps://?q=LAT+LNG” etc… Nothing happens, no errors… Still working on Android !

Thanks for your help guys

Posts: 1

Participants: 1

Read full topic


Change Storage Product In Cart When Seller Updates Product

$
0
0

@sonitera wrote:

Hello everyone. For one of my projects, I’ve had to do a shopping cart where a buyer can add a product to their cart which stores in Ionic Storage(cordova-sqlite-storage plugin). I’d like to put a verifying check when the buyer clicks on a button called “PlaceOrder” that the storage items are either updated or deleted from storage based on if the seller has deleted or changed the product name or cost. I wouldn’t want that a buyer can buy an item that doesn’t exist anymore or whose name/price has changed. Since Ionic Storage seems to store for a relatively long time, a buyer may add items to cart in week 1, and then decide to purchase in week 3, when product details may have changed. I have come up with the below code but it is so mammoth I am fearful that it may crash if there are many items in the cart storage. If there are simpler ways to achieve the functionality of deleting or updating products in cart storage, please let me know. Cheers.

placeOrder() {
   let loader = this.loadingCtrl.create({
      content: "Verifying Products..."
    });
    loader.present();
 
    this.storserv.getItems().then((todos) => {
      if (!todos) {
        loader.dismiss();

        return [];
      }
      else if (todos) {
        todos.forEach((item) => {
         firebase.database().ref(`products`).orderByChild('key').equalTo(item.key4)
            .on("value", snapie => {
              if (snapie.exists()) {
                snapie.forEach(snapshot => {
                  const tit = snapshot.val().title;
                  const numb = snapshot.val().cost;
                  if (item.cost != numb || item.title != tit) {
                    let productCount = item.count
                    let productPrice = productCount * parseInt(numb);
                
                    let cartProduct = {
                        count: item.count,
                        totalPrice: productPrice,
                        title: tit,
                        description: item.description,
                        cost: numb,
                        image: item.image,
                        key4: item.key,
                      };
                      this.removeItem(item).then(() => { 
                      this.storserv.updateCarts(cartProduct).then((val) => {
                         loader.dismiss().catch(()=>{});
                        this.presentToast("Product(s) updated!")
                        this.loade();

                      }); 
                    })
                  } else { console.info('NoChange') 
                  loader.dismiss().catch(()=>{});
                }
                })
              } else {

                this.removeItem(item)
                  .then(() => {
                    loader.dismiss().catch(()=>{});
                    this.presentToast("Sorry, product(s) removed due to unavailability!");
                  })
                this.loade();

              }

              return false;
              })
        })
      }
    });
}


loade() {
    let loader = this.loadingCtrl.create({
      content: "Updating Cart..."
    });
    loader.present();
    this.storserv.getItems().then((todos) => {
      if (!todos) {
        loader.dismiss();
        return [];

      }
      else if (todos) {
        this.cartItemsy = todos
        loader.dismiss();
      }

    });
  }


In storserv (Storage Service)

 getItems() {
    let _this = this;
    return this.storage.get('cart').then((v) => {
      return _this.items = JSON.parse(v);
    });
  }


Initial AddToCart Method

addToCart(product) {
    return this.getItems().then(result => {
      if (result) {
        if (!this.containsObject(product, result)) {
          result.push(product);
          return this.storage.set('cart', JSON.stringify(result))
            .then(() => { console.log(result, 'll') });
        } else {
          let index = result.findIndex(x => x.key4 == product.key4);
          let prevQuantity = parseInt(result[index].count);
          product.count = (prevQuantity + product.count);
          let currentPrice = (parseInt(product.totalPrice) * product.count);
          product.totalPrice = currentPrice;
          result.push(product);
          return this.storage.set('cart', JSON.stringify(result))
            .then(() => { console.log(result, '8l') });
        }
      } else {
        return this.storage.set('cart', JSON.stringify([product]))
          .then(() => { console.log(product, '6l') });
      }
    })
  }


containsObject(obj, list): boolean {
    if (!list.length) {
      return false;
    }

    if (obj == null) {
      return false;
    }
    let i;
    for (i = 0; i < list.length; i++) {
      if (list[i].key4 == obj.key4) {
        return true;
      }
    }
    return false;
  }

Posts: 1

Participants: 1

Read full topic

Android app 64 bit requirement

$
0
0

@BrentAshWilliams wrote:

I have created an app with ionic 3 that is currently in the Google play store.

Will it support the Android 64 bit requirement?

Thanks

Posts: 1

Participants: 1

Read full topic

Add animation to modal based on button click?

$
0
0

@JensOlleOlsson wrote:

Hello everyone,

Right now I have a modal that is opened with a nice slide in transition. In the modal there is a toolbar that has a “back-arrow”. When you press the back-arrow the modal slides out from where it came :slight_smile:

Now, in the modal I have a save-button at the bottom to save changes. AND it feels only natural that the “leave animation” is the standard modal.dismiss() animation, where the modal just fades out downwards.

My question:
Can you dynamically change the “leave animation” of a modal? I would like to have one “leave animation” when the user presses “back” and the standard if you choose to save the information in the modal.

async openHanteraLicens(item: any) {
    this.licenserService.setRowClicked(item);
    const hanteraLicensModal = await this.modalController.create({
      component: HanteraLicensPage,
      componentProps: {
        item: item 
      },
      enterAnimation: mEnterAnimation,
      leaveAnimation: mLeaveAnimation
    });
    return await hanteraLicensModal.present(); 
  }

Posts: 1

Participants: 1

Read full topic

Uploading an ionic app to play store/apple store

$
0
0

@symeonmattes wrote:

Hi,

I would like to upload an ionic application to apple/play store on behalf of a company. I have found this article:

For play store should I create a new gmail account,e.g. mycompanyname@gmail.com and just pay $25? And for the apple store is it similar I just pay $99 for the same email address?

Thanks

Posts: 2

Participants: 2

Read full topic

Hide tabbar when ion-menu is shown

$
0
0

@shorstmann wrote:

Hi all,

i have an ionic app that loads a “MenuPage” after Login. The “MenuPage” holds my with and sets the rootPage to my “TabPage”. Works good on all devices.

Now i want to hide the tabbar if the split-pane is shown (like on iPad or in Browser).

I am trying this with (ionChange) and firing an event to my “TabPage”. This works when i resize the app but not on inital startup. I think on initial startup the TabBar could not be found so it could not be hide? How can i solve my problem?

Her is some code:

menu.html

<ion-split-pane (ionChange)="onSplitPaneChange($event)">
    ...
</ion-split-pane>

menupage.ts

...
onSplitPaneChange(e) {
    if (e._visible) {
        this.events.publish('hide-tabbar', true);
    } else {
        this.events.publish('hide-tabbar', false);
    }
}
...

tabspage.ts

...
events.subscribe('hide-tabbar', (hide) => {
      console.log("hide-tabbar event");
      if (hide) {
        this.tabs.setTabbarHidden(true);
      } else {
        this.tabs.setTabbarHidden(false);
      }
    });
...

Posts: 1

Participants: 1

Read full topic

Is it possible to use hotword api ? like sonux or snowboy to integrate in ionic?

$
0
0

@kkulloters wrote:

hi im a newbie in ionic and Im creating a speech recognition app for our project and I want it that when it hears a keywod like for example "OK Google " it will then ask “what can i do” something. My question is that, what api can I use to have this ? by the way our project is not machine learning the question will be ask by the system is just static. I hope you can help me with this.

Posts: 1

Participants: 1

Read full topic

Menu toggle icon gets hidden class when using md mode and iOS - v4

$
0
0

@pixelflips wrote:

I have applied the md mode/class to be used at all times in the app. The split panel appears to be working properly on Android devices in the Chrome dev tools. One thing I have noticed though is when testing in dev tools when I select an iOS device the hamburger menu (ion-menu-toggle) disappears.

It appears a class ‘menu-toggle-hidden’ is applied when switching to iOS. Does anyone know how to prevent the hamburger from being hidden on small screen sizes? When it disappears, there is no way to toggle the split-panel if viewing from iOS and smaller screen sizes. Ideally, I’d like to use the md mode/class only since we plan on serving the material style to all devices.

This is my toolbar: (the ion-menu-toggle is the section that does not appear on iOS)

<ion-toolbar color="dark">
      <ion-buttons slot="start">
        <ion-menu-toggle>
          <ion-button>
            <ion-icon name="menu"></ion-icon>
          </ion-button>
        </ion-menu-toggle>
      </ion-buttons>
      <ion-title>Title</ion-title>
      <ion-buttons slot="primary">
        <ion-button>
          <ion-icon name="search"></ion-icon>
        </ion-button>
      </ion-buttons>
    </ion-toolbar>

This is my app layout:

<ion-app>
  <ion-split-pane>
    <ion-menu></ion-menu>
    <ion-router-outlet main></ion-router-outlet>
  </ion-split-pane>
</ion-app>

Any thoughts or suggestions would be greatly appreciated and thanks in advance!

Posts: 1

Participants: 1

Read full topic


Is it possible to display text on the ion-progress-bar

$
0
0

@Strider86 wrote:

Following the documentation, it is not specified that there is a property that displays or hides the progress text (1%, 2%,…).
Is there any possible way to add the progress text to the progress bar?

Thanks

Posts: 1

Participants: 1

Read full topic

Clear AppData/Library/Preferences

$
0
0

@iwok wrote:

Hi,

i have exported my app via Xcode and the AppData/Library/Preferences contains 1447 info.plist files with endings like this: “.plist.0abU8iD”.
How can i delete these files without losing my complete appdata? My documents and data directory in iOS is actually 2,6GB big :smiley:
I am using NativeStorage.
Thanks :slight_smile:

Posts: 1

Participants: 1

Read full topic

Android missing package

$
0
0

@kusza wrote:

I am using package @ionic/storage for saving some data, that should persist after closing and opening the app. On iOS it is working fine. On android the data cannot be loaded/or saved. After opening the app trough DevApp on android the data is saved and cam be read.
Is there solution for this?
For example setting the storage configuration?

@ionic/storage”: “2.1.3”

Thank you

Posts: 1

Participants: 1

Read full topic

Service worker

$
0
0

@KA-Neha wrote:

During initial loading of the ionic-angular4 app, how to get all pages cached using service worker

Posts: 1

Participants: 1

Read full topic

Deeplinking in ios can't use subscribe()

$
0
0

@rashidi wrote:

I use ionic-plugin-deeplinks in my app.
this work in android correctly.
but not work in iOS correctly.
in iOS launch app but not work subscribe.
I acted on the basis of issue but not work.

ionic info:

ionic (Ionic CLI)             : 4.8.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework               : @ionic/angular 4.0.0-rc.0
@angular-devkit/build-angular : 0.12.1
@angular-devkit/schematics    : 7.1.4
@angular/cli                  : 7.1.4
@ionic/angular-toolkit        : 1.2.2

Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms     : ios 4.5.5
Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.0.0, (and 18 other plugins)

Posts: 1

Participants: 1

Read full topic

After fixing android build problem, facebook login does not work

$
0
0

@bufpal wrote:

I suddenly got android builds fail due to missing jcenter dependencies.
(https://ionic.zendesk.com/hc/en-us/articles/360005529314-Android-builds-fail-due-to-missing-jcenter-dependencies)

After fixing android builds fail problem, facebook log-in does not work anymore.
I’m getting “Facebook error: CONNECTION_FAILURE: CONNECTION_FAILURE”

Please help me !!

Thank You

package version:
“cordova-android”: “7.0.0”
“cordova-plugin-facebook4”: “^2.2.0”

Posts: 1

Participants: 1

Read full topic

Explain how images cache work in Ionic 4

$
0
0

@akila321 wrote:

Can someone explain me how ion-img cache mechanism in Ionic 4? What are default configs and how can I change them?

Posts: 1

Participants: 1

Read full topic


How to validate form while button click

$
0
0

@flycoders_sourav wrote:

How to validate a form while button click. Actually i want to do if any field is empty when i click on a submit button there i want a alert message like this field is required. how can i do that
Please help me out
Thanks

Posts: 1

Participants: 1

Read full topic

Ionic 4: change opacity in disabled ion-checkbox

$
0
0

@MrFloppy wrote:

Hey guys,

I tried to change to opacity of an ion-checkbox (including the label) but it just didn’t work. i tried to set

--checkbox-ios-disabled-opacity: 1 !important;
--checkbox-md-disabled-opacity: 1 !important;

But nothing happened. It get’s overwritten by .3 from “.item-interactive-disabled”. Any chance I can change this somehow within the shadow dom?

Posts: 1

Participants: 1

Read full topic

Hide or show selective side menu items based on active tab

$
0
0

@saifu14 wrote:

How to hide or show a specific side menu item based on an active tab.
I use Ionic4.
My menu items are listed in AppComponent class as an array variable.

Below is a sample code.
‘Create account’ menu should show only when I choose ‘Accounts’ tab page
‘New post’ menu should show only when I choose ‘Posts’ tab page

  public appPages = [
    {title:'Create account',url:'/create-account'},
    {title:'New post',url:'/new-post},
    ];

Posts: 1

Participants: 1

Read full topic

Ionic cordova run android

$
0
0

@abbashere wrote:

Need help during cordova run android

always failed with below line

> ng run app:ionic-cordova-build --platform=android

 95% emitting index-html-webpack-plugin **ENFILE: file table overflow, open '/Users/xxxx/java_dev/ionic4-angular6-crud/www/svg/md-pie.svg'**

**Error: ENFILE: file table overflow, open '/Users/xxxxx/java_dev/ionic4-angular6-crud/www/svg/md-pie.svg'**

[ **ERROR** ] **An error occurred while running subprocess** **ng** **.**

Posts: 1

Participants: 1

Read full topic

Offline Mode for Realtime Database Application

$
0
0

@danielederosa wrote:

Hi guys,

is there any way to build an offline mode for an Ionic3 app with the Firebase Realtime Database (angularfire2) without migrating to Cloud Firestore? My data structure is very complex, so migrating would be just hard…

I found the angularfire2-offline package, which seems to do absolutely what I need! But this plugin is not compatible with the Angular and rsjx versions in the Ionic3 version.

Do you have any idea? What I need: Download the data once from database and storing to the device. Then sync to database if changes detected…

Regards! :slight_smile:

Posts: 1

Participants: 1

Read full topic

Viewing all 48980 articles
Browse latest View live


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