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

Problem with routing in Ionic 4


Ionic select box how to detect value is changed?

$
0
0

@pdj wrote:

I want to have classic style of select box so I use

<select class="box" name="al">
            <option value="all">all</option>
            <option value="a">A</option>
            <option value="b">B</option>
        </select>

but in this case…how can I detect value is selected?
I don’t think I can use jquery…

I still don’t understand why ion-select is too much different than classic select box…
I don’t want to select any value from popup when I use selectbox.

Posts: 1

Participants: 1

Read full topic

List devices in webrtc

$
0
0

@CSantos8 wrote:

I’m listing the devices of my phone in a ionic 4 app using Angular7 and cordova. Calling navigator.mediaDevices.enumerateDevices() I got all audioinput and videoinput but the labels are empty. I know I have to call to this method when the audio and video permissions are granted and I do that.

Connecting to a webrtc sample through Android browser works but through Android WebView not.

Why the labels are empty? How can i list all devices of my android phone?
Thanks

Posts: 1

Participants: 1

Read full topic

Generate 64bit apk for ionic 1 project

$
0
0

@JimboJ wrote:

Hi all :wave: I’m picking up an old Ionic 1 project from a couple of years ago. To keep our app in the Google play store I need to somehow generate a 64 bit APK. I’m a little lost on how to do that - I’ve not touched ionic for the last 2 years and a hell of a lot has changed.

I’ve got a couple of questions,

  1. is crosswalk still needed? It looks like that plugin (or atleast the version of cross walk I have installed includes some .so files which will apperently prevent a 64 bit version?
  2. I don’t seem to be able to reinstall all my plugins. I’ve tried ionic state reset but apparently that’s been removed in CLI 3. I’ve tried ionic cordova prepare but I get Error: Your MyApplication platform does not have Api.js
  3. What CLI version should I be running to build an old ionic 1 app, bearing in mind I need to generate a 64 bit APK.

If anyone could help or point me in the right direction that would be awesome.

ionic info gives me:

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

    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:

    cordova (Cordova CLI) : 7.0.1

local packages:

    Cordova Platforms : android 5.1.1 ios 3.9.2
    Ionic Framework   : ionic1 1.1.1

System:

    ios-deploy : 1.9.1
    ios-sim    : 5.0.13
    Node       : v8.11.3
    npm        : 5.6.0
    OS         : macOS High Sierra
    Xcode      : Xcode 10.0 Build version 10A255

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : legacy

Thanks in advance :raised_hands:

Posts: 1

Participants: 1

Read full topic

Should i use font in EM or PX with ionic

$
0
0

@EnzoDLP wrote:

Hello,

I am currently developing an application with Ionic. I use for this, a model of the application to do the same, with colors, fonts (in px), image, etc …

My question is, should I use the EM or PX unit for the font ?

I ask myself this question because for me the unit EM is supposed to be more adapted to all types of screen. However, the fonts transmitted with the models are in PX and therefore more complicated to make a model identical with the EM unit.

I would just like to know if the EM unit is really useful or not, using Ionic. :slight_smile:

Thanks for your help

Posts: 1

Participants: 1

Read full topic

A problem occurred evaluating project ':CordovaLib'. No installed build tools found. Install the Android build tools version 19.1.0 or higher

$
0
0

@lobaton wrote:

I have a problem when building my ionic app, do not find build tools but in sdk manager I have installed several versions of this, someone knows how I can fix it?

already try to do it with different points proposed as a solution but it does not work–

A problem occurred evaluating project ‘:CordovaLib’.

No installed build tools found. Install the Android build tools version 19.1.0 or higher

Blockquote

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.8
Cordova Platforms  : android 7.0.0
Ionic Framework    : ionic-angular 3.9.2

System:

Node  : v8.15.0
npm   : 6.4.1
OS    : macOS
Xcode : Xcode 10.2.1 Build version 10E1001

Environment Variables:
ANDROID_HOME : not set

Misc:

backend : pro

Blockquote

cordova requirements
Android Studio project detected

Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: not installed
android: Command failed with exit code ENOENT
Gradle: installed /usr/local/Cellar/gradle/5.4.1/bin/gradle
(node:1022) UnhandledPromiseRejectionWarning: CordovaError: Some of requirements check failed

Posts: 1

Participants: 1

Read full topic

Injecting stuff not working [object object] errors

$
0
0

@droggam wrote:

Hello I am pretty new to Ionic 4 I guess but whatever I try to inject nav controller or an external service
in the component constructor, I get an error about object in the console…
I have an ionic module in the app module of that component what am I missing here?

Posts: 1

Participants: 1

Read full topic

Can I build Ionic 3 projects with CLI 5.2.1?

$
0
0

@jason314 wrote:

I have an Ionic v3 project - ionic-angular 3.9.6 . I build it with CLI 4.1.1.

If I upgrade the CLI to the latest 5.2.1, will I still be able to build my Ionic 3 project?

I ask because I’m starting to port my Ionic 3 project to Ionic 4 and need to be able to build both the legacy Ionic 3 project and the new Ionic 4 project.

Thanks
Jason

Posts: 1

Participants: 1

Read full topic


What is the minimum supported version of the iOS version with Ionic v3

$
0
0

@pjaiswal wrote:

Hi Team,

I have an iOS App in Production, build using ionic v3.
I need your help with the following questions:

  1. What is the minimum supported version of the iOS version with Ionic v3?
  2. Will ionic v3 be compatible with iOS 13 and above?
  3. What is your recommendation on Production App running on Ionic v3 with the upcoming iOS updates?

We are using the following configuration:
Ionic version: 3
Angular: 5.2.11
Cordova-iOS: 4.5.5
ionic-native/core: 4.20.0

and including other native packages.
Please let me know if more information is needed for my current configuration.

Thanks,
Pratik

Posts: 1

Participants: 1

Read full topic

PayPal Payment INR not working

$
0
0

@salomon022 wrote:

new PayPalPayment('1000', 'USD', 'Description', 'sale');

but

new PayPalPayment('1000', 'INR', 'Description', 'sale');

not working

Posts: 1

Participants: 1

Read full topic

Error in Ionic 4 + dynamic forms

$
0
0

@lxh37 wrote:

Hi, I got dynamic form working in an old project (probably some setting there) which can make it work, somehow when I tried to create a new project and tried to implement dynamic form only, I got this error message:

ERROR Error: Uncaught (in promise): Error: No template specified for component HomePage
Error: No template specified for component HomePage
at syntaxError (compiler.js:2430)
at DirectiveNormalizer.push…/node_modules/@angular/compiler/fesm5/compiler.js.DirectiveNormalizer.normalizeTemplate (compiler.js:16194)
at CompileMetadataResolver.push…/node_modules/@angular/compiler/fesm5/compiler.js.CompileMetadataResolver.loadDirectiveMetadata (compiler.js:18392)
at compiler.js:26036
at Array.forEach ()
at compiler.js:26035
at Array.forEach ()
at JitCompiler.push…/node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._loadModules (compiler.js:26032)
at JitCompiler.push…/node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler._compileModuleAndComponents (compiler.js:26010)
at JitCompiler.push…/node_modules/@angular/compiler/fesm5/compiler.js.JitCompiler.compileModuleAsync (compiler.js:25970)
at resolvePromise (zone.js:831)
at resolvePromise (zone.js:788)
at zone.js:892
at ZoneDelegate.push…/node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:423)

I even copied the exact same code to new project, still no luck, probably
I need to change some setting or import package? I actually just try the
example in this link:
https://angular.io/guide/dynamic-form

My home.page.ts:


import { Component } from ‘@angular/core’;

@Component({
selector: ‘app-home’,
//templateUrl: ‘home.page.html’,
styleUrls: [‘home.page.scss’],
})
export class HomePage {

constructor() {}

}

home.module.ts:


import { NgModule } from ‘@angular/core’;
import { CommonModule } from ‘@angular/common’;
import { IonicModule } from ‘@ionic/angular’;
import { FormsModule } from ‘@angular/forms’;
import { RouterModule } from ‘@angular/router’;

import { HomePage } from ‘./home.page’;

@NgModule({
imports: [
CommonModule,
FormsModule,
IonicModule,
RouterModule.forChild([
{
path: ‘’,
component: HomePage
}
])
],
declarations: [HomePage]
})
export class HomePageModule {}

app.component.ts:


import { Component } from ‘@angular/core’;

import { Platform } from ‘@ionic/angular’;
import { SplashScreen } from ‘@ionic-native/splash-screen/ngx’;
import { StatusBar } from ‘@ionic-native/status-bar/ngx’;
import { QuestionService } from ‘./question.service’;

@Component({
selector: ‘app-root’,
templateUrl: ‘app.component.html’
})
export class AppComponent {
questions: any;

constructor(
private platform: Platform,
private splashScreen: SplashScreen,
private statusBar: StatusBar,
private questionService: QuestionService
) {
this.initializeApp();
this.questions = this.questionService.getQuestions();
}

initializeApp() {
this.platform.ready().then(() => {
this.statusBar.styleDefault();
this.splashScreen.hide();
});
}
}

Any suggestion is greatly appreciated!

Posts: 1

Participants: 1

Read full topic

Ionic 4 - how to make ionic redirect to market if no provider for intent

$
0
0

@KsspAm43 wrote:

I’m using Whatsapp url scheme for send message to particular contact.

href=“whatsapp://send?text=Hello%20World!&phone=+91XXXXXXXXXX&abid=1234573031”

it’s working. but if mobile does not have whatsapp, it’s not showing any error. Also make redirect to playstore to install whatsapp. But how?

Posts: 1

Participants: 1

Read full topic

Why I won't create apk please help me

$
0
0

@sabankayis wrote:

Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.

Configure project :CordovaLib

FAILURE: Build failed with an exception.

  • Where:
    Build file ‘C:\Ionic\myApp\platforms\android\CordovaLib\build.gradle’ line: 41

  • What went wrong:
    A problem occurred evaluating project ‘:CordovaLib’.

Failed to apply plugin [id ‘com.github.dcendents.android-maven’]
Configuration with name ‘testImplementation’ not found.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BU�LD FAILED in 40s
C:\Ionic\myApp\platforms\android\gradlew: Command failed with exit code 1 Error output:
Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.

FAILURE: Build failed with an exception.

  • Where:
    Build file ‘C:\Ionic\myApp\platforms\android\CordovaLib\build.gradle’ line: 41

  • What went wrong:
    A problem occurred evaluating project ‘:CordovaLib’.

Failed to apply plugin [id ‘com.github.dcendents.android-maven’]
Configuration with name ‘testImplementation’ not found.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BU�LD FAILED in 40s

Posts: 1

Participants: 1

Read full topic

How to automatically read data from firebase Cloudfirestore if there is change in data

$
0
0

@shiva11629 wrote:

Good morning everyone I want to make Bus tracker app so I am sending driver latitude and longitude to cloud firestore here I am using. Watchpistion() method to automatically update database when there is change in driver location. Now my question is that whenever user views driver location I need to get updated values from cloud firestore.

Is there any method to automatically read data when there is change in data?

Posts: 1

Participants: 1

Read full topic

How to change ionic 4 checkbox icon?

$
0
0

@DarkKnight5c4 wrote:

Hello Everyone.
I am trying to change the checkbox checked icon from tick mark to square box. In earlier versions i made it with css changes. In ionic 4 i was not able to do that because of the shadow DOM. And there is no override css properties to change the icon in the ionic documentation. Is it possible to change the checkbox icon in ionic4??
Thanks in advance.

Posts: 1

Participants: 1

Read full topic


Ionic 4 WordPress REST User Authenticate Stuck

$
0
0

@calvinseng wrote:

Hi all, I am trying to authenticate through WP REST and a developer’s bootstrap framework. Attached is the code and whenever I try to login it will stuck at “Loading Please Wait”. Any idea? Thanks in advance.

login.ts

import { Component,OnInit,ViewEncapsulation } from '@angular/core';
import { NavController, ModalController, AlertController, LoadingController } from '@ionic/angular';
import { UserService } from '../../providers/user-service';
import { WoocommerceService } from '../../providers/woocommerce-service';
import { SowService } from '../../providers/sow-service';
import { AppConfig } from '../../app-config';
import { Storage } from '@ionic/storage';
import * as CryptoJS from 'crypto-js';
import { TranslateService } from '@ngx-translate/core';
import {RegisterPage} from '../register/register';
/*
  Generated class for the Login page.

  See http://ionicframework.com/docs/v2/components/#navigation for more info on
  Ionic pages and navigation.
*/
@Component({
  selector: 'app-page-login',
  templateUrl: 'login.html',
  styleUrls: ['login.scss'],
  encapsulation: ViewEncapsulation.None
})
export class LoginPage {
  userName: string;
  password: string;
  email: string;
  errorModal: any;
  constructor(public navCtrl: NavController, public userService: UserService, public wooService: WoocommerceService,
    public appConfig: AppConfig, public alertCtrl: AlertController, public loadingCtrl: LoadingController, public sowService: SowService, public storage: Storage
    , public translateService: TranslateService,public modalCtrl:ModalController) {

  }

  doRegister() {
    this.navCtrl.navigateForward('register');
    this.modalCtrl.dismiss();
  }

   doLogin() {
    this.translateService.get(['Notice', 'Loading', 'NetWork_Error', 'OK', 'Sign_In_Failed', 'Sign_In_No_Email', 'Sign_In_Email_Error', 'No_Email_Or_Password']).
    subscribe(async value => {
      var loadingModal = await this.loadingCtrl.create({
        message: value['Loading']
      });
      if (this.appConfig.Enable_Login_With_Password) {
        if (this.email == null || this.password == null || this.email.trim().length == 0 || this.password.trim().length < 6) {
          var alert=await this.alertCtrl.create({
            header: value['Notice'],
            message: value['No_Email_Or_Password'],
            buttons: [value['OK']]
          });
          alert.present();
          return;
        }

        loadingModal.present();

        var password = this.password;
        if (this.appConfig.App_Secret != '') {
          var key = CryptoJS.enc.Utf8.parse(CryptoJS.MD5(this.appConfig.App_Secret).toString());
          var iv = CryptoJS.enc.Utf8.parse(CryptoJS.MD5(this.appConfig.App_Secret).toString().substr(0, 16));
          password = CryptoJS.AES.encrypt(password, key, { iv: iv }).toString();
        }

        this.sowService.login({ email: this.email, password: encodeURIComponent(password) }).then(async (data: any) => {
          if (data && data != 'error') {
            this.userService.id = data.id;
            this.userService.email = data.email;
            this.userService.first_name = data.first_name;
            this.userService.last_name = data.last_name;
            this.userService.name = data.first_name + data.last_name;
            this.userService.username = data.username;
            this.userService.isAuthenticated = true;

            await this.storage.set('oddwolves-user-info', data);
            loadingModal.dismiss();
            this.modalCtrl.dismiss();

          } else {
            loadingModal.dismiss();
            var alert=await this.alertCtrl.create({
                 header: value['Notice'],
                 message: value['Sign_In_Failed'],
                 buttons: [value['OK']]
             });
            alert.present();

          }
        }, (reson) => {

         loadingModal.dismiss();
        });
      }
      else {
        if (this.email == null || this.email.trim().length == 0) {
          var alert=await this.alertCtrl.create({
            header: value['Notice'],
            message: value['Sign_In_No_Email'],
            buttons: [value['OK']]
          });
          alert.present();
          return;
        }
        loadingModal.present();
        this.wooService.getCustomerByEmail({ email: this.email }).then(async (data: Array<any>) => {
          if (data.length > 0 && data[0] && data[0].id > 0) {
            this.userService.id = data[0].id;
            this.userService.email = data[0].email;
            this.userService.first_name = data[0].first_name;
            this.userService.last_name = data[0].last_name;
            this.userService.name = data[0].first_name + data[0].last_name;
            this.userService.username = data[0].username;
            this.userService.isAuthenticated = true;

             loadingModal.dismiss();
             this.modalCtrl.dismiss();

          } else {
            loadingModal.dismiss();
            var alert=await this.alertCtrl.create({
              header: value['Notice'],
              message: value['Sign_In_Email_Error'],
              buttons: [value['OK']]
            });
            alert.present();
          }
        }, (reson) => {
          loadingModal.dismiss();
        });
      }
    });


  }

  doClose() {
    this.modalCtrl.dismiss();
  }
}

user-service.ts

import { Injectable } from '@angular/core';
// import 'rxjs/add/operator/map';
import { Storage } from '@ionic/storage';
import { AppConfig } from '../app-config';

/*
  Generated class for the UserService provider.

  See https://angular.io/docs/ts/latest/guide/dependency-injection.html
  for more info on providers and Angular 2 DI.
*/
@Injectable({
  providedIn: 'root',
})
export class UserService {
  LOCAL_TOKEN_KEY = 'IonWooShop';
  id = '';
  username = '';
  birthday = '';
  email = '';
  name = '';
  first_name = '';
  last_name = '';
  isAuthenticated = false;
  authToken = '';
  cachedData: any;
  constructor(public storage: Storage, public appConfig: AppConfig) {
    this.LOCAL_TOKEN_KEY = appConfig.Shop_Name;
  }

  loadUserCredentials() {
    this.storage.get(this.LOCAL_TOKEN_KEY).then(user => {
      if (user) {
        this.useCredentials(JSON.parse(user));
      }
    });
  }

  useCredentials(user) {
    this.id = user.id;
    this.username = user.username;
    this.birthday = user.birthday;
    this.email = user.email;
    this.name = user.firstname + ' ' + user.lastname;
    this.first_name = user.firstname ;
    this.last_name = user.lastname;
    this.isAuthenticated = true;
    this.authToken = JSON.stringify(user);
  }

  destroyUserCredentials() {
    this.authToken = undefined;
    this.id = '';
    this.username = '';
    this.birthday = '';
    this.email = '';
    this.name = '';
    this.first_name = '';
    this.last_name = '';
    this.isAuthenticated = false;
    this.storage.remove(this.LOCAL_TOKEN_KEY);
  }
}

Posts: 1

Participants: 1

Read full topic

Unique data from JSON responce

$
0
0

@Harikag wrote:

[{“msgFrom”:“XXXXXX”,“msgTo”:“YYYYYYY”,“msg”:“Something”,“room”:“Good Morning”,“seen”:“0”,“createdOn”:“2019-07-03T15:29:47.615Z”,"__v":0},{“msgFrom”:“subbareddya@sathguru.com”,“msgTo”:“ashokm@sathguru.com”,“msg”:“Accepted 1000”,“room”:“HRMS”,“seen”:“0”,“createdOn”:“2019-07-02T11:23:00.766Z”,"__v":0},{msgFrom":“AAAAAAA”,“msgTo”:“BBBBBBB”,“msg”:“Meeting is scheduled “,“room”:“Good AfterNoon”,“seen”:“0”,“createdOn”:“2019-07-02T11:15:49.484Z”,”__v”:0},
{“msgFrom”:“CCCCCC”,“msgTo”:“YYYYYYY”,“msg”:“Something”,“room”:“Good Morning”,“seen”:“0”,“createdOn”:“2019-07-03T15:29:47.615Z”,"__v":0},{“msgFrom”:“subbareddya@sathguru.com”,“msgTo”:“ashokm@sathguru.com”,“msg”:“Accepted 1000”,“room”:“HRMS”,“seen”:“0”,“createdOn”:“2019-07-02T11:23:00.766Z”,"__v":0},{msgFrom":“AAAAAAA”,“msgTo”:“DDDDDDD”,“msg”:“Meeting is scheduled “,“room”:“Good AfterNoon”,“seen”:“0”,“createdOn”:“2019-07-02T11:15:49.484Z”,”__v”:0},
{“msgFrom”:“YYYYYY”,“msgTo”:“AAAAAAA”,“msg”:“Something”,“room”:“Good Morning”,“seen”:“0”,“createdOn”:“2019-07-03T15:29:47.615Z”,"__v":0},{“msgFrom”:“subbareddya@sathguru.com”,“msgTo”:“ashokm@sathguru.com”,“msg”:“Accepted 1000”,“room”:“HRMS”,“seen”:“0”,“createdOn”:“2019-07-02T11:23:00.766Z”,"__v":0},{msgFrom":“BBBBBBB”,“msgTo”:“XXXXXXXX”,“msg”:“Meeting is scheduled “,“room”:“Good AfterNoon”,“seen”:“0”,“createdOn”:“2019-07-02T11:15:49.484Z”,”__v”:0}
]

From above responce, I need only “msgFrom” and “msgTo” data that also unique data should get, so please help me out. Thank You.

Posts: 1

Participants: 1

Read full topic

How to search using @ and # tags in input?

$
0
0

@gokujy wrote:

Hello, I am making a post similar to a Facebook post, when I post data in the post when I type “@” to search data that return users names and if I type “#” first to call API and return available tags in ionic 4.

Here what I have done:

page.html

      <ion-item>
        <ion-textarea rows="3" (ionInput)="searchPeople($event)" cols="20" formControlName="comment"
          placeholder="Tweet your reply" spellcheck="true" autoComplete="true" autocorrect="true" autofocus required>
        </ion-textarea>
      </ion-item>

page.ts

searchPeople(ev: any) {
    // set val to the value of the searchbar
    let val = ev.target.value;
    let firstchar = val.charAt(0);

    if (firstchar = "@") {
      console.log("search people");
    }
    else if (firstchar = "#") {
      console.log("hash tag");
    } else {
      console.log("error");
    }
  }

I did like this but it’s not working…

Posts: 1

Participants: 1

Read full topic

StackBlitz/Plunker/CodePen template for Ionic 4.5.0 + Angular

$
0
0

@nunoarruda wrote:

Does anyone have a StackBlitz/Plunker/CodePen template for Ionic 4.5.0 + Angular? I’m having a hard time trying to find one.

Posts: 1

Participants: 1

Read full topic

Readdir() of /Data not working?

$
0
0

@VictorNorman wrote:

I am trying to get a list of all files in the FilesystemDirectory.Data filesystem. Here is my code:

export const removeAllDataFiles = () => {
  return Filesystem.readdir({
    path: '',
    directory: FilesystemDirectory.Data,
  });
};

I get an error back: Error: Uncaught (in promise): Error: Folder does not exist.

If I set path to '/' or '.' I still get the same error.

Is there any way to read all files in the Data directory?

Posts: 1

Participants: 1

Read full topic

Viewing all 70434 articles
Browse latest View live


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