Call Encore now on +44 (0) 1273 722 544 or contact us
Sunday 29th, January 2012

Encore joins Edelman

Posted by Press Office on February 9, 2011

February 9th 2011

Encore has joined the worlds largest PR agency, Edelman. This brings the total staff of Edelman UK’s digital arm to over 50. Jethro Grassie joins as Technical Director in the UK, commenting: “This is fantastic recognition of the hard work and excellent results of the team. Encore has been working closely with Edelman over recent years producing a wide array of multi-platform digital applications. The union is a sizeable boost for the London digital team, further establishing the digital group as the hub of Edelman’s digital innovation and delivery.”

What does this mean for Encore’s existing customers?

The Encore team will continue to operate from its Brighton office with all key contacts and working practices remaining unchanged. There will be no change to existing contracts and pricing remains unchanged. With Edelman and Encore working as one we can deliver our clients a much wider capability in digital delivery alongside captivating creative and increased know-how for development of deeper digital strategies.

What does this mean for Edelman?

Edelman’s UK digital team now reaches over 50 staff offering clients a yet deeper range of technical services including enterprise level development skills and mobile application expertise across multiple platforms.

Related press releases

Major Expansion for Edelman UK Digital Practice
Edelman expands digital practice with Encore absorbtion
Edelman Adds UK Software Development Firm to Digital Practice
Edelman has added UK software development agency Encore to its digital offering
Edelman in major digital expansion


A small glitch in the new Xcode

Posted by Lenka on February 9, 2011

Those who downloaded Xcode 3.2.5 might experience a problem with updating their old projects. Each app that used an older base SDK needs its Info.plist changed to use the newest SDK. Previously, doing so worked but the 3.2.5 Xcode is not happy after you close the “Project Info” pane and keeps showing “Base SDK missing” message. Before you spend too much time googling what else needs to be done to have your project compile properly, just close it and open it again. All should be fine now.


Flex and Flickr uploading

Posted by Lenka on December 30, 2010

Flickr provides developers with the ability to upload images into a user account similar to how Facebook does. However, the standard API effectively only allows posting from an image file. A problem arises when the image you want to post is a snapshot taken by Flex from inside your SWF. Flickr does not accept raw image data from the Flash Player so you have to use a PHP script or similar to deal with the raw data, create an image and send it to Flickr. This is how it can done:

1. Authenticate User with Flickr

- Download the latest ActionScript API for Flickr and put the ‘com’ folder into your project
- This page explains how you can get a user to authenticate with Flickr and obtain a token for your application. The fix posted by rrossen on Feb 25, 2008 is especially useful.
- Make sure to save the obtained token to a variable in Flex.

2. Create a snapshot inside the Flex movie and send it to a PHP script

As an example, the following code captures content of a canvas called ‘preview’

import mx.graphics.codec.JPEGEncoder;
import mx.graphics.ImageSnapshot;
...
var snapshot:ImageSnapshot = ImageSnapshot.captureImage(preview, 0, new JPEGEncoder());

Send encoded image data to a PHP script e.g. using Cairngorm.
In the FlickUploadPhoto command:

var request : Object = new Object();
var flickrUploadPhotoEvent:FlickrUploadPhotoEvent = event as FlickrUploadPhotoEvent;

//Convert to Base64
var encoder:Base64Encoder = new Base64Encoder();
encoder.encodeBytes(flickrUploadPhotoEvent.imageData.data);

request.imageData = encoder.toString();
//send the app key, app secret and token as well so that the PHP script can send an authenticated request to Flickr:
request.appKey = flickrUploadPhotoEvent.appKey;
request.appSecret = flickrUploadPhotoEvent.appSecret;
request.token= flickrUploadPhotoEvent.token;

// set request to service
service.request = request;

// dispatch call
var call : Object = service.send();
call.addResponder(this);

3. Create a REST controller that will handle the request

- Download PHP Flickr API (current latest version: PHP5) and add the PHP files into your project
- Inside of the function that handles the request in your REST controller: decode the image data, create a temporary image and send it to the Uploader class of the Flickr API for further handling:

$imageData = $this->input->post('imageData');
$appKey = $this->input->post('appKey');
$appSecret = $this->input->post('appSecret');
$token = $this->input->post('token');

$myImage = base64_decode($_POST['imageData']);
if ($myImage != false)
{
   //Write the image to a file
   $tmpfname = tempnam("", "FC");
   $handle = fopen($tmpfname, "w");
   fwrite($handle, $myImage);
   fclose($handle);

   //request FlickrUploader to handle the upload:
   $uploader = new Phlickr_Uploader();
   $uploader->setPerms(0,1,0); //friends only
   $uploader->setAuthenticationParams($appKey,$appSecret,$token);
   $id = $uploader->upload($tmpfname,"Puma KingOf","");
   if ($id >= 0)
   {
      //handle successfull upload
   }
   else
   {
      //handle error
   }
   //get rid of the file
   unlink($tmpfname);
}

4. Change Upload.php located in the PHP Flickr API

Make the following changes to Upload.php in the Phlickr folder so that the class is more standalone:

//add variables that will hold the security data
protected $_appKey = "";
protected $_appSecret = "";
protected $_appToken = "";

//add function that will save the security data:
public function setAuthenticationParams($appKey,$appSecret,$token) {
   $this->_appKey = $appKey;
   $this->_appSecret = $appSecret;
   $this->_token = $token;
}

Changes to make in the upload function:

...
$params =  array(
   'api_key' =>  $this->_appKey,
   'auth_token' =>  $this->_token,
   'title' => $title,
...
$params['api_sig'] = md5($this->_appSecret . $signing);
...
$result = Phlickr_Request::SubmitHttpPost(self::UPLOAD_URL, $params, self::TIMEOUT);
// use the reponse object to parse the results
try
{
   $resp = new Phlickr_Response($result, true);
}
   catch  (Exception $e)
{
   //return error code
   return -1;
}
// return a photo id
return  (string) $resp->getXml()->photoid;

The above code sets the name and description of the uploaded image to ‘test’. It would be possible to send these parameters from Flex or just hard-code them to anything else.

The PHP Flickr API also provides a function for batch upload images which might be useful e.g. for a gallery managed by Flex.


UILabel size to fit text

Posted by Lenka on December 17, 2010

If you create your UI programatically for iOS (as is good practice), you might come across a problem with the UILabel: what size should it be to fit the text perfectly? You might get away with just making the label very large, but this will not work if you need to use the text size in some calculations later in your code.

To instantiate a UILabel with a fitting frame, you can do the following:

NSString * myText = [NSString stringWithString:@"some text"];
//get size of the text:
CGFloat constrainedSize = 265.0f; //or any other size
UIFont * myFont = [UIFont fontWithName:@"Arial" size:19]; //or any other font that matches what you will use in the UILabel
CGSize textSize = [myText sizeWithFont: myFont
                       constrainedToSize:CGSizeMake(constrainedSize, CGFLOAT_MAX)
                           lineBreakMode:UILineBreakModeWordWrap];

//create a label:
CGRect labelFrame = CGRectMake (0, 0, textSize.width, textSize.height);
UILabel *label = [[UILabel alloc] initWithFrame:labelFrame];
[label setFont:myFont];
[label setText:myText];
...
[label release];

Bowled over

Posted by Claire on November 17, 2010

First team night out as Encore!

Last month the newly named Encore team went out for bowling and beer. Not everyone could make it. We were minus Tony, Ben, Billy and Lenka, so as subs we had Jethro’s children Xavi at age seven and Mimi aged ten to make up the numbers.

We split into two teams headed up by Jethro – Director vs Duncan – Project Manager. Jethro’s team consisted of Xavi, Joe and Myles. Duncan’s team consisted of myself, Mimi and Simon.

First Game:

Jethro’s team got off to a good start but was no match for Duncan’s team as Simon and Duncan were getting many strikes and Mimi even managed to get the team some points. Jethro’s team did not get many strikes! Xavi scored some points however and Myles tried hard to hold the team together. Joe was getting points with his own “unique” freestyle bowling technique. Jethro then decided to take a call on his iPhone and bowl at the same time which resulted in vital points lost. End score well is too embarrassing to mention but let’s just say that Duncan’s team thrashed Jethro’s team!

The person with the most points in total was Simon. Winner!!

Second Game:

After a break and with beers and ciders flowing the second game began. Xavi was not best pleased about losing the first game and wants to swap teams but we managed to persuade him that he should stay with his original team and help them…

To win!

So everyone stays with the same teams and begins the second game. Everyone is playing worse than in the first game. What could be the cause of this???  Simon and Myles have a major battle going on between them. Simon was still on good form, as was Duncan. I did terribly in this game but again, Mimi scored some points and helped us out. Joe was so close to getting a strike every time…… but never did. Xavi scored nothing in this game but was trying so hard, bless ‘im and Jethro when focused got some decent scores. But, the final result!!!!!!!!

Well need I say more……..


Final score

Simon won overall in the second game and beat Myles by two points. On fire Simon!!!!!!

So the night ended with more beer, cider and Pizza and a few games of pool.

A fun night had by all……


Like what you see? Then get in touch;
t. +44 (0) 1273 722 544   e. contact us