Offline Browser for Windows Phone
Join the DZone community and get the full member experience.Join For Free
here is some good news:
finally my windows phone application offline browser is available for download in the windows phone marketplace !
offline web browser? but who needs that?
well actually i do. to be honest app was created (as many other apps) in order ‘ to scratch an itch ‘.
i’m an old information junkie and while traveling to work i like reading books and surfing the web, but often i don’t have internet connection or its very slow (for example when i’m in the subway).
although there are many excellent e-book readers for windows phone (one of the best is for sure freda ) i could not find a single offline internet web browser that would allow me to save full content of web pages to my phone and read them later when i’m offline.
this is how idea for offline browser for windows phone was born.
here are some of offline browser current features:
- save to your phone full content of web pages (html content with all images, css style sheets, jscript etc)
- later view all saved pages even when you are offline
- all links between saved pages work even when you are offline
- save all the links that are on current page with one click (useful for online news/magazines that have many links to related content)
- long tap gesture on link/image shows context menu with additional options for that link/image
- automatic retrieval of links for download queue by adding rss or atom feeds as source (add your instapaper or delicious or any other feed)
- download all queued links by sync option
- change browser user agent (mobile or desktop internet explorer, iphone or any other custom string)
- save pages via mobilizer service (instapaper, readitlater, google mobilizer etc)
- page scroll position is preserved so when you later open saved page its scrolled down exactly where you were last time
- its simple to use and can completely replace built in internet explorer browser since its uses same page rendering engine but adds more features
so now that we have an overview of what the app does, lets see how it looks and works:
the main browser page
first and main application screen is the browser page and this is where most of the magic happens:
as you can see ui is minimal.
i wanted to be able to focus on the page i’m currently viewing and not on the ui elements of the app.
its very similar to the stock phone browser and icons do not cover too much of the screen space.
the main feature of the app is the save button at the bottom of the page (annotated in the screenshot with the red arrow).
by pressing this button the whole page is downloaded to the phone with all the content including images etc.
sliding menu on the bottom of browser page:
when we click on the three dots in the lower right corner the sliding menu appears at the bottom with links to the other pages in the app and additional options available for this web page.
browser context menu
when we do a long tap on any link or image on the web page a context menu appears with additional options available for link/image.
we can save all the links pointing to the same domain and share the link url over phone email or social networks accounts.
images can be saved to the phone media library.
also you can add link as your link feed url. so you can just long tap on some rss/atom feed url and add it as a source for new links for your download queue. more on this feature later in this post.
similar context menu appears when you long tap (hold) somewhere on a page – but with slightly different options that are available for current page.
same menu can be invoked also from the bottom sliding menu when clicked on three dots icon.
saved web pages screen:
all saved pages are displayed and managed on this screen. you can see a list of your downloaded web pages sorted by date in descending order.
filter box on top can be used to narrow down a list to some specific pages if you have a lot of them.
on this screen you can long tap on a page in the list to get context menu with options for that specific page like delete, delete all and view.
by just clicking on a page you are taken to the browser screen and full content of this page is loaded from the phone storage without the need of internet connection.
so how do we automate this thing?
yes i know, i’m also lazy. i don’t like having to go into the mobile app, browsing websites on the phone and saving pages for later viewing or typing long urls.
so i came up with this solution:
when i’m at my desktop computer and i see a web page i want to read later on my phone i add it to my instapaper.com reading list or i bookmark it under special tag in my delicious.com account.
then i copy url of these rss feeds from instapaper account or delicious.com to offline browser application settings page as link feeds and these feeds will be used as source for new links that i will later download to my phone.
here is how it looks in the application settings page for the link feeds:
you can switch on/off background retrieval of the links from the feeds and you can set how often synchronization is performed.
below you can manually add more link feeds by typing their url or pasting it into the text box.
its important to note here that if you switch on this option then feeds are synced in the background tasks even when your app is not running.
due to limitations in windows phone background tasks application does not sync full content of the pages from those urls but only fetches their urls and adds them to the download queue.
you can then see those links in the download queue page and download them all just by clicking on the sync button.
application tile counter
when you are using background syncing of link feeds, application fetches new urls in the background and notifies you via toast notification and via application tile counter like this:
here application has downloaded new links from all the link feeds and its showing us that there are 5 new web pages to be downloaded.
when we have some pages in the download queue then on application start we are immediately taken to the download queue page:
this can be configured in the settings so that you are not redirected here when there are links in the queue so you can choose whats more logical for you.
once we click the sync button on the top of the page, application starts downloading all the web pages from the download queue and saves them to phone.
once they are downloaded you can access them from the saved pages screen.
browser user agent settings
another feature of the app is that you can choose in settings the browser user agent string to be used when browsing and downloading web pages:
you can pick one of the existing browser user agent strings like mobile or desktop internet explorer or iphone or simply choose custom and enter or copy/paste your own user agent of choice.
before going to sleep
so this was just a short introduction on what this handy application is and and what it can do.
if you want to test it go to the marketplace and download a trial version of offline browser (its fully functional trial with ads) and give it a try.
if you really find it useful well you might as well buy it, right?
in my upcoming blog posts i will explain some of the less visible features like how saving of page scroll position works etc.
also expect some windows phone programming posts since i have a lot of tips and tricks to share so stay tuned and happy offline browsing!
Published at DZone with permission of Slobodan Pavkov, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.