Marco Montalto Marco Montalto - 1 month ago 18
Android Question

How to launch an Ionic application and NOT open it in a web view?

I'm stuck at the same issue for 2 days :(

I have two

applications that need to the be able to open each other, NOT in a
, but externally (if the app is already running, it can be restarted or just continue - I will handle both).

After many hours of research, I found that, using
InAppBrowser (, _system))
, I was able to open externally every commercial application I tried (facebook, twitter, maps, etc). The same call, when trying to open one of my applications, opens it in a web view."fb://", _system) -> opens Facebook separately."myapp://", _system) -> opens my application in a web view.

I've tried to modify
and the
, but almost everything I changed is erased by the building.

For example, if I change
and I run "Ionic build", my change are lost..

Any solution?



Need to add those lines in app/config.xml :

<preference name="AndroidLaunchMode" value="singleTask" />
<access origin="*" launch-external="yes" />

and change android:lauchMode to "Single Task" in app/platforms/android/AndroidManifest.xml :


<application android:hardwareAccelerated="true" android:icon="@drawable/icon" android:label="@string/app_name" android:supportsRtl="true">
<activity android:launchMode="singleTask" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale"  android:label="@string/activity_name" android:name="MainActivity" android:theme="@android:style/Theme.Black.NoTitleBar" android:windowSoftInputMode="adjustResize">
    <intent-filter android:label="@string/launcher_name">
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="fkapp" />


Hope it will help someone!!