inAppBrowser not open link in AppBrowser in real android device in ionic


#1

Hi Friends i am using @Native ionic inAppBrowser in ionic 3. i want my website autometci load when i open my app its working fine in Emulator but when we run on real android device its ask me for choose system browser for open this link.How i can fix this.Please help. My code is this in home.ts :

import { Component } from '@angular/core';
import { NavController } from 'ionic-angular';
import { InAppBrowser } from '@ionic-native/in-app-browser';

@Component({
  selector: 'page-home',
  templateUrl: 'home.html'
})
export class HomePage {

  constructor(public navCtrl: NavController,private iab : InAppBrowser) {

  }

  //open inAppBrowser
  ngOnInit(){

    const browser = this.iab.create('http://www.test.com','_self',{location:'no'}); /*3*/

}

}


#2

Are you wanting to open it inline?


#3

yes i want to open in cordova webview…not in system browser.


#4

this problem is come when i autometic call this const browser = this.iab.create('http://www.test.com','_self',{location:'no'}); /*3*/ function if i call this function on onclick then its working fine