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

Zooming image slider Ionic 2

$
0
0

@valentinay wrote:

Hello everyone ,

I’m trying to build a slider with ion-slides where I want the user to be able to pinch to zoom.
any ideas on how to do that ?

I have tried hard coding it but zooming isn’t smooth and I feel like there is much better ways to do it natively.
any Ideas?

Thank you!

Posts: 1

Participants: 1

Read full topic


iOS 11 scroll bouncing with ionic 3.9.2

$
0
0

@moizamjad wrote:

I’am using ionic 3.9.3, and created a login page,by default it is adding scroll in page and when I’m pulling down the content and at the time of touch release it is showing some glitch/bounce.
I have already tried the no-bounce but no luck.
please guild me how to resolve it thanks.

Expected Behavior
it should not add scroll by default, when keyboard opens content should scroll without jerk/bounce with smooth scrolling

Ionic Info

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.0.0 

local packages:

@ionic/app-scripts : 3.1.9
Cordova Platforms  : android 7.0.0 ios 4.5.4
Ionic Framework    : ionic-angular 3.9.2

System:

Node  : v8.11.2
npm   : 5.6.0 
OS    : macOS High Sierra
Xcode : Xcode 9.4.1 Build version 9F2000 

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : pro

Posts: 1

Participants: 1

Read full topic

Please!..When i try ionic cordova build android..not works

Using what method for authorization jwt wp?

$
0
0

@ebeliejinfren wrote:

Hi
i want jwt api wordpress authorization, there are many tutorials about it but most of they out of date and not work
any body knows a way or method for doing that ? please if somebody use anything for authorization jwt wp for yourself in ion v3, guide here

thank amilion

Posts: 1

Participants: 1

Read full topic

Forcing users to update

$
0
0

@heardnetwork wrote:

We’re upgrading from RTDB to firestore for our chat app, and as there are group messages we need users to update so they don’t miss anything.

What’s the best way to do this? I’ve seen another app i know is created in Ionic that brought a message up saying the user had to upgrade, and they couldn’t progress any further without updating. This would be perfect for us, but how easy is that to do?

tia :slight_smile:

Posts: 1

Participants: 1

Read full topic

Cordova plugin fcm not working

$
0
0

@sagar-pathak wrote:

Cannot capture the event for the tap on notification on android device when app is in background.

getNotifications() {
    this.fcm.onNotification().subscribe(data => {
        console.log('onNotification.data')
        console.log(data)
    },
    success => {
        console.log('onNotification.success')
        console.log(success)
    });
}

Posts: 1

Participants: 1

Read full topic

Push notifications with ionic 3

Plus - Minus Component

$
0
0

@gabandres wrote:

Greetings!

I’ve been looking endlessly a component that meets my needs but sadly I haven’t.
This is the behavior I’ve been waiting to build but I can’t seem to do it properly. The closest behavior I thought of was <ion-input type="number" />

Still, it doesn’t suite me. This is the expected ui I need:

30%20AM

Posts: 1

Participants: 1

Read full topic


Send SMS with image

Monte Carlo simulations

$
0
0

@JAR19 wrote:

This is more a question about JavaScript rather than Ionic - it is just that I am using Ionic and have the issue.

Basically, I am using a series of for loop and lookups to calculate the allocation of staff to tasks.

All works fine until I start running multiple tries of the code with random selections to try and find the best solution.

The code then produces unexpected values and it seems that values from one set of procedure are leaking into another set.

I would publish the code here but to be honest, it won’t help much. I am not asking how to debug the code but basically how to run simulations within Ionic.

Has anyone got any suggestions - could I use a different language with Ionic 4?

Posts: 1

Participants: 1

Read full topic

Can't login to my ionic account

$
0
0

@majedmadam2 wrote:

? Email: **************2@gmail.com

? Password: [input is hidden]
C:\Users\ranaa>
it’s skipping the password and goes to the directory

Posts: 1

Participants: 1

Read full topic

App Icon in app drawer looks smaller then other apps

$
0
0

@tHe-AK wrote:

Hi All,
My app’s logo smaller then other apps in app drawer. Even ionic default logo also comes smaller in center instead of covering whole area.
Compare ionic logo vs amazon music logo in screenshot attached. Please suggest possible reasons for the issue. I am using Oreo.
ThanksScreenshot_20180629-212807

Posts: 2

Participants: 2

Read full topic

Native Google Maps: iPhone X bottom whitespace

$
0
0

@ebellempire wrote:

I have a native map in a modal controller wherein the tabs are hidden. Everything works great, but on the iPhoneX, there is some whitespace at the bottom. I know that this is basically the approach recommended by Apple’s HIG for the iPhone X, but I would like to experiment with having the map extend into the bottom safe area (since that is how non-tab content areas are displayed elsewhere in Ionic). Is there some CSS or other code I can use to override this default? cc: @wf9a5m75

Posts: 4

Participants: 2

Read full topic

iOS 11 app icon not work

$
0
0

@ulver85 wrote:

Hi guys,

I have a very frustrating problem, I have an app, generated with ionic 3 cli, that work perfectly on Android and iOS 12 but on iOS 11 the app icon not work.
Instead of my custom icon I have a blank iOS app Icon.

You can reproduce the issue following these steps:

run some ionic cli command to create and build a sample app:

ionic start myApp tabs
ionic cordova platform add ios
ionic cordova resources ios
ionic cordova build ios

Now open the project in xcode on a mac, then build and run on simulator iPhone 6 Plus iOS 11.3 .

If you build and run the project on simulator iPhone 6 plus iOS 12 it works.

I have tried all solution proposed here with no success: https://stackoverflow.com/questions/46109835/app-icons-not-included-in-build-from-xcode-9

I’m using xcode 10 beta.

Any help is appreciated, thanks.

Umberto

Posts: 1

Participants: 1

Read full topic

Slides -- how two know if a direction is locked

$
0
0

@helpmelearn wrote:

Trying to use our app in a browser. The Slide seems really buggy with a mouse.
I am trying to lock down the swiping when on a browser. With that I need to know if the swipe direction has already been locked.
I can stop them swiping in some cases using this
this.slides.lockSwipeToNext(true)

Later on I need to figure out if I’m still locked from swiping. Any way to know this?
I tried slides.noSwiping but it seems like I always get true.

Posts: 1

Participants: 1

Read full topic


Firebase Auth Connection

$
0
0

@jon_anastasi wrote:

Hi,

I have stumbled across an annoyingly weird issue and was wondering if somebody could possibly help me out.

I will play out the scenarios below.

Scenario 1

I build android APK using ‘ionic cordova build android’. Install the APK and then login using firebase auth. This works with no problems.

Scenario 2

If I build and download the APK via the Ionic Pro platform the Login auth with firebase returns as unsuccessful.

So far I have tried:

Adding the cordova whitelist plugin.
Set <access origin="*" /> in the config.xl

I have grabbed some logs (see below) from APK from the moment I press the Login Button.

06-29 17:51:54.358 31370-31370/com.tabaguiver I/chatty: uid=10082(com.tabaguiver) expire 10 lines
06-29 17:51:54.385 31370-31370/com.tabaguiver W/com.tabaguiver: Attempt to remove non-JNI local reference, dumping thread
06-29 17:51:54.431 31370-31413/com.tabaguiver W/SystemWebViewClient: URL blocked by whitelist: https://www.googleapis.com/identitytoolkit/v3/relyingparty/verifyPassword?key=AIzaSyD2FrrMpRlTcdFYWN4nTqv4uqTnHl4oRq4
06-29 17:51:54.434 31370-31370/com.tabaguiver D/SystemWebChromeClient: file:///data/user/0/com.tabaguiver/app_b46964bd-99d9-450d-b807-1f0ec65bd5b7/build/main.js: Line 2476 : login error
06-29 17:51:54.434 31370-31370/com.tabaguiver I/chromium: [INFO:CONSOLE(2476)] "login error", source: file:///data/user/0/com.tabaguiver/app_b46964bd-99d9-450d-b807-1f0ec65bd5b7/build/main.js (2476)
06-29 17:51:54.434 31370-31370/com.tabaguiver D/SystemWebChromeClient: file:///data/user/0/com.tabaguiver/app_b46964bd-99d9-450d-b807-1f0ec65bd5b7/build/main.js: Line 1099 : login err
06-29 17:51:54.434 31370-31370/com.tabaguiver I/chromium: [INFO:CONSOLE(1099)] "login err", source: file:///data/user/0/com.tabaguiver/app_b46964bd-99d9-450d-b807-1f0ec65bd5b7/build/main.js (1099)
06-29 17:51:54.487 31370-31370/com.tabaguiver W/com.tabaguiver: Attempt to remove non-JNI local reference, dumping thread

Much appreciated,
J

Posts: 1

Participants: 1

Read full topic

Uncaught (in promise)

$
0
0

@Saenz wrote:

Hola a todos, espero anden muy bien, les comento mi problema, quiero utilizar una lista que tengo en una pagina llamada Primera-A en otra q se llama equipos, me gustaria que la lista se genere de forma dinamica y poder mostrar la informacion en la pagina equipos segun que boton haya presionado en la pagina Primera-A, me tira el siguiente error:

Error: Uncaught (in promise): TypeError: Cannot read property ‘nombre’ of undefined
TypeError: Cannot read property ‘nombre’ of undefined
at Object.eval [as updateRenderer] (ng:///AppModule/EquiposPage.ngfactory.js:37:34)
at Object.debugUpdateRenderer [as updateRenderer] (http://localhost:8100/build/vendor.js:15109:21)
at checkAndUpdateView (http://localhost:8100/build/vendor.js:14223:14)
at callViewAction (http://localhost:8100/build/vendor.js:14569:21)
at execComponentViewsAction (http://localhost:8100/build/vendor.js:14501:13)
at checkAndUpdateView (http://localhost:8100/build/vendor.js:14224:5)
at callWithDebugContext (http://localhost:8100/build/vendor.js:15472:42)
at Object.debugCheckAndUpdateView [as checkAndUpdateView] (http://localhost:8100/build/vendor.js:15009:12)
at ViewRef_.detectChanges (http://localhost:8100/build/vendor.js:11993:22)
at NavControllerBase._viewAttachToDOM (http://localhost:8100/build/vendor.js:51942:40)
at c (http://localhost:8100/build/polyfills.js:3:19752)
at Object.reject (http://localhost:8100/build/polyfills.js:3:19174)
at NavControllerBase._fireError (http://localhost:8100/build/vendor.js:51705:16)
at NavControllerBase._failed (http://localhost:8100/build/vendor.js:51698:14)
at http://localhost:8100/build/vendor.js:51745:59
at t.invoke (http://localhost:8100/build/polyfills.js:3:14976)
at Object.onInvoke (http://localhost:8100/build/vendor.js:5134:33)
at t.invoke (http://localhost:8100/build/polyfills.js:3:14916)
at r.run (http://localhost:8100/build/polyfills.js:3:10143)
at http://localhost:8100/build/polyfills.js:3:20242

Les comparto los 2 archivos html y ts.

Primera-A Html

Primera - A
<ion-segment [(ngModel)]="PrimeraA">
    <ion-segment-button value="Equipos">
      Equipos
    </ion-segment-button>
    <ion-segment-button value="Posiciones">
      Posiciones
    </ion-segment-button>
    <ion-segment-button value="Goleadores">
      Goleadores
    </ion-segment-button>
    <ion-segment-button value="Fixture">
      Fixture
    </ion-segment-button>
</ion-segment>
<div [ngSwitch]="PrimeraA">
    <ion-list *ngSwitchCase="'Equipos'">
            <ion-item *ngFor="let equipo of equiposPA"(click)="abrirEquipo()">
              <img [src]="equipo.imagen" item-left>
              <h3>{{equipo.nombre}}</h3>
              <p small>{{equipo.localidad}}</p>
            </ion-item>        
    </ion-list>
  
    <ion-list *ngSwitchCase="'Posiciones'">
      <ion-item>
        <h2>Posiciones</h2>
      </ion-item>
      ...
    </ion-list>

    <ion-list *ngSwitchCase="'Goleadores'">
        <ion-item>
          <h2>Goleadores</h2>
        </ion-item>
        ...
    </ion-list>

    <ion-list *ngSwitchCase="'Fixture'">
        <ion-item>
          <h2>Fixture</h2>
        </ion-item>
        ...
    </ion-list>
  </div>

Primera-A ts

import { Component } from ‘@angular/core’;
import { IonicPage, NavController, NavParams, MenuController } from ‘ionic-angular’;
import { EquiposPage } from ‘…/equipos/equipos’;

@IonicPage()
@Component({
selector: ‘page-primera-a’,
templateUrl: ‘primera-a.html’,
})
export class PrimeraAPage {

equiposPA:any [] = [
{
nombre:“Complejo Deportivo”,
localidad:“Justiniano Posse”,
imagen:“assets/imgs/complejo.png”
},
{
nombre:“San Martin”,
localidad:“Monte Buey”,
imagen:“assets/imgs/sanmartin.png”
},
{
nombre:“Defensores de Juventud”,
localidad:“Justiniano Posse”,
imagen:“assets/imgs/defensores.png”
},
{
nombre:“Matienzo”,
localidad:“Monte Buey”,
imagen:“assets/imgs/matienzo.png”
}
];

constructor(public navCtrl: NavController, public navParams: NavParams, private menuCtrl: MenuController) {

}

ionViewDidLoad() {
console.log(‘ionViewDidLoad PrimeraAPage’);
}

mostrarMenuLateral()
{
this.menuCtrl.toggle();
}
abrirEquipo(equipo)
{
this.navCtrl.push(EquiposPage, { equipo: equipo });
}
}

Equipo html

Equipos

{{item.nombre}}

Equipo ts

import { Component } from ‘@angular/core’;
import { IonicPage, NavController, NavParams } from ‘ionic-angular’;

@IonicPage()
@Component({
selector: ‘page-equipos’,
templateUrl: ‘equipos.html’,
})
export class EquiposPage {

item;
constructor(public navCtrl: NavController, public navParams: NavParams) {

this.item = navParams.data.equipo;

}

ionViewDidLoad() {
console.log(‘ionViewDidLoad EquiposPage’);
}

}

Desde ya muchas gracias y espero puedan ayudarme!

Saludos

Posts: 1

Participants: 1

Read full topic

Places API not working with ionic framework

$
0
0

@NoahTanenholtz1 wrote:

I need the Google Places API to work with my code so that I can use a name of a place and search for all locations near the current location of the phone. I have found that the markers are working correctly but I don’t think the api is being accessed correctly or called correctly from the code I found from Google documentation. I know that the callback function is not being called because a marker is not being created but has been created before the function call if I move and paste the marker code before the function. Here is my code, I will post more if I need to, but I don’t know why the API is not working. I have the script with I believe is the correct API key in my index.html file. I am using McDonalds to test the keyword query search.

map.ts:

import { Component, ViewChild, ElementRef } from '@angular/core';
import { NavController, Platform, Navbar } from 'ionic-angular';
import { GoogleMaps, GoogleMapsEvent,
    GoogleMapOptions,
    MarkerOptions,
    Marker,
    LocationService,
    MyLocation,
    MyLocationOptions,
    CameraPosition, LatLng } from '@ionic-native/google-maps';
//import { googlemaps } from "googlemaps";
declare var google;
@Component({
  selector: 'page-map',
  templateUrl: 'map.html',
})
export class OfficeLocatorPage {
  @ViewChild(Navbar) navBar: Navbar;
  map: any;
  latLng:any;
  mapOptions:any;
  infowindow: any;
  isEnabled: boolean = false;
  service: any;

  constructor(private navCtrl: NavController, private platform: Platform) {}

  ionViewDidLoad() {
    this.navBar.backButtonClick = (e:UIEvent)=>{
      this.navCtrl.pop({animate: true, animation: "transition", direction: "left", duration: 300});
    };
 }
  ionViewDidEnter() {
    this.platform.ready().then(() => {
      this.loadMap();
    });
  }

  locationClick() {
    LocationService.getMyLocation().then((myLocation: MyLocation) => {
      this.map.animateCamera({
        target: myLocation.latLng,
        duration: 1000
      });
  });
}

  compassClick() {
        this.map.animateCamera({
            target: this.map.getCameraTarget(),
            tilt: 0,
            bearing: 0,
            duration: 1000
          });
  }

  trafficClick() {
    this.isEnabled = !this.isEnabled;
    this.map.setTrafficEnabled(this.isEnabled);
    document.getElementById("traffic-button").style.color = "blue";
  }
  loadMap() {
    LocationService.getMyLocation().then((myLocation: MyLocation) => {
    let mapOptions: GoogleMapOptions = {
      camera: {
         target: myLocation.latLng,
         zoom: 10,
         tilt: 0
       },
         controls: {
           compass: false,
           myLocationButton: false,
           myLocation: true,   // (blue dot)
           zoom: false,
           indoorPicker: true,
           mapToolbar: true     // android only
         },
         preferences: {
           zoom: {
             minZoom: 10,
             maxZoom: 18
           }
         },
         building: true,
       };

    this.map = GoogleMaps.create('map', mapOptions);
    var request = {
      query: 'McDonalds',
      fields: ['photos', 'formatted_address', 'name', 'rating', 'opening_hours', 'geometry'],
    };
    this.service = new google.maps.places.PlacesService(this.map);
    this.service.findPlaceFromQuery(request, callback);
    function callback(results, status) {
      if (status == google.maps.places.PlacesServiceStatus.OK) {
        for (var i = 0; i < results.length; i++) {
          var placeLoc = results[i].geometry.location;
            this.map.addMarkerSync({
              position: placeLoc.geometry.location,
              title: "McDonalds",
              animation: 'DROP',
              icon: 'red'
            });
        }
      }
    }
  });
}
}

Posts: 1

Participants: 1

Read full topic

Swipe back in a navigation inside a modal not working

$
0
0

@Derekbaker wrote:

I have a modal with its own navigation (it guides the user through a lot of views/steps), but when I try to swipe back (using iOS, as the native behavior should be) it does not go back to the previous page. The other views (from the app, not the modal or its sub pages) are working fine when swiping back. I already tried adding swipeBackEnabled=“true” to the ion-nav html component but it doesn’t work either. Any ideas?

Posts: 1

Participants: 1

Read full topic

Ionic native geolocation vs html 5 Navigator.gelocation

$
0
0

@ansarikhurshid786 wrote:

Hi
First this is not an issue.

I am showing current location of user in map.
Sometime I used geolocation plugin and sometime hmtl 5 navigator.geoloation.

I think recommend way is ionic native geolocation plugin.

can someone tell me which one best way and what is the different.

Posts: 1

Participants: 1

Read full topic

Viewing all 71046 articles
Browse latest View live


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