Hybrid app navigation switches from Hybrid phone app online to Phone browser

0
Hi, I have developed an app which utilizes OAuth module for both web browser and mobile hybrid app. For the hybrid app, I have used an implementation based on my previous forum post:  https://community.mendix.com/link/questions/86570 Basically, I have created a widget which executes the line below: window.location.href = this.urlRedirect; This works as intended to open the OAuth page of the provider inside the hybrid app. But I have noticed that doing this, it no longer uses the Hybrid phone app online navigation profile, instead, it switches to Phone browser. Is there a way to ensure that the app does not switch to Phone browser navigation profile, or to switch back to Hybrid phone app online navigation profile? The purpose of two different navigation profile is that the Hybrid phone app online navigation profile is used for the mobile app usage which requires certain plugins. The Phone browser is used solely to show a page that provides a link to the App store in case a user uses a mobile browser such as Chrome to use the app.
asked
2 answers
3

Hi Rionald,

I do not know the details of your application However I recommend not change the url in the Hybrid app but use the inappbrowser to open external urls so that you do not navigate away from the app. Also you run into issue when redirecting to localhost url (your index.html). You can do the authentication in the inappbrowser, and once done (check via the inappbrowser callback) you can close it again and (re)load the client.

answered
1

Rionald,

Not completely sure if this will help, but you can use a microflow as your default home page for both profiles, and then in the microflow you can decide which home page to show.

There is a token called " $currentdevicetype " that may be helpful. 

answered