InAppBrowser causes crash in Android version

When i click on a function in my Android device there is a crash of app

this is my code in .ts

openBrowser() {
let options = 'location=no,toolbar=no,hidden=no,enableViewportScale=yes';
let browser = new InAppBrowser(this.item.ticket, '_system', options);
browser.show();
  }

where this.item.ticket is a simple url

no problem with ios version

any suggestion?

I have the same problem too, did you find any solution :confused: ?

Yes i found this solution and it work on iOS and Android but not works in ionic view platform.

import { InAppBrowser } from 'ionic-native';

let options = "location=no"
let browser = new InAppBrowser(appUrl, '_system', options);

Hi, got same problem in my app,
I used you solution but didn’t work

import { Component } from '@angular/core';
import { ViewController, NavParams } from 'ionic-angular';
import { InAppBrowser } from 'ionic-native';

@Component({
  selector: 'outdated',
  templateUrl: 'outdated.html',
  providers: [InAppBrowser]
})
export class OutdatedAppModal {
  url: string;

  constructor(
    public viewCtrl: ViewController,
    private navParams: NavParams
  ) {
    this.url = navParams.get('url');
  }

  openBrowser() {
    let options = "location=no"
    let browser = new InAppBrowser(this.url, '_system', options);
    browser.show();
  }

  dismiss() {
    this.viewCtrl.dismiss();
  }
}

It still crash my app ;/

Try to remove browser.show(). It should works

Yes it works a few hours later I came to the same solution

Thanks!

1 Like