Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Javi_G_
Beginner
80 Views

PROBLEM: Opening a link inside the app in external browser

Hi guys!

I need help!

I'm facing the development of my first app.

It's just a web view using XDK.

My Problem is:

When I click a link in the app it opens the browser instead of opening it inside the app.

I want to show all my content inside the app.

What can I do?

Thank you very much!

I really appreciate every help!

Javi

Tags (2)
0 Kudos
3 Replies
PaulF_IntelCorp
Employee
80 Views

Try using the inAppBrowser for more control over your external links. See the documentation here > https://github.com/apache/cordova-plugin-inappbrowser

Javi_G_
Beginner
80 Views

Hi Paul!

Thank you for your response.

The point here is that my app is just a web view with XDK.

What I do it's justo to open a link of a website (that has links inside, but they are on the website, not app).

When I click on those links, they open in a "new app window" (like a browser page).

I want them to open on my app view, so users are not going out of my app.

How can I make it?

Thank you sosososo much.

I'm new in this :)

Cheers!

Javi

PaulF_IntelCorp
Employee
80 Views

Javi -- yes, I understand what you are doing, and the inAppBrowser is the best way to get the behavior you want. Please read the documentation for that plugin and you should find what you are looking for. In general, hosting a link is not really considered "an app" -- and the environment your "app" is running in is not a browser, so some things behave differently than you expect them to. The inAppBrowser gets you closer to the experience you are seeking. Do not use window.open() or an href, use the inAppBrowser API to open your page(s) and use the special options for the inAppBrowser APIs to get the behavior you want. See the inAppBrowser documentation.

Reply