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



Async patterns on Android: Kotlin with coroutines


9 months ago I wrote about asynchronous programming patters in different languages covering C#, Javascript and Java. Lately I’ve been digging into Kotlin and specifically the Coroutines implementation in their 1.1 beta. This finally brings the async/await-pattern to Android – a pattern I grew learned to love when it was introduced to C# some years ago. The main benefit from my point of view is how it integrates asynchronous programming into the language syntax, making writing, and even more important: reading asynchronous code simple.


VR and 360 video in the media industry

360 video

My first VR experience was using an early developer edition of Oculus Rift. It was easy to see the potential in the technology but it was somewhat overshadowed by the overwhelming feeling of motion sickness and the desire to throw up. My second experience was at Websummit in Dublin where I got to try the production ready version of Oculus Rift together with the hand controls. I was blown away by the experience. The problems with motion sickness had all but disappeared and the immersive experience and quality of content had improved immensely. Hand controls and spatial awareness sensors has helped to improve the perception of reality.

Since then we have acquired our own VR headsets and are like many media companies trying to figure out how to storytell through this new medium. The reality is that the technology is very much in the ‘early adopters’ phase of its lifecycle. Truly immersive VR headsets and the computers needed to power them are currently too expensive for the majority of people, the hardware and software needed to create quality content for these devices is also lacking or too expensive. Since these devices are largely stationary and located in your house the barrier for consumption is substantial, you have to be at home and it takes effort to put them on and find the content you want to consume. For a pretty comprehensive guide to the hardware and software currently available check out the guardians article, The complete guide to virtual reality – everything you need to get started


Simplifying login with Googles smart lock for passwords and Apples shared web credentials


To deliver a truly personalised experience across multiple devices we require our users to login. To get our users to login we need to create a seamless login experience. Users often forget their username or password or do not understand that they can use the same login credentials between the different products or services we offer.

Password management services make it easy for users to keep track of their login credentials and use them across multiple platforms.
Apple and Google have created services to manage user credentials. Apples initiative is called “shared web credentials” and Googles “Google smart lock for passwords”.
If you update your apps and website to support both ‘shared web credentials’ and ‘Google Smart lock for passwords’ you can simplify the login experience for those users who have chosen to save their credentials with Apple and Google. The biggest benefit is in sharing login credentials between your website and your apps.

Engaging audiences through emojis


Apps are evolving to be more than just functionality available behind an app icon on a users home screen. Custom keyboards, widgets, notifications, 3D touch, extensions and siri integration are among the many ways developers can now engage with users outside the confines of the traditional smartphone app on the homescreen.

Async programming patterns in different languages


During the 10 years I’ve been into professional programming, the largest paradigm shift I’ve witnessed is the one from sequential to asynchronous programming. Not that it is a new concept – asynchronousity has been has been present in programming since the dawn of time, but what’s new is the tight integration in programming languages and the prevalence of it. From events and callbacks in C# to async-await. From callbacks in Javascript to Promises. In Java we got Futures in Java 7, CompletableFuture, lambdas and streams in Java 8. On top of all these language features you have a vast array of libraries that help you implement common async patterns – ReactiveX for instance exists for all the three languages mentioned, and a lot more.


VG Hack Day 2015



On a cold Thursday in December, we held our annual Hack Day on the top floor of the VG building in Oslo. 30+ eager developers, designers and product people huddled together in front of the fireplace, to experiment, create and have fun with VG’s products and technology.

Surrounded by soda cans and bags of snacks, and entangled in wires of all kinds, we sat for 18 hours, churning out lines of magical code and golden pixels. Continue reading to see some of the things we did.

How App linking in Android M and iOS9 will help to increase app engagement


New functionality available in the next version of both Apple and Googles mobile operating systems (iOS9 and Android M) will have dramatic consequences for publishers trying to get users to use their apps instead of the mobile web browser. The next version of the iOS and Android operating systems will take deep linking to a new level.

Both Apple and Google have worked simultaneously on improving app linking, and essentially blurring the lines between content displayed in an app and content in a mobile website.

Android Databinding: Goodbye Presenter, hello ViewModel!


The Model-View-Presenter-pattern (MVP) has been the dominating trend lately when it comes the UI-layer architecture of Android applications. Frameworks like Ted Mosby, Nucleus and Mortar have all talked about Presenters to help you achieving a clean architecture of your app. They also (to a varying degree) help you with the infamous issues of device rotation and state persistence on the Android platform. This isn’t directly related to the concept of MVP, but the pattern helps you isolate the boiler plate code.

Location based Ads at VG

At VG we have been experimenting with offering location based advertisements in our VG app.

The goal is to deliver relevant advertisements to the the users at the right time and in the right place. Smartphones have provided the opportunity to serve more relevant information based on a users current physical location or locations they have previously visited.