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

How can I put custom component inside the alert dialog?

$
0
0

@priniqkelvin wrote:

I’m using the angularx-qrcode library to generate the qr-code. I would like to display the qr-code inside the alert dialog box.

The following code just show a dialog with the button, but the content is empty and not render.

this.alertController.create({
    message: `<div class="qrcode-popup-wrapper">
            <qrcode [qrdata]="'${model.voucherNo}'" [size]="256" [level]="'M'"></qrcode>
        </div>`,
    buttons: ['CLOSE']
});

Any idea how to make this work?

Posts: 1

Participants: 1

Read full topic


App publish Issues

$
0
0

@devsid wrote:

Hi, I am using firebase messaging in my Ionic 3 application, when publishing the app on Google play, If someone downloads the app from Google play, Firebase messaging is not working without giving any error. Please help

Posts: 3

Participants: 2

Read full topic

IONIC V4 - How change animated loadingcontroller?

Ionic 4 - Read image files from Firebase and display them

$
0
0

@Ionic_Newb wrote:

HI ,
I’m looking to read image files from Firebase and display them as a list on my ionic 4 app. Can anyone point me in the direction of a good example of tutorial.

Thanks

Posts: 1

Participants: 1

Read full topic

Issue on google play detection of the app for huawei mate 10

$
0
0

@mahmoudfathy0 wrote:

hi guys ,
we have a weird issue in our ionic 3 mobile app , the issue is that we have two apps on google play one for mobile , and the other for tablet , to allow the app store differentiate , in mobile we set the below property in android manifest

    <supports-screens  android:anyDensity="true" android:largeScreens="false" android:normalScreens="true" android:resizeable="true" android:smallScreens="true" android:xlargeScreens="false" />

and in the tablet app we use the below property

<compatible-screens> <screen android:screenSize="large" android:screenDensity="ldpi" /> <screen android:screenSize="large" android:screenDensity="mdpi" /> 
<screen android:screenSize="large" android:screenDensity="hdpi" /> screen android:screenSize="large" android:screenDensity="xhdpi" /> <screen android:screenSize="xlarge" android:screenDensity="ldpi" />  <screen android:screenSize="xlarge" android:screenDensity="mdpi" /> <screen android:screenSize="xlarge" android:screenDensity="hdpi" /> <screen android:screenSize="xlarge" android:screenDensity="xhdpi" /></compatible-screens>

everything is working as supposed except for huawei mate 10 devices , the google play detect them as tablets not mobiles , so the user can download only the app for tablet , any help guys
thanks in advance

Posts: 1

Participants: 1

Read full topic

How to send TLV command through BLE in ionic app

$
0
0

@Yruama wrote:

I’m working on an app who communicate with a raspberry through BLE (https://ionicframework.com/docs/native/ble/). I want to send a command to the Raspberry and get the result. The only constraint is to send command with the TLV (Tag-Length-Value) format : - Tag: command identifier - Length: commande data length (0 to 18) - Value: command data

I have no idea how to do this.

Atm i have some code.

First i search all devices arround me :

this.ble.scan([], 5).subscribe(
  device => this.onDeviceDiscovered(device), 
  error => this.scanError(error)
);

Then i get infos from this device :

this.ble.connect(device.id).subscribe(
  peripheral => this.onConnected(peripheral),
  peripheral => this.onDeviceDisconnected(peripheral)
);

And … what now ? I’m trying to use this function : ble.write(device_id, service_uuid, characteristic_uuid, data, success, failure);

I get device_id, service_uuid, characteristics_uuid. But i don’t know how to pass data.

I’m trying something like that :

SendCommand() {
  let data: {
    RANDOM: 1,
    Lenght: 1,
    Value: 1
  };

  let binary_string = btoa(JSON.stringify(data));
  let len = binary_string.length;
  let aBuff = new Uint8Array(len);
  for (let i = 0; i < len; i++)
    aBuff[i] = binary_string.charCodeAt(i);

  this.ble.write(this.peripheral.id, this.peripheral.services, this.peripheral.characteristic, aBuff.buffer)
    .then(res => {
      console.log("OK");
      console.log(res)
    })
    .catch(err => {
      console.log("KO");
      console.log(err)
    });
}

But nothing happen.

Thanks for your help :smiley:

Posts: 1

Participants: 1

Read full topic

Style custom components and their slotted elements

$
0
0

@JerryBels wrote:

I’m migrating my app from Ionic V3 to V4. Almost done, except… I’m having a hard time with styling. For example, I migrated my html to something like this, using slots :

  <ion-list>
	<ion-item class="list-item" *ngFor="let a of v">
	  <ion-avatar slot="start">
	    <img class="mainImg" [src]="a.image ? a.image : globals.userImage">
	    <img class="candle" [src]="'assets/imgs/home/candle.png'">
	  </ion-avatar>
	  <h3 class="item-title">{{a.first_name}} {{a.last_name}}</h3>
	  <p class="item-description">
	    In X days
	    <span>
	      {{a.day}} {{a.monthName}}
	    </span>
	  </p>
	  <div class="badgeHolder" (click)="gotoSpecialPage()"><ion-badge slot="end">special page</ion-badge></div>
	  <span slot="end" class="iconHolder" (click)="gotoNormalPage()"><ion-icon name="arrow-dropright"></ion-icon></span>
	</ion-item>
  </ion-list>

The CSS I had for it, before upgrading :

  ion-list.list {
    margin-bottom: 0;

    div.list-item.item-block {
      background-color: #343B43;
      margin: 0;
      border-bottom: 1px solid #dedede;
      position: relative;

      ion-avatar {
        position: relative;

        img.mainImg {
          width: 60px;
          height: 60px;
        }

        img.candle {
          position: absolute;
          right: 0;
          bottom: 0;
          width: 20%;
          height: auto;
          border-radius: initial;
        }
      }

      div.item-inner {
        border: 0;
        margin: 0;

        h3 {
          color: white;
          font-weight: 600;
          text-transform: uppercase;
        }

        p.item-description {
          color: white;
          font-size: 13px;

          span {
            font-size: 12px;
            color: #9D9992;
          }
        }

        div.badgeHolder {
          text-align: right;
          margin-right: 28px;

          ion-badge {
            background-color: #907027;
            padding: 7px 10px;
            border-radius: 12px;
            font-size: 11px;
            font-weight: 300;
            letter-spacing: 1px;
          }
        }

        span.iconHolder {
          background-color: #2B3036;
          position: absolute;
          right: 0;
          top: 0;
          height: 100%;
          display: flex;
          align-items: center;
          justify-content: center;
          padding: 13px;
          color: #907027;
          font-size: 36px;
        }
      }
    }
  }

So, of course some changes are no-brainers, like div.list-item.item-block simply becoming ion-item or background-color: #343B43; being able to be converted to --background thanks to css4 variables. But there are a lot of things I don’t find a way to migrate easily… Also, I would really like to bypass the headache to have and rethink each and every line of our css code according to css4 variables available in Ionic doc - it has been written by different people and it would take me too much time.

For the previous example, here is how the shadow dom looks like :

<div class="item-native">
  <slot name="start"></slot>
  <div class="item-inner">
    <div class="input-wrapper" style="">
      <slot style="">
        <!--h3, p, div are here-->
      </slot>
    </div>
    <slot name="end"></slot>
    <div class="item-inner-highlight"></div>
  </div>
</div>

And because the item-inner is displayed in horizontal flex, my h3, p, div appears one after the other - which is not what is intended, of course…

So, do I have a simple solution to apply my styles to slotted elements inside ionic components’ shadow dom?

Posts: 1

Participants: 1

Read full topic

Determining ModalController display mode?

$
0
0

@jchuah wrote:

Is there a way to determine whether or not the ModalController is going to display as a full size page navigate vs. a modal? Checking to see if ‘tablet’ is in the platform list isn’t cutting the mustard for me. Some tablets are large enough to display a modal as a modal while others display it as a full screen page navigate.

This is especially problematic for tablet users of my Ionic app that, from a UX perspective, want to click on the back button of their browsers when viewing it through a web browser. If I can predict ahead of time the ModalController behavior I can appropriately choose to use Angular UI Router.

Posts: 1

Participants: 1

Read full topic


Ionic 4 : Side bar not working for android 4.4.2

$
0
0

@jkasun wrote:

New ionic menu bar is not working from android 4.4.3, the screen gets darker and unresponsive when toggle menu button is clicked. When tested with android 7.0 it works.

Posts: 1

Participants: 1

Read full topic

How to make a good framework

Ionic v4 : Icons not showing since update

$
0
0

@maxg86 wrote:

Hello,

I’m upgrading today from a v4beta15 to v4.0.0 using ionic and angular to build a PWA and my ion icons disappeared, leading to 404 request to http://localhost:8100/svg/md-calendar.svg for example no major change has been made except for the version upgrade

Here is my package.json

{
  "name": "app-name",
  "version": "0.0.0",
  "private": true,
  "repository": "",
  "dependencies": {
    "@angular/common": "7.2.1",
    "@angular/compiler": "7.2.1",
    "@angular/core": "7.2.1",
    "@angular/forms": "7.2.1",
    "@angular/http": "7.2.1",
    "@angular/platform-browser": "7.2.1",
    "@angular/platform-browser-dynamic": "7.2.1",
    "@angular/router": "7.2.1",
    "@auth0/angular-jwt": "^2.1.0",
    "@ionic-native/core": "5.0.0-beta.14",
    "@ionic-native/splash-screen": "5.0.0-beta.14",
    "@ionic-native/status-bar": "5.0.0-beta.14",
    "@ionic/angular": "4.0.0",
    "class-transformer": "^0.2.0",
    "cordova-android": "^6.4.0",
    "cordova-plugin-ionic-webview": "^2.2.0",
    "core-js": "2.5.7",
    "d3-array": "^2.0.2",
    "d3-axis": "^1.0.12",
    "d3-collection": "^1.0.7",
    "d3-scale": "^2.1.2",
    "d3-selection": "^1.3.2",
    "d3-shape": "^1.2.2",
    "d3-time": "^1.0.10",
    "d3-time-format": "^2.1.3",
    "error-stack-parser": "^2.0.2",
    "jsonwebtoken": "^8.4.0",
    "jwt-decode": "^2.2.0",
    "luxon": "^1.7.1",
    "moment": "^2.22.2",
    "query-string": "^6.2.0",
    "reflect-metadata": "^0.1.12",
    "rxjs": "6.2.2",
    "zone.js": "0.8.26"
  },
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "^0.12.3",
    "@angular-devkit/core": "7.2.1",
    "@angular-devkit/schematics": "7.2.1",
    "@angular/cli": "7.0.2",
    "@angular/compiler-cli": "7.2.1",
    "@angular/language-service": "~7.0.0",
    "@ionic/schematics-angular": "^1.0.7",
    "@types/jasmine": "~2.8.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~10.7.1",
    "codelyzer": "~4.5.0",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~3.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.1",
    "karma-jasmine": "~1.1.2",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.4.0",
    "ts-node": "~7.0.0",
    "tslint": "~5.11.0",
    "typescript": "3.1.6"
  }
}

Thanks in advance,
Max

Posts: 1

Participants: 1

Read full topic

Calibrate gps before location request

$
0
0

@AlexRoca wrote:

Hello everyone! that’s my question, how can i calibrate the device gps before location request?
I’m imagining something like on components.ts force a request at the beginning :thinking:
someone tryed before?
the plugin that im using is this cordova-plugin-gpslocation

any help very apreciated, greetings

global packages:

@ionic/cli-utils : 1.5.0
Cordova CLI      : 8.1.2 (cordova-lib@8.1.1)
Ionic CLI        : 3.5.0

local packages:

@ionic/app-scripts : 1.3.12
Cordova Platforms  : android 7.1.4
Ionic Framework    : ionic-angular 3.5.0

System:

Node       : v6.9.0
OS         : Windows 10
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed
npm        : 3.10.8

Posts: 1

Participants: 1

Read full topic

How to sync my photos with server without without opening app

Getting error in camera ionic 3

Security Alert for cordova-plugin-ionic-webview


Browser HTML is too big

$
0
0

@guidosl wrote:

the HTML (font, paddings, buttons, etc) is too big in platform browser

some way to reduce all this in scale??

thanks!

Posts: 2

Participants: 2

Read full topic

I want to upload image to Django Rest API

$
0
0

@nolwie wrote:

Hi, i want upload image to Django Rest API. I created the “select from gallery” and “take a picture” options. But how can I upload it? Which method is better? Thanks.

Posts: 3

Participants: 3

Read full topic

Cant install openAlpr

$
0
0

@paulocentr wrote:

I’m trying to add the OpenAlpr to my project, but im getting java errors, heres my ionic Info:

cli packages: (C:\Users\paulo\AppData\Roaming\npm\node_modules)

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

global packages:

    cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)

local packages:

    @ionic/app-scripts : 3.1.9
    Cordova Platforms  : android 7.1.4
    Ionic Framework    : ionic-angular 3.9.2

System:

    Node : v8.11.1
    npm  : 6.7.0
    OS   : Windows 10

Environment Variables:

    ANDROID_HOME : not set

Misc:

    backend : pro

If i import using the default package in app.module dont work

import { OpenALPR, OpenALPROptions, OpenALPRResult } from '@ionic-native/openalpr';
i’ve got the following error:

c808e2e8-2b17-4fad-80d4-fcf495e5d65e

but if i add ngx to the end of the import the error goes away but got a compile error

import { OpenALPR, OpenALPROptions, OpenALPRResult } from '@ionic-native/openalpr/ngx';

And the error:
error: package com.openalpr.jni does not exist import com.openalpr.jni.Alpr;

Posts: 1

Participants: 1

Read full topic

Error TS1149

$
0
0

@desarrolloSan wrote:

I do the construction for ios and I get this error:
TS1149 file name error “” differs from already included file name “” only in casing.
Does anyone have a solution for this?

Posts: 1

Participants: 1

Read full topic

Empty page when including css and js from CDN

$
0
0

@surenkonathala wrote:

When i’m including
<script src="https://unpkg.com/@ionic/core@4.0.0/dist/ionic.js" /> in a simple html file, the page loads blank? If i remove the js include line, atleast i can see the output without CSS being applied. I even tried to change from CDN to local, still empty page. Am i missing something??

<html>
 <head>
   <link href="https://unpkg.com/@ionic/core@4.0.0/css/ionic.bundle.css" rel="stylesheet">
   <script src="https://unpkg.com/@ionic/core@4.0.0/dist/ionic.js" />
 </head>
 <body>
   <ion-title>TEST</ion-title>
 </body
</html>

44%20PM 35%20PM

Posts: 1

Participants: 1

Read full topic

Viewing all 48979 articles
Browse latest View live


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