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

Ionic serve - connect to localhost through SSH

$
0
0

@scattana wrote:

Hi all! New to ionic and app development, though I’ve done quite a bit of work with networking and I’m familiar with web dev.

Trying to run a sample Ionic (v3) project which I set up on my Linux remote server (ubuntu distribution). I’m using the command “sudo ionic serve” and it seems to be lauching the development server (says “browser window opened to localhost:8100”), but I can’t connect through my browser (using Chrome on Windows 10).

I’m connecting to my linux server through PuTTY, and I’ve enabled port forwarding to localhost:8100. I’ve also tried several other ports (and specified the “–port=XYZ” option), but still get “could not connect” in my browser.

I’ve used remote port forwarding for other projects before with this same OS and browser (Chrome) without issues, so I’m confused why I can’t connect with this new ionic project, especially when the ionic development server is clearly running. Any help would be greatly appreciated, thank you!

Posts: 1

Participants: 1

Read full topic


Ion-img only showing randomly - component init issue (hopefully easy fix)

$
0
0

@wekas wrote:

I am displaying an image in a modal.
It works fine on web but on an Android device it only intermittently shows the image (otherwise it shows a no image placeholder).
If I get closing and reopening the modal / image by clicking on the thumbnail, about 25% of the time it shows the image ok.

I figure its something to do with the async loading of the base64 image data I am passing in as a parameter. Any ideas to fix this?

<ion-content class="content-modal">
  <div class="content-inner">
      <ion-img [src]="imageDataUrl" (click)="onCloseModal()"></ion-img>
  </div>
</ion-content>
export class ViewImageComponent implements OnInit {
  @Input() imageDataUrl: string;

  constructor(private modalCtrl: ModalController) { }

  ngOnInit() {
  }

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

}

Posts: 1

Participants: 1

Read full topic

Ion-modal called but not showing

$
0
0

@vcjoo wrote:

FitModalPage is my modal-page

import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-fit-modal',
  templateUrl: './fit-modal.page.html',
  styleUrls: ['./fit-modal.page.scss'],
})
export class FitModalPage implements OnInit {

  constructor() { }

  ngOnInit() {
    console.log(`fit modal page`);
  }

}

i saw this log ‘fit modal pge’ in chrome debug console
but, not showing modal popup display !!

add to fit-modal in entryComponents
add to fit-modal in declarations …

perfect ! can not find error !!
why not showing modal page ?

Posts: 1

Participants: 1

Read full topic

Base64 image broken ios

$
0
0

@Oliziplok wrote:

Hi,

I have a probleme with diplaying base64 images.

When I upload an image from the camera in a base64 format i’m able to displays it via ionic devapp but when I build it from Xcode and run it natively on my ios device, the image is shown as a broken image.

Does somebody have an explanation?

Thanks!

Posts: 1

Participants: 1

Read full topic

SMS cordova plugin INTENT is not working

$
0
0

@Zildjian240 wrote:

Hello everyone

I am using Ionic 4 to build an app that is meant to send an emergency SMS, therefore I need it to be sent programatically without entering into the native SMS app.

Im using the following code:

async sendSMS(){
    this.androidPermissions.checkPermission(this.androidPermissions.PERMISSION.SEND_SMS).then(
      result => console.log('Has permission?'+result.hasPermission),
      err => this.androidPermissions.requestPermission(this.androidPermissions.PERMISSION.SEND_SMS )
      );
    var options = {
            replaceLineBreaks: true, // true to replace \n by a new line, false by default
            android: {
                //intent: 'INTENT'  // send SMS with the native android SMS messaging
               intent: '' // send SMS without opening any other app
            }
        };
        try{
        await this.sms.send(this.phoneNumber.toString(),this.textMessage,options);
        console.log("sent");
        this.mostrarToast("mensage sent");
      }
      catch(e){
        console.log(JSON.stringify(e));
        console.log(e);
        this.mostrarToast(e);
      }
  }

Nevertheless I get this error in my logcat

2019-03-19 21:17:12.255 11786-11786/io.ionic.starter I/chromium: [INFO:CONSOLE(168)] "Has permission?", source: http://localhost:8080/home-home-module.js (168)
2019-03-19 21:17:12.322 11786-11786/io.ionic.starter I/chromium: [INFO:CONSOLE(187)] ""User has denied permission"", source: http://localhost:8080/home-home-module.js (187)
2019-03-19 21:17:12.322 11786-11786/io.ionic.starter I/chromium: [INFO:CONSOLE(188)] "User has denied permission", source: http://localhost:8080/home-home-module.js (188)

Posts: 1

Participants: 1

Read full topic

DevApp: plugins not installed in command console, but works in browser and emulator

$
0
0

@8bhsolutions wrote:

Hi,

I’ve writing a Ionic App that uses several plugins (which are supported on by DevApp).
Testing via the browser works fine.
Testing via Emulator also works fine.

When I test the app via DevApp, the ionic console is logging that the plugins are not installed.

Anyone know how to resolve this?

Posts: 1

Participants: 1

Read full topic

Unable to use any new plugins on my Ionic 3 project

$
0
0

@vasanthb wrote:

Hi,
I have a project, that was build on version Ionic 3. I have not updated my CLI to Ionic 4, as it is not necessary to me . Now after I install any plugin it says, greater version of the ionic-core or angular-core required. Ex: If I run

ionic cordova plugin add cordova-plugin-media-capture
npm install @ionic-native/media-capture

I get a warning like

npm WARN @ionic-native/media@5.3.0 requires a peer of @ionic-native/core@^5.1.0 but none is installed. You must install
peer dependencies yourself.
npm WARN @ionic-native/media-capture@5.3.0 requires a peer of rxjs@^6.3.0 but none is installed. You must install peer dependencies yourself.npm WARN @ionic-native/media-capture@5.3.0 requires a peer of @ionic-native/core@^5.1.0 but none
is installed. You must install peer dependencies yourself.

If I try to update ionic-core some other plugins will throw warning saying they need older version of the ionic-core.
Also there is some changes on the import statement where ngx is used

import { MediaCapture, MediaFile, CaptureError, CaptureImageOptions } from '@ionic-native/media-capture/ngx';

But when I try to use the plugin with below code

let options: CaptureImageOptions = { limit: 3 }
this.mediaCapture.captureImage(options)
  .then(
    (data: MediaFile[]) => console.log(data),
    (err: CaptureError) => console.error(err)
  );

I will get error like uncaught type error object(…) is not a function. This is been common for most of the plugins, I’m not able to use any plugin from few days. Please help me by saying, what is the mistake that I’m doing.

Posts: 1

Participants: 1

Read full topic

Ionic 4 hosted www folder content showing blank screen

$
0
0

@ionictgraj wrote:

Ionic:

ionic (Ionic CLI) : 4.12.0 (C:\Users\user\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.0.2
@angular-devkit/build-angular : 0.12.4
@angular-devkit/schematics : 7.2.4
@angular/cli : 7.2.4
@ionic/angular-toolkit : 1.4.0

Cordova:

cordova (Cordova CLI) : 8.0.0
Cordova Platforms : browser 5.0.4
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 6 other plugins)

System:

Android SDK Tools : 26.1.1 (C:\Users\user\AppData\Local\Android\Sdk)
NodeJS : v8.11.1 (C:\Program Files\nodejs\node.exe)
npm : 6.4.1
OS : Windows 10

I build the app using ionic cordova build browser --prod

saw ‘www’ and copied the content into my web browser(IIS) root folder and only blank screen can be seen

but i can run the web page when using ionic cordova run browser.

Is there any specific setting/plugin required to run this www contents in IIS or any othere web server?

Posts: 1

Participants: 1

Read full topic


Type Error:cannot read property of 'split' is undefined?

Facebook app events

$
0
0

@hasnainsakir001 wrote:

Hi,
Am trying to Integrate the Facebook SDK in my ionic app for App events tracking. Currently am following the steps mentioned in my developers account, but its not working .
it Shows “Could not find method implementation() for arguments [com.facebook.android:facebook-android-sdk:4.26.0]”.
can i get to know if its possible to implement facebook events tracking in ionic app ?. And whats the best method to do so.
Thanks in advance

Posts: 1

Participants: 1

Read full topic

Ion-range RTL

Could not find support-compat.jar (com.android.support:support-compat:27.1.1) at Ionic 4

$
0
0

@JeongJun wrote:

I am using this version below.

@ionic/angular”: “^4.1.0”,
“cordova-android”: “7.1.0”,

When I make android version by “ionic cordova run android”, the error emits.

Could not resolve all files for configuration ‘:app:debugCompileClasspath’.

Could not find support-compat.jar (com.android.support:support-compat:27.1.1).
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/support-compat/27.1.1/support-compat-27.1.1.jar

Posts: 1

Participants: 1

Read full topic

NgOnInit does not works in tab pages second time

$
0
0

@LacOniC wrote:

There are some topics about this problem but they are outdated. I use Ionic 4.1.1.

When i navigate between tabs, NgOnInit does not fire second time. It only works once. So if i change a data in tab 2, tab 1 can’t get it. For example a tab has no any event like ionSelect or ionChange. Because there is no Ion-Tab anymore. Ion-Tabs component has ionTabsDidChange but it’s useless in tab pages as i understand.

How can i trigger NgOnInit second time or call a function in a tab page when tab change?

Thanks in advance.

Posts: 2

Participants: 1

Read full topic

Ionic Chartjs line Chart IOS render problem

$
0
0

@christopherchu96 wrote:

I am using ionic framework to develop an app in Android and Ios environment. There is a chart in my app which is a line chart showing continuous data over datetime. I employed Chartjs for the graph. The line chart works well in android/ web platform but fail in ios. Could anyone know the reasons behind? many thanks.

Here is the code for reference. this.SBP_line and this.DBP_line are the data pass to the chart. They are in array format. e.g.[{x: “2019-03-13 0:19:47”, y: 130}]

Chart in web/ Android


Chart in IOS
createLineChart(): void {
  //   Chart.scaleService.updateScaleDefaults('linear', {
  //   ticks: {
  //     min: 0,
  //     max: 50, 
  //   }
  // });
  this.lineChartEl = new Chart(this.lineChart.nativeElement, {
    type: 'line',
    data: {
      // labels: this.datetime,
      datasets: [{
          label: 'Systolic Blood Pressure',
          data: this.SBP_line,
          duration: 2000,
          easing: 'easeInQuart',
          backgroundColor: "red",
          borderColor: 'red',
          hoverBackgroundColor: this.chartHoverColours,
          fill: false,
          pointRadius: 5,
          pointHoverRadius: 10,
        },
        {
          label: 'Diastolic Blood Pressure',
          data: this.DBP_line,
          duration: 2000,
          easing: 'easeInQuart',
          backgroundColor: "green",
          borderColor: 'green',
          hoverBackgroundColor: this.chartHoverColours,
          fill: false,
          pointRadius: 5,
          pointHoverRadius: 10,
        }

      ]
    },
    options: {
      hover: {
        mode: null
      },
      pan: {
        // Boolean to enable panning
        enabled: false,

        // Panning directions. Remove the appropriate direction to disable 
        // Eg. 'y' would only allow panning in the y direction
        mode: 'x'
      },

      // Container for zoom options
      zoom: {
        // Boolean to enable zooming
        enabled: false,

        // Zooming directions. Remove the appropriate direction to disable 
        // Eg. 'y' would only allow zooming in the y direction
        mode: 'x',

        limits: {
          max: 10,
          min: 0.5
        }
      },
      responsive: true,
      maintainAspectRatio: false,

      legend: {
        display: true,
        boxWidth: 80,
        fontSize: 15,
        padding: 0,
        labels: {
          fontColor: "white",
          fontSize: 18
        }
      },
      scales: {
        yAxes: [{
          ticks: {
            fontColor: "white",
            fontSize: 18,
            beginAtZero: true,
            stepSize: 30,
            max: 240,
            min: 30,
          },
          gridLines: {
            color: 'white',
            lineWidth: 1
          }
        }],
        xAxes: [{
          type: 'time',
          time: {
            min: new Date(this.datetime[-1]).getTime(),
            max: new Date(this.datetime[0]).getTime(),
            unit: 'day',
            unitStepSize: 1,
            displayFormats: {
              'day': 'DD MMM '
            }
          },
          ticks: {
            fontColor: "white",
            fontSize: 18,
            autoSkip: true
          },
          gridLines: {
            color: 'transparent',
            lineWidth: 1
          }
        }]
      }
    }
  });
}

Posts: 1

Participants: 1

Read full topic

Ionic1 + Ionic4 running side by side

$
0
0

@gnesher wrote:

Hi,

A client is interested in transitioning an old Ionic 1 app to Ionic 4, and asked me to investigate the possibility of gradual upgrade (converting individual modules / pages and slowly making the transition).

I realize that requires different versions of Angular running side by side (possible) and some modification to the build process (painful but also possible).

I was wondering if anyone did anything similar? Initial investigation seems to indicate this will be quite difficult and I was wondering if anyone was able to do this before? Or if there are blockers I’m not aware of

Thanks

Posts: 1

Participants: 1

Read full topic


Cordova plugin plush not display status bar notification on android version8.1.0

$
0
0

@demokumar wrote:

My projects info is

ionic (Ionic CLI) : 4.10.2 (C:\Users\User\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : ionic-angular 2.0.0-rc.4
@ionic/app-scripts : 1.0.0

Cordova:

cordova (Cordova CLI) : 7.1.0
Cordova Platforms : android 6.0.0
Cordova Plugins : no whitelisted plugins (16 plugins total)

System:

Android SDK Tools : 26.0.2 (D:\common\kapil\Android\sdk)
NodeJS : v6.11.1 (C:\Program Files\nodejs\node.exe)
npm : 5.3.0
OS : Windows 8.1

not display status bar notification when app in background

Posts: 1

Participants: 1

Read full topic

White screen issue

$
0
0

@ioniser wrote:

Hello please I need a quick help I have a white screen after the splashscreen
I’ve already tryed eveything remove all plugin and node-module but nothing seems to work
some time it’s work perfectly and the minutes later nothing

Posts: 1

Participants: 1

Read full topic

Wifiwizard is added to my config and package.json file but I can't find the import in my module.ts file

$
0
0

@Crielz wrote:

Prerequisites

Check all boxes if you have done the following:

Issue type

Select all that apply

  • Bug
  • Enhancement
  • Task
  • Question
  • Other

Description

I’m using ionic framework. When I want to install the wifiwizard2 plugin I get no errors but i’m not able to use the plugin. The wifiwizard is added to my config and package.json file but I can’t find the import in my module.ts file. Thanks in advance.

Steps to Reproduce

  1. run sudo cordova plugin add https://github.com/tripflex/wifiwizard2

  2. run sudo npm i cordova-plugin-wifiwizard2 or sudo ionic cordova plugin add cordova-plugin-wifiwizard2

  3. [and so on…]

Expected behavior: Use the plugin

Actual behavior: cannot find import

Reproduces how often: 100%

Versions

Ionic:

ionic (Ionic CLI) : 4.10.3 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.1.1
@angular-devkit/build-angular : 0.13.6
@angular-devkit/schematics : 7.2.4
@angular/cli : 7.3.6
@ionic/angular-toolkit : 1.4.0

Cordova:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.1.4
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 4 other plugins)

System:

Android SDK Tools : 26.1.1 (/Users/nathancriel/Library/Android/sdk)
NodeJS : v10.15.1 (/usr/local/bin/node)
npm : 6.7.0
OS : macOS Mojave
Xcode : Xcode 10.1 Build version 10B61

Additional Information

config.xml
<plugin name=“wifiwizard2” spec=“git+https://github.com/tripflex/wifiwizard2.git” /

package.json

dependencies
“cordova-plugin-wifiwizard2”: “git+https://github.com/tripflex/wifiwizard2.git”,

Posts: 1

Participants: 1

Read full topic

Push notification inner html outside app

$
0
0

@romulocc wrote:

Hello guys, when i received push notification with html tags i use inner html in app:
ex:
[innerHTML]=“String | safe:‘html’”:

Title
hello world

without inner html:

tiltle

hello world

So far ok,

but when de message has in focus in display, i stil have the tags

tiltle

hello&nsb world

How i resolve this.
Thanks a lot

Obs Push notification one signal

Posts: 1

Participants: 1

Read full topic

Strane error after plugin update

Viewing all 71531 articles
Browse latest View live


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