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


i'm stuck @ same issue 2 days :(

i have 2 ionic-phonegap applications need able open each other, not in webview, externally (if app running, can restarted or continue - handle both).

after many hours of research, found that, using inappbrowser (window.open(url, _system)), able open externally every commercial application tried (facebook, twitter, maps, etc). same call, when trying open 1 of applications, opens in web view.

window.open("fb://", _system) -> opens facebook separately. window.open("myapp://", _system) -> opens application in web view. 

i've tried modify androidmanifest.xml , config.xml, changed erased building.

for example, if change "android:launchmode="singletop" "android:launchmode="singletask" , run "ionic build", change lost..

any solution?

solution found!!!

need add lines in app/config.xml :

<preference name="androidlaunchmode" value="singletask" /> <access origin="*" launch-external="yes" /> 

and change android:lauchmode "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" />     </intent-filter>     <intent-filter>         <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" />     </intent-filter> </activity> 

...

hope someone!!


Comments

Popular posts from this blog

python - No exponential form of the z-axis in matplotlib-3D-plots -

php - Best Light server (Linux + Web server + Database) for Raspberry Pi -

c# - "Newtonsoft.Json.JsonSerializationException unable to find constructor to use for types" error when deserializing class -