VGTech is a blog where the developers and devops of Norways most visited website share code and tricks of the trade… Read more



Are you brilliant? We're hiring. Read more
the

Mobile

category

Pushing the news

Android

There is no doubting the power of push notifications to generate instant spikes in traffic to your app. Push notifications have proven to increase user engagement and loyalty to a publication. It can help with conversions and customer retention and they can simply remind the user of how great your app and content is. According to localytics push notifications drive 88% more app launches, 52% of people opt-in to push notifications and users who enable push have a nearly 3X higher retention rate compared to those who disable push.

The users who accept push notifications are some of your most loyal customers. Who else would care enough to download your app and give you permission to interrupt their day at a time you deem appropriate with a notification you feel is relevant to them. This even happens when the app is not running and the screen is locked. This is an incredible act of trust. This trust, if betrayed is difficult to win back. The is brilliantly portrayed by Breaking News in this video

(more…)


The pros and cons of Apples Newsstand, is it worth it?

iOS

Apple introduced Newsstand in iOS5 as a single location for users to gather all their magazine and newspaper app subscriptions. From the users perspective its a type of folder where all their news/magazine periodicals (that support Newsstand) are located. There is also a link to the Newsstand section of the App store where a user can discover new publications.

If you are publishing a news app you have the option to add it to Newsstand, before you do you should consider the advantages and disadvantages of Newsstand.
(more…)



Setting up a mobile device lab

Mobile

It is becoming more and more challenging to test apps and websites on different devices, with different screen sizes, running different operating systems and with multiple browsers installed. How can you guarantee that your website or app works on every device and on every browser?

Nothing beats testing on the same devices as your users, not emulated or simulated versions of those devices. Physical interactions like pinching, zooming and scrolling, hardware features like the camera, GPS locations, the accelerometer, testing real occurring events like battery consumption or site performance are all best tested using physical devices.
(more…)


Xcode Plugins

iOS

If you haven’t done so already it’s time to check out some Xcode plugins. How about managing cocoapods from inside Xcode or getting a Todo-list window generated from your code comments? Clang-formatting your code, install new colorthemes or getting a minimap-view like in Sublime text? (more…)


VG+ 2.0: From Native to Hybrid App.

Android

VG+ is VG’s premium subscription based digital product and VG’s third editorial product, it consists of the best content from the printed VG newspaper with the best content from VG’s free news site www.vg.no. Context aware content tailor made for each platform ensures the ideal reading experience per device. The user can quickly and easily gain news insight on their mobile while enjoying a more immersive experience on the iPad.

 

The first version of VG+ was released in 2011 as an iPad app. It was a native application that won multiple awards including the ‘Best paid app’ at the World Association of Newspapers – WAN IFRA Cross Media Awards in 2011.

In 2013 we ditched our native apps and created a new set of VG+ Hybrid Apps (Android, iPhone and iPad). The goal was to combine the best of web technology with the best of native technology. We also created a new set of editorial tools that are tailor made to the needs of our editorial team and to creating interactive and instantly available content for mobile devices.

So why did we scrap the native apps and build hybrid apps?

(more…)


iOS7-bug: Shows white page when getting 304 Not Modified from server

iOS

It seems like after Apple upgraded almost every line of code in the iPhone they also introduced a bug regarding browser cache in Safari.

If your site takes advantage of the Last-Modified or ETag headers, you will probably run into this problem as well.

The iPhone will send a If-Modified-Since or If-None-Match header. The problem appears when the page is interrupted or cancelled during loading. In this case, it seems it will store an incomplete cache entry in the browser cache.

(more…)


Dissecting Javascript clicks in UIWebView

iOS

In VG we make heavy use of UIWebView, almost all of our iOS apps is a mix between native code and HTML. This is nice and dandy for presenting all sorts of content – being a newspaper means tons of webpages with ads, frames, javascript menus and whatnot.

Generally this works out really well, but for a long time we had a problem with links intercepted by javascript and how to distinguish these from an iframe loading. Why would we want to do this? Sometimes we wish to load linked pages in a separate view, leaving the originating page intact. Clicking on an article on our front page will push a new webview on the navigation stack so that when you’re done reading the article you can close it and instantly go back to the same spot on the front page. We use webview’s shouldStartLoadWithRequest delegate method for this purpose, like this:
(more…)


Hover state on touch devices

Frontend

With an increasing number of users on tablets and smartphones, the need to take touch friendliness into consideration is greater than ever. Even though both the browsers and hardware are approaching desktop speed, there are still some issues with implementing web sites and web apps for these devices. (more…)


Vektklubb Android-app available

Android

We recently released an Android application for Vektklubb.no – a product that helps you lose weight, stay in shape and become healthier.

The app is a simple WebView-based wrapper, but we hope this can help new and existing users discover the mobile version of the product.

You can download the application for free over on Google Play – although actually using the application requires you to have an active subscription to Vektklubb.
(more…)