Using WebView, you can load your online publications inside a mobile app. WebView is a view that displays web pages, like the online publications, inside your application.
There are two ways to automate the appearance of new publications, without having to release an app update:
- Group URL. Use the Group Url to automatically load the latest publication.
- REST API v2 . If you have multiple publications online simultaneously, you can obtain the necessary images, links, titles and dates dynamically from the REST API v2.
Handling external links
Out of the box, WebView does not come with any controls or default configuration. Depending on how you've configured the WebView, clicking on an external link might not respond or open the link outside the app.
In general, there are three ways you can deal with the external links:
- Block external links. This is not a recommended solution if you're using hotspot icons to indicate their presence on the page.
- Load external links in WebView as well. This effectively means you're supporting users to browse the internet within your application. If this okay with you, be sure to add additional UI to support this use case (e.g., adding a back-button).
Removing the hamburger (menu) icon
In case you wish to hide the Reader's menu option you in the upper left corner of the Reader you can append the following to the User-Agent of the WebView:
Publitas Web View Integration
For example, if the app is loaded on an iPad, the updated User-Agent string will look like this:
User-Agent: Mozilla/5.0 (iPad; U; CPU OS 4_3_2 like Mac OS X; en-us)
AppleWebKit/533.17.9 (KHTML, like Gecko) Mobile Publitas Web View Integration