質問

I'm working on an iOS PhoneGap/Cordova app for a customer that launches a contact's LinkedIn profile page in an in-app browser. (Retrieved the URL from the people api) That part seems to work fine.

The problem is that once the page load, the user's LinkedIn app will launch, kicking the user out of my app.

Does anyone know of a way to prevent this from happening, aside from the user uninstalling their LinkedIn app?

役に立ちましたか?

解決

If you are viewing an in-app browser, then you can instead of loading the page, retrieve the html for the page you want to view. Then, if possible, strip out the offending redirection (it might be javascript based) and display the modified HTML. At the end of the day, if you have access to the page that you are displaying, you should be able to find a way to strip out the offending stuff.

Now, if linked in changes their web page, you would probably need to update this code, but this way would work.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top