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

Image orientation auto changing

$
0
0

@VigneshBalakrishnan wrote:

Hi all,
I’m selecting file using file chooser but some of the images are auto rotating to wrong orientation. When i’m looked for this issue i found exif orientation issue. Can any one help me to handle this thing, thanks.

Posts: 1

Participants: 1

Read full topic


IonInput for files? v5

$
0
0

@ccssmnn wrote:

I want to allow the users to upload images in my PWA. It seems that the IonInput is a wrapper for HTML input, but does not allow file inputs.

Combining <input /> with <label> in standard HTML does the job but looks ugly.

In the Docs i can only find file upload in the native components.

Posts: 1

Participants: 1

Read full topic

Assets with special characters (umlauts, ä, ö, ü) not served

$
0
0

@fiedl wrote:

When running ionic lab with ionic serve --lab, assets that have special characters like ä, ö, ü in the file name or folder name are not served.

http://localhost:8100/assets/a.jpg — works
http://localhost:8100/assets/ä.jpg — does not work
http://localhost:8100/assets/a/a.jpg — works
http://localhost:8100/assets/ä/a.jpg — does not work
http://localhost:8100/assets/a/ä.jpg — does not work

When it does not work, it just redirects to http://localhost:8100 rather than serving the asset.

This did work in ionic-v3, but is an issue with ionic-v5.

Does anyone know why this issue exists or how to resolve it? Thänks!

Posts: 1

Participants: 1

Read full topic

Pipe declared into 2 different modules

$
0
0

@lsantaniello wrote:

Hi all,
I created my custom Pipe but when I build for android platform (ionic cordova build android --prod --release --verbose), an error accurs. It works successfully when I try my app /ionic3) into browser using ionic serve command.

Type CountdownPipe in ../src/pipes/countdown/countdown.ts is part of
            the declarations of 2 modules: GruppiAcquistoPageModule in
            ../src/pages/gruppi-acquisto/gruppi-acquisto.module.ts and PipesModule
            in ../src/pipes/pipes.module.ts! Please consider moving CountdownPipe
            in ../src/pipes/countdown/countdown.ts to a higher module that imports
            GruppiAcquistoPageModule in
            ../src/pages/gruppi-acquisto/gruppi-acquisto.module.ts and PipesModule
            in ../src/pipes/pipes.module.ts. You can also create a new NgModule
            that exports and includes CountdownPipe in
            ../src/pipes/countdown/countdown.ts then import that NgModule in
            GruppiAcquistoPageModule in
            ../src/pages/gruppi-acquisto/gruppi-acquisto.module.ts and PipesModule
            in ../src/pipes/pipes.module.ts.

My files:

src/pipes/pipes.module.ts
src/pipes/countdown/countdown.ts
src/app/app.modules.ts
src\pages\gruppi-acquisto\gruppi-acquisto.html
src\pages\gruppi-acquisto\gruppi-acquisto.module.ts
src\pages\gruppi-acquisto\gruppi-acquisto.scss
src\pages\gruppi-acquisto\gruppi-acquisto.ts

gruppi-acquisto.ts

declarations: [
    GruppiAcquistoPage,
    CountdownPipe
  ],

pipes.module.ts

import { NgModule } from '@angular/core';
import { CountdownPipe } from './countdown/countdown';
@NgModule({
	declarations: [CountdownPipe],
	imports: [],
	exports: [CountdownPipe]
})
export class PipesModule {}

countdown.ts

@Pipe({
  name: 'countdown',
})
export class CountdownPipe implements PipeTransform {
  transform(dateStr: string, ...args) {
    ....
  }
}

I tried to read similar question on the forum but I can’t solve my issue. I tried to delete pipes.module.ts file and declare CountdownPipe into app.module.ts file but the solve is not solved

Could you please help me to solve?

Thanks

Posts: 2

Participants: 2

Read full topic

Strange bug: ionic-angular, after opening my app through dynamic link the view will not update correctly

$
0
0

@armanfantasy wrote:

I think it is a bug with ionic which do some strange thing when opening the app through dynamic links

ionic 5.0.7

Current behavior:
First my app is work perfect on the web browser on my computer but this but occur when i test dynamic links on my android device capacitor app.

i have an app which shows listing of properties when someone click on the dynamic link it will open the app and show that property but when you navigate back and see the listing and want to scroll for more property it will not show properties that fetched form server so i tested every thing its getting new items the array will update but the view will not show any thing till i go to an other tab an come back it will show those listing which was fetched but for new fetching it will not show.

I came around with a fix when i fetch new listing i run NgZone then it will show

As i mentioned this is just happening if the app is close then open through dynamic link.

I think if this bug happening for dynamic link it will happen also for push notification!

This is just a code for my solution when i fetch more data to make view update:

loadData(event) {
    this.zone.run(()=>{
        this.searchService.setIsOnSearch(true);
        this.estateService.addPageNumber();
        this.getEstates().then(
          value => { event.target.complete(); }
        );
      }
    );
  }

Ionic info:

Ionic:

Ionic CLI                     : 6.4.0 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework               : @ionic/angular 5.0.7
@angular-devkit/build-angular : 0.901.0
@angular-devkit/schematics    : 9.1.0
@angular/cli                  : 9.1.0
@ionic/angular-toolkit        : 2.2.0

Capacitor:

Capacitor CLI   : 1.5.2
@capacitor/core : 1.5.2

Cordova:

Cordova CLI       : 9.0.3 (cordova-lib@9.0.2)
Cordova Platforms : none
Cordova Plugins   : no whitelisted plugins (1 plugins total)

Utility:

cordova-res : not installed
native-run  : 0.3.0

System:

Android SDK Tools : 26.1.1 (/Users/arman/Library/Android/sdk)
ios-deploy        : 1.10.0
NodeJS            : v12.16.1 (/usr/local/bin/node)
npm               : 6.13.4
OS                : macOS Catalina
Xcode             : Xcode 11.4 Build version 11E146

Posts: 1

Participants: 1

Read full topic

Ionic 3 Android build fails with: could not find libvlc

$
0
0

@Daveshirman wrote:

I’ve got an Ionic 3 project, no changes have been made recently, yet suddenly it won’t build for Android.

Any one know how I can resolve the error below?

Thanks

Here’s the error:

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_debugApkCopy'.
   > Could not find :libvlc:.
     Required by:
         :android:unspecified

I’m using NVM use with a .nvmrc file to manage local node versions as I also have Ionic 4 on this machine too.

nvm use:

Now using node v8.16.2 (npm v6.4.1)

My Ionic info:

Ionic:

   Ionic CLI          : 5.4.5 (/usr/local/lib/node_modules/ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.4

Cordova:

   Cordova CLI       : 6.5.0
   Cordova Platforms : android 6.1.2, ios 4.3.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 1.2.1, (and 14 other plugins)

Utility:

   cordova-res : not installed
   native-run  : 0.2.8 (update available: 0.3.0)

System:

   ios-deploy : 1.9.4
   ios-sim    : 5.0.8
   NodeJS     : v8.16.2 (/Users/daveshirman/.nvm/versions/node/v8.16.2/bin/node)
   npm        : 6.4.1
   OS         : macOS Mojave
   Xcode      : Xcode 11.3.1 Build version 11C504


  ────────────────────────────────────────────────

     Ionic CLI update available: 5.4.5 → 5.4.16
            Run npm i -g ionic to update

  ────────────────────────────────────────────────

Posts: 1

Participants: 1

Read full topic

Wrapping page in ion-content makes text blurry on mobile

How to change the css of ionic large title during page navigation

$
0
0

@felixliu wrote:

Hi,

I’m creating an App that supports multiple language. But when the language is changed, the default font-size of the iOS large title (34px) is too large so that the title cannot be fully displayed. I modified it to 32px.

But the issue I’m facing is that during the page navigation, the font-size is still the default setting. So what I current got is that during page navigation, it’s 34px. And once it’s completed, the font will be 32px. I’m wondering is there any way that I can change the css of the large title during navigation period?

I found this https://github.com/ionic-team/ionic/pull/20862 that may related to my issue. But I don’t know what should I do to build the project that based on the modified ionic code.

Thanks in advance.

Posts: 1

Participants: 1

Read full topic


Ionic-v5 debug in browser

$
0
0

@etarom wrote:

Hi,
typescript source are missing on browser debug

Ionic:

   Ionic CLI                     : 5.4.16 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.11.10
   @angular-devkit/build-angular : 0.801.3
   @angular-devkit/schematics    : 8.1.3
   @angular/cli                  : 8.1.3
   @ionic/angular-toolkit        : 2.0.0

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : ios 5.1.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 5 other plugins)

ionic -v
5.4.16

in tsconfig.json:

"sourceMap": true,

any suggestion?

thanks in advance

Posts: 1

Participants: 1

Read full topic

Ionic 5.x Weather App with new Segments

Video restart when rotate the device in IONIC 3

$
0
0

@ken-shin wrote:

so in my ionic app i can play video using vimeo player with iframe and it works perfectly.
the problem is when i rotate the screen it restart the video again. i know it’s about saving the state kinda thing. but i don’t know how to do it.
this is my code

     <ion-col  *ngIf="!rendering" >
        <iframe [src]="cleanURL(VideoSrc)" width="100%" height="400" frameborder="0" allowfullscreen></iframe>
      </ion-col>

and this is the typescript code

cleanURL(oldURL: string): SafeResourceUrl {
        return this.sanitizer.bypassSecurityTrustResourceUrl(oldURL+'?autoplay=1');    
       }

there is plugin for screen orientation but i can’t seem to grasp how to resume the video right at that point after rotating the screen.
any kind of guidance would be helpful
have a nice day. cheers

Posts: 1

Participants: 1

Read full topic

If I have a TLS certificate, how to add it to my Ionic app so that it can connect to a HTTPS server?

$
0
0

@tomjaihk wrote:

If I have a TLS certificate (*.crt), how to add it to my Ionic app so that it can connect to a HTTPS server?

Thank you.

Posts: 1

Participants: 1

Read full topic

Property 'openDatabase' does not exist on type 'SQLite'

$
0
0

@jlxm wrote:

I was able to create a new database on another .ts file. Then, I wish top open the same database on a different .ts file.

this.platform.ready().then(() => {

      let db = new SQLite();
      db.openDatabase({
        name: 'data.db',
        location: 'default'
      }).then(() => {
        db.executeSql('CREATE TABLE IF NOT EXISTS plants (id INT PRIMARY KEY, crop TEXT)', {}).then(() => {
        }, (err) => {
          console.error('Unable to execute sql: ', err);
        });
      }, (err) => {
        console.error('Unable to open database: ', err);
      });

    });

However, it is returning…

Property ‘openDatabase’ does not exist on type ‘SQLite’.

I am sure I have installed it since I was able to use it already. How come, openDatabase does not work?

Ionic v4
cordova plugin ls
cordova-plugin-advanced-http 2.3.1 “Advanced HTTP plugin”
cordova-plugin-calendar 5.1.5 “Calendar”
cordova-plugin-device 2.0.2 “Device”
cordova-plugin-file 6.0.2 “File”
cordova-plugin-geolocation 4.0.2 “Geolocation”
cordova-plugin-googlemaps 2.6.2 “cordova-plugin-googlemaps”
cordova-plugin-ionic-keyboard 2.2.0 “cordova-plugin-ionic-keyboard”
cordova-plugin-ionic-webview 4.1.3 “cordova-plugin-ionic-webview”
cordova-plugin-network-information 2.0.2 “Network Information”
cordova-plugin-splashscreen 5.0.2 “Splashscreen”
cordova-plugin-statusbar 2.4.2 “StatusBar”
cordova-plugin-whitelist 1.3.3 “Whitelist”
cordova-sqlite-storage 4.0.0 “Cordova sqlite storage plugin - cordova-sqlite-storage plugin version”
phonegap-plugin-barcodescanner 8.1.0 “BarcodeScanner”
uk.co.workingedge.cordova.plugin.sqliteporter 1.1.1 “sqlite porter”

Any help is appreciated. Thanks

Posts: 1

Participants: 1

Read full topic

Ionic List Scroll is not sensitive enough on android

$
0
0

@kks21199 wrote:

Hi,

The scrolling works fine on windows chrome (with touch), but when I use it on android, it isn’t working unless I touch at some exact points. May I know what’s the issue?

I have recorded my screen and uploaed the video above. You can see my touch data on the video. I am using ionic 5 with capacitor. Here is my sample code,


<ion-content [fullscreen]="true" >
  <ion-list>
    <ion-item>
      <ion-label>Pokémon Yellow</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>Mega Man X</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>The Legend of Zelda</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>Pac-Man</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>Super Mario World</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>Pokémon Yellow</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>Mega Man X</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>The Legend of Zelda</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>Pac-Man</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>Super Mario World</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>Pokémon Yellow</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>Mega Man X</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>The Legend of Zelda</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>Pac-Man</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>Super Mario World</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>Pokémon Yellow</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>Mega Man X</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>The Legend of Zelda</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>Pac-Man</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>Super Mario World</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>Pokémon Yellow</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>Mega Man X</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>The Legend of Zelda</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>Pac-Man</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>Super Mario World</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>Pokémon Yellow</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>Mega Man X</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>The Legend of Zelda</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>Pac-Man</ion-label>
    </ion-item>
    <ion-item>
      <ion-label>Super Mario World</ion-label>
    </ion-item>
  </ion-list>

Posts: 1

Participants: 1

Read full topic

Modal in diferent pages using ionc4

$
0
0

@mehraj786 wrote:

hi i want to use a modal in diferent pages but i am getting this error
Error: Type PrescriptionPage is part of the declarations of 2 modules: ViewOrderPageModule and ViewInvoicePageModule! Please consider moving PrescriptionPage to a higher module that imports ViewOrderPageModule and ViewInvoicePageModule. You can also create a new NgModule that exports and includes PrescriptionPage then import that NgModule in ViewOrderPageModule and ViewInvoicePageModule

can anyone how to use modal in two different page

Posts: 1

Participants: 1

Read full topic


Change detection doesnt trigger

$
0
0

@Vartex05 wrote:

Hi, in my ionic 5 app, i encountered strange problem with change detection. In my Cart page, i display list of products, and user can send order with fab button. Everything works, but when i hit the button, i want to reset all items, that are displayed. I do this in processTransacton method.
Problem is, that it doesnt trigger change detection, so old items doesnt disappear until i hit another button on the page. Any ideas what can cause this? My code looks like this:

<ion-content class="ion-padding">
  <ion-button expand="block" (click)="openProductList()">Přidat položku</ion-button>
  <div *ngFor="let product of selectedProducts">
    <app-cart-item [cartItem]="product" (remove)="removeProduct($event)">
    </app-cart-item>
  </div>
  <ion-fab vertical="bottom" horizontal="end" slot="fixed">
    <ion-fab-button color="success" (click)="processTransaction()">
      <ion-icon name="checkmark-outline"></ion-icon>
    </ion-fab-button>
  </ion-fab>
</ion-content>
  processTransaction(){
    this.productService.sendOrderCash([...this.selectedProducts]).subscribe(result=>{
      this.lastSelection=[...this.selectedProducts];
      this.selectedProducts=[];
      console.log(this.selectedProducts);
    });

  }

Posts: 1

Participants: 1

Read full topic

InAppBrowser camera access

$
0
0

@KevinR007 wrote:

I’m trying to get access to my camera with the InAppBrowser. When I visit the site on a mobile browser my input triggers the gallery with access to my camera. When I place the URL in InAppBrowser, it only opens my files dir. When searching around I found this git thread https://github.com/apache/cordova-plugin-inappbrowser/issues/328 the solution there doesn’t work for me.

If someone knows the solution to open your camera InAppBrowser I would be a very happy person!

FYI
input tag:
<input type="file" accept="image/png, image/jpeg" >
app component: initializeApp() { this.platform.ready().then(() => { SplashScreen.hide(); const browser = this.iab.create('https://dev.kevinrouwkema.nl/', '_blank', this.options); browser.on('loadstop').subscribe(event => { SplashScreen.hide({ fadeOutDuration: 1000 }); setTimeout(() => { browser.show(); }, 1000); }); }); }

Posts: 1

Participants: 1

Read full topic

Does an Ionic app use non-exempt encryption?

$
0
0

@hlamprecht wrote:

Hi,

I’m not sure, if this is the right category, so please sorry if this is wrong.

As I assume, quite a number of people here are developing apps, that are about to be released through the app stores. Now, while preparing our first release, I’m unsure about the encryption related export compliance. Our app is loading data from a remote REST API, and this is of course done through HTTPS. The actual HTTPS connection is established by some iOS code, as the app is basically a browser. So, does that mean, that the app just uses exempt encryption, and we don’t have to bother with all these export compliance stuff?

Thanks and all the best,

Heiner

Posts: 2

Participants: 2

Read full topic

Ionic/angular Android Http not working

$
0
0

@eliasminima wrote:

Hello I have an ionic/angular project which has some http GET requests. It was fully working on browser, iOS and Android, where the HTTP request would get executed and details displayed in my ionic UI. However as of recently, after updating Android Studio etc, I noticed that my android native version is broken and I am not getting any HTTP requests.

Every time a GET request is executed I see this error in the log ->

File: http://localhost/vendor-es2015.js - Line 46777 - Msg: ERROR [object Object]…

I have a service running the foreground, where I can make those http calls in the emulator’s browser and the requests are coming in, and the service works just fine… the ionic app though is empty. Any advice would be appreciated.

Thanks!

Posts: 4

Participants: 2

Read full topic

Not getting PWA install prompt

$
0
0

@kemaltolga wrote:

I have a vanilla ionic5 angular9 application.

I then run ng add @angular/pwa.

I deploy to firebase and run lighthouse. I get perfect PWA score.

BUT, I am not getting install prompt.
The app has NOT been previously installed.
I’ve tried 3 different browers on 2 different PCs.

I’ve been at this for hours. Very frustrating.
Thanks for any help.

Posts: 2

Participants: 2

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>