January 16, 2019, 5:53 am
@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
↧
January 16, 2019, 6:43 am
@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
↧
↧
January 16, 2019, 7:02 am
@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
↧
January 16, 2019, 7:04 am
@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
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
↧
January 16, 2019, 7:26 am
@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
↧
↧
January 16, 2019, 8:20 am
@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
↧
January 16, 2019, 8:27 am
@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
↧
January 16, 2019, 8:38 am
@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
↧
January 16, 2019, 12:07 pm
@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
↧
↧
January 16, 2019, 12:25 pm
@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
I am using NativeStorage.
Thanks
Posts: 1
Participants: 1
Read full topic
↧
January 16, 2019, 1:38 pm
@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
↧
January 16, 2019, 8:34 pm
@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
↧
January 16, 2019, 9:39 pm
@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
↧
↧
January 16, 2019, 9:53 pm
↧
January 16, 2019, 10:07 pm
@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
↧
January 16, 2019, 10:22 pm
@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
↧
January 17, 2019, 12:17 am
@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
↧
↧
January 17, 2019, 12:21 am
@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
↧
January 17, 2019, 1:04 am
@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
↧
January 17, 2019, 1:38 am
@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!
Posts: 1
Participants: 1
Read full topic
↧