Sunday, 28 December 2014

AdDuplex integration for Windows Phone apps made with App Studio

So you’ve made an app with Windows App Studio and are  about to publish, yet you haven’t got a clue on how to promote it. Well, don’t tell anyone, but AdDuplex got you covered. AdDuplex is a cross-promotion network specifically targeted at Windows 8 and Windows Phone apps and games. It empowers developers to promote apps for free by helping each other.
If you haven’t done so already go to AdDuplex website, get registered and create a new Window Phone 8.1+ app in the cross promotion section. Take note on the App ID that gets generated for you. We will need that later on.
circle
This guide will take you step by step on how to integrate AdDuplex ad control into your app and start cross-promoting. The method described here is designed for users without much experience in native Windows Phone app development. The assumption here is one that if you are using App Studio to create your app, you are probably not too comfortable with Visual Studio/C#/XAML. If you are though, just follow this tutorial instead.
  1. Make sure you have Visual Studio installed. You can get it here.
  2. Download and install AdDuplex Universal SDK for XAML apps. Don’t worry, the installer will only copy some ad control files to be referenced from Visual Studio.
  3. Generate and download app source via the app studio website.
  4. Unzip the downloaded folder and use Visual Studio to open AppStudio.sln file.
  5. From the Solution Explorer window, right click References…, and select Add New Reference…
  6. Locate and open  App.xaml.cs file in the Solution Explorer window.vs
  7. Scroll down to this piece of code
  8. Replace it with
  9. Replace YOUR_APP_ID with your AdDuplex AppID.
Run the app to see the beautiful ads on top. If everything goes well you are ready to publish the app.

Refinishing my Charvel maple fretboard

I’ve wanted to tidy up my Charvel So-Cal fretboard ever since I’ve got it. The So-Cal has an unfinished maple fretboard. It was great to play on, but had some build up from previous usage (I’ve bought it used).
WP_20141227_16_01_20_Pro WP_20141227_16_01_28_Pro
Some guys like the look and feel of an aged unfinished maple. I would probably mind it less though if it was my own gunk. After extensive googling I’ve decided to sand it down, cover it with Gunstock Tru-Oil and Wax.
For sanding I’ve used a fine sanding sponge (220). It worked fine for the first 5 frets, but I had to cut the sponge up to smaller pieces to effectively work on the higher frets.
WP_20141228_09_49_27_Pro
Music Man for it’s unfinished maple guitars recommends Birchwood Casey Gun Stock Tru-Oil Finish and Wax. These are not cheap, but are considered a high quality stuff so I went with it. Had to get mine from Ebay.
WP_20141228_09_49_46_Pro
First I removed the strings from the guitar, removed the neck from the body and loosened the truss rod. I’ve then cleaned the neck with lemon oil just to take everything I could off the surface and proceeded to sanding.
Gentle sanding took about 45 minutes for the entire fretboard. I was careful not to take too much of the wood off. I could have sanded it a bit more, but it already looked much better.
 WP_20141227_16_40_21_Pro
Then I’ve applied the Tru-Oil. It can be a tricky bastard to work with. I’ve found it works best when just applying it with a finger. Since the oil is very liquidy it will spread pretty evenly on by itself.  The key is not to try washing it off your hands (or everything else you gooche on) with water. You want to use mineral spirit, nail polish remover or something of that nature.
I’ve applied 2 layers of Tru-Oil with 20 minutes for each to harden up, then cleaning the residue with a dry cloth.
Then I’ve waxed the fretboard. This is the fun part: just apply some of it on the whole area and polish with a dry cloth. I’ve added 3 layers of the Birchwood Case Wax.
This is what it ended up looking like:
WP_20141227_18_33_01_Pro 
WP_20141227_18_32_53_Pro
I am quite please with the results. It feels cleaner and just gently finished, I like that very much.

Tuesday, 18 November 2014

How to get the status bar visibility in a Windows Phone 8.1 XAML project

Here’s a quickie for you. Sometimes  you need to  know is the status bar visible or not. If you’ve found this blog post you have probably already found that the StatusBar class has no Visibility member. But it does have an OccludedRect, which is what we are going to exploit. Basically the idea is that an invisible status bar has no other size parameters than 0.

This is of course trivial, but still may prove useful for someone in a hurry.

Tuesday, 26 August 2014

How to integrate AdDuplex banner into your Unity game (part 2)

In part 1 I’ve explained how to add AdDuplex banner into your game. In part 2 I will show you a technique I use to enable/disable the AdDuplex banner from your game.

1.  When still in Unity add a new C# script to your game, name in Interop.cs and paste the following code into it:

2.  In game when you want to enable/disable the banner call Interop.DisableAdDuplex(); or Interop.EnableAdDuplex();

3.  After you build your Unity project and add the banner (as we have discussed earlier) open MainPage.xaml.cs file and add several lines of code to constructor:

replace
with

How to integrate AdDuplex banner into your Unity game (part 1)

AdDuplex is a cross-promotion network specifically targeted at Windows 8 and Windows Phone apps and games. It empowers developers to promote apps for free by helping each other.
And in case you’ve been living under a rock - you can now score some serious cash by advertising in AdDuplex Direct

Adding AdDuplex banner to your game is pretty much plain sailing. Here’s how:

1.  Open the build generated Visual Studio project and go to TOOLS->NuGet Package Manager->Package Manager Console

2.  Run this command in the console:
Install-Package AdDuplexWP8

3 .  Add a reference to the top of your MainPage.xaml file:

4.  Insert the ad control in between the DrawingSurfaceBackgroundGrid tags:

5.  Enter your AppID, position the control as you like

Thats it. Learn how to enable/disable the banner from inside of your game in part 2