Ionic opening external app

I’ve had a hunt around the forum, but can’t seem to find a lot.
In Ionic 1, I’m using [Startapp]( to open Instagram.

I’d like to know what the best method for opening an installed app on a users device is for Ionic 2.
Ionic Deeplinks seems to be for personal applications? And with the inapp browser doesn’t work for Android in my testing.

Many thanks,


Maybe you can use this plugin but I’m not sure at all.

Install plugins

ionic plugin add cordova-plugin-inappbrowser
ionic plugin add cordova-plugin-appavailability
ionic plugin add cordova-plugin-device


import { InAppBrowser, AppAvailability, Device } from 'ionic-native';

And use

launchExternalApp(iosSchemaName: string, androidPackageName: string, appUrl: string, httpUrl: string, username: string) {
	let app: string;
	if (Device.device.platform === 'iOS') {
		app = iosSchemaName;
	} else if (Device.device.platform === 'Android') {
		app = androidPackageName;
	} else {
		let browser = new InAppBrowser(httpUrl + username, '_system');

		() => { // success callback
			let browser = new InAppBrowser(appUrl + username, '_system');
		() => { // error callback
			let browser = new InAppBrowser(httpUrl + username, '_system');

openInstagram(username: string) {
	this.launchExternalApp('instagram://', '', 'instagram://user?username=', '', username);

openTwitter(username: string) {
	this.launchExternalApp('twitter://', '', 'twitter://user?screen_name=', '', username);

openFacebook(username: string) {
	this.launchExternalApp('fb://', 'com.facebook.katana', 'fb://profile/', '', username);

Thanks so much! Any idea how I can open just the application, not on a username? I’ve tried removed the “Username” argument, and setting the open to “instagram://app”, but doesn’t seem to want to open, with no errors.

According to Custom URL Scheme seems like “instagram://app” should work on iOS.

If not, you can use lampa.startapp plugin as you mentioned above.

If it’s not definitions for TypeScript, you can try approaches as described here.

1 Like

Also read ios-9-not-opening-instagram-app-with-url-scheme.

Thanks, yeah found the fix for this in Ionic 1 (editing info.plist with LSApplicationQueriesSchemes).
Problem at the moment is opening Android, will try with Startapp as you suggest.
Thanks again.

On my side fb://profile/pageusername is not working

On my side fb://page/pageusername is working.

1 Like

Hi Nicksmit Kindly tell me what kind of modification you did in LSApplicationQueriesSchemes, as I need to integrate facebook messenger through my ionic1 app.

@eivanov It worked for me, in IONIC 3 PROJECT…

Do you know how to open an iOS App without know the Schema Name (By example, this app: ?

Gosh, still works in Ionic 3

@eivanov I want to launch installed application on button click action, button is present on the page which is opened using in-app-browser in my application.
I am using Ionic 3. Can you help me…?

@praful21 I managed to make instagram open but couldn’t make Unity3d open. Maybe my code is useful for you

 import { Component } from '@angular/core';
import { NavController, NavParams, IonicApp, Platform, Alert } from 'ionic-angular';
import { InAppBrowser } from '@ionic-native/in-app-browser';
import { messaging } from 'firebase';

export const myConst = {
  InstaApp: {
    ios: {
       //storeUrl: 'itms-apps://',
       appId : 'instagram://app',
    android: {
      // storeUrl: 'market://details?',
       appId: ''

  selector: 'page-augmentedreality',
  templateUrl: 'augmentedreality.html'
export class AugmentedRealityPage {
  Coordinates: any;
  constructor(public navCtrl: NavController, public navParams: NavParams, public plt: Platform) {}

  ionViewDidLoad() {
    console.log('ionViewDidLoad AugmentedRealityPage');
    if ('ios')) {
      let appId = myConst.InstaApp.ios.appId;
      let appStarter = (window as any).startApp.set(appId);
      appStarter.start(function (msg) {
        console.log('starting ig app: ' + msg);
      }, function (err) {
        // If app is not installed, this will open url to download
        console.log('ig app not installed', err);
        //, '_system'
        // );
        let msg_err = "Application is not found";
    } else {
      let msg_err = "Platform not supported";

@scarffy Hi, thanks for the code…its very helpful, but I am not able to launch the app from in-app-browser.
Scenario - I have pages (HTML/Angular) from server rendered inside my app using in-app-browser and want to open native application from these pages.

With the above code I manage to launch external app from my app but not from in-app-browser pages.

Remember add this to your config.xml, in iOS platform (to open the app, and not the browser):

  <platform name="ios">
    <config-file overwrite="true" parent="LSApplicationQueriesSchemes" target="*-Info.plist">

Also, for get my facebook page id, i got from this So, the link for open Facebook app is fb://profile/177102365662505


It works with the apps in the example, but if I need to open another app, how do I know what the app url is?