BBM Music change in strategy August 31, 2011
Posted by henrychin in Uncategorized.add a comment
Music Industry
RIM recently announced a new cloud service to lure music enthusiast to use BlackBerry mobile devices. In part this is an attempt by music industry to make up for lost revenues. Current trends for CD sales are down ~13% as mentioned in article from artistpr.com website. People are opting to go with direct streaming services such as Pandora, Spotify and iTunes. Not to mention another announcement by Facebook looking to also get into social music as a move to create communities of music lovers. The music industry deals with service providers represent new channel to market for the big players in music since they do not have the capabilities to create such services.
BBM Music Service Comparison
The new music service offer by RIM provides $4.99/month allowing up to 50 songs. The one advantage is the people can listen to friends music as well. So in theory the more friends I have that use the BBM Music service the more songs I can listen, leading to a network of music, potentially up to 50 x N friends of music. Does not appear to be any limit on number of friends to listen music from. This presents a social networking environment targeting some of the more younger generation. For young people this is a great service to start off with especially if you have a large social network of friends to share with. Recent trends in BlackBerry OS show demographics changing towards younger generation as shown from comScore diagram.

RIMs Drive for Younger Users
BBM Music service will have serious issues when competing against music enthusiast who already have a stockpile of music (1000′s songs). Service offered by Amazon looks more appealing giving people access to thousands of songs for just $5/year. While iTunes is providing a matching service that does not require uploading your songs, if the same song exists in iTunes then people have access to the same song even if the sound quality is better for just $25/year.
I do not want to rain down on RIM (considering they are canadian, hey!), certainly a good attempt to lock in younger generation with limit cash to spend. But as the user grows and wants to expand their music collection this will be difficult considering the 50 song limit. From the get go this service will be under tough competition, but I do see some possibilities for RIM to expand the service by providing incentives to link other BBM services together with music. Another crazy idea to promote social music is by increasing monthly song limit base on number of social music friends in your network. So for example say I like top 40, pop, rock and jazz categories. By creating a social network of friends that exceed 20 friends I would get 5 more songs allowed in my monthly limit. Doubling this to 40 friends gives 10 more songs, get it. Only time will tell, but hopefully this service will improve over time.
Android becoming more like Apple iOS or is it August 15, 2011
Posted by henrychin in Google, Mobile Communication, Motorola.add a comment
Google Ups The Ante
Google will buy Motorola Mobility for $2.5B pending regulatory approval. Interesting move by Google, I guess they realized the benefits that Apple was doing by providing specialized software for dedicated mobile handsets. By taking advantage of the tight integration between both hardware and software can lead to more enrich user experience. This has certainly been the way of Apple and now that Google now has this ability consumers will reap the benefits. This places Google and Apple on similar playing field, now if Microsoft and Nokia can get something going then we can truly see a three horse race. Though do not discount RIM out the picture just yet. Their QNX operating system has the potential but I truly thing they are at least 6 to 9 months away from making this happen on their blackberry devices.
Google now has the ability to marry Android OS with Motorola handsets, something that Google has lacked since the beginning of Android. Google tried with Nexus One by partnering with HTC, but this was a flop (http://techchunks.com/technology/the-nexus-one-is-a-flop-135000-phones-sold-in-74-days/). Google had very little control over the design and the ability to marry Android custom features in with the phone was not possible.
Patent Fight
A key driver for buying Motorola Mobility is the recent fight for intellectual assets. There is certainly interest from all high-tech companies to protect what they have, but more and more companies are using it as a strategic advantage (i.e. offence) over their competitors. This is especially noticeable with Apple when it comes to protecting their brand and related look and feel consumers get when holding an Apple product. By getting a hold of such patents, Google now has the ability to enforce their own look and feel that is unique to Android. Something that will differiate Google phones from Apple phones.
Some speculate if Google would of bought Motorola Mobility if they did not lose the bidding for Notel patents. Recent weeks has showed considerable interest in Interdigital patents, considering they have 8,800 issued patents and over 10,000 in the pipe. Apple now owns Nortel patents (mostly communication related), forces Google hand to buy Motorola Mobility in order to beef up their patent fight. Interesting how Motorola was able to in few short years able to issue over 17,000 patents and 7,500 pending patents. Could be that Motorola strategy was to sell off their division all along. Especially, since Motorola just announced $56 M Q2 loss (http://www.engadget.com/2011/07/28/motorola-mobility-reports-56-million-net-loss-in-q2-3-3-billi/).
Cost of Buying Earlier
Arstechnica has an interesting article on what if scenario of Google buying Motorola unit back in 2010 (http://arstechnica.com/tech-policy/news/2011/08/what-google-lostand-gainedby-not-buying-moto-in-2010.ars). Basically, Google could of saved $6B if they had bought out MM earlier. Not to mention saving even more money with the failed Nexus One phone. Oh well live and learn, but now Google embarks on new journey that involves both hardware and software. Something they have little experience with.
Post Motorola Dilema
Here is an interesting article from visionmobile that talks about the different business models of Google and Motorola and the apparent reasoning for buying Motorola was mostly for the patents. Another interesting point about the article is the control Google will have over OEM vendors in terms of software dictatorship and compliance towards the Google Android way. Kind of reminds me of how Apple has total control over their value chain and the strict requirements.
Update
It appears Google overpaid for Motorola due to the interest in IP rights. SEC filings show initial offer at $30 but quickly moved to $43.50 over concerns of competing bids.
iOS 2D Drawing App using Quartz 2D August 9, 2011
Posted by henrychin in ipad app.Tags: draw, graphics, iOS, iPhone, mobile, objective-c, Quartz 2D
add a comment
iOS has a colossal list of frameworks and APIs to help developers create amazing apps. In particular Quartz 2D provides the basis for any drawing application. Some of the features offered by Quartz 2D include path-based drawing, painting with transparency, shading and drawing shadows just to name of few. Check apple documentation in XCode Organizer or on Apple developer website (http://developer.apple.com/library/ios/navigation/) and search for Quartz 2D. I was curious about how 2D drawing works using Quartz 2D and so I decided to use developers favourite tool, “Google” to find sample apps that demonstrate drawing basic shapes such as rectangle, ellipse and lines using iOS device (iPhone / iPad). If you ever tried OmniGraffle on iPad then a much simpler version. Google’s quick response showed an endlist selection of websites but nothing interesting or worthwhile. So I decided to embark on creating a demo app that can draw basic shapes. I am going to dispense with pleasantry and assume that you have basic knowledge of Objective-C and C programming language. You should be pretty comfortable with XCode, I am using the latest XCode 4 and iPhone v4.1 and iPad v4.3 release.
Step 1
Create a new XCode project by selecting File->New->New Project. Which should bring up template window that shows various templates to choose from. Select View Based Application and press next button. Next enter product name, company identifier and select iPad for Device Family.
By default SampleDrawApp folder contains three sets of files. The first set is SampleDrawAppDelegate files that include header (.h) and source (.m) files. Next is the controller files (SampleDrawAppViewController) including nib file. Finally is the MainWindow.xib file to round out the files in this folder.
Step 2
Create canvas class to allow 2D draw objects to be drawn on. This class will serve as the main UIView that will allow sub-views to add/remove draw objects later on. In addition, this class will be used to link ViewController with custom UIView class (i.e. Canvas). To create a new class first select SampleDrawApp folder in the left-hand pane. From main menu select File -> New -> New File menu item. Dialog box will appear, select Objective-C Class icon. Two files will be automatically created, Canvas.h and Canvas.m. Modify Canvas.h to include three new properties called origin, width and height. Make sure to synthesize the properties in corresponding class file. Here is what it should look like. Canvas.h
#import @interface Canvas : UIView {
CGPoint origin; CGFloat width; CGFloat height;
}
@property (nonatomic, assign) CGPoint origin;
@property (nonatomic, assign) CGFloat width;
@property (nonatomic, assign) CGFloat height;
@end
Canvas.m
#import "Canvas.h"
@implementation Canvas
@synthesize origin;
@synthesize width;
@synthesize height;
- (id)initWithFrame:(CGRect)frame {
self = [super initWithFrame:frame];
return self;
}
/* // Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect { // Drawing code
} */
- (void)dealloc { [super dealloc]; } @end
Next link SampleDrawAppViewController.xib file to Canvas custom class by selecting the xib file to bring up Interface Builder. Select Canvas view and bring up Identify Inspector pane. Under Custom Class select Canvas and save the file. Now comes the interesting part where we make changes to Canvas.m to support drawing 2D objects.
Step 3
Add initWithCoder method instead of initWithFrame method when initializing a UIView class from xib file. Normally, you would overwrite initWithFrame, but this is a special case where xib file is creating the UIView. Set default properties for origin, width and height to look something like this.
- (id) initWithCoder:(NSCoder *)aDecoder {
self = [super initWithCoder:aDecoder];
if (self) {
NSLog(@"initWithCoder");
self.origin = CGPointMake(0,0);
self.width = 0; self.height = 0;
}
return self;
}
Step 4
drawRect() method is the main callback that enables the app to draw custom drawing on user interface. In order to draw the app uses Core Graphics API to perform a lot of the drawing. To start off, the CGContextRef is used to provide a context for drawing. Therefore any drawing must pass along CGContextRef object. Before we can draw anything, we need to get acces to the context to begin with. By default Core Graphics will instantiate an instance of this object before calling drawRect method. This allows the code to call UIGraphicsGetCurrentContext() to retrieve the context. Note, calling this method from within another method (other than drawRect) will cause UIGraphicsGetCurrentContext() to return nil instance. To see a line on the screen you need to set the line width by calling CGContextSetLineWidth(context, 2.0). This creates a line of width 2 pixels wide. The default color for any line is black so setting the color will be helpful visually. Use the command CGContextSetStrokeColorWithColor(context, [UIColor blueColor].CGColor);to change to color to blue. Next create CGRect object to store origin, width and height information. Here is what it should look like:
- (void)drawRect:(CGRect)rect {
NSLog(@"drawRec"); // Get current context
CGContextRef context = UIGraphicsGetCurrentContext();
// Set line width
CGContextSetLineWidth(context, 2.0);
// Set color
CGContextSetStrokeColorWithColor(context, [UIColor blueColor].CGColor);
// Create rectangle co-ordinates to draw
CGRect rectangle = CGRectMake(self.origin.x,self.origin.y,self.width,self.height);
if (self.width != 0 && self.height != 0) {
[Canvas drawRectangle:context useDimension:rectangle];
}
}
Ignore the method call for drawRectangle for now, I will talk about this in the next step.
Step 5
drawRectangle method takes CGRect information and draws a simple rectangle using Core Graphics. To draw a rectangle use CGContextAddRect method. To add some visual appeal fill the rectangle with red color like this:
+ (void) drawRectangle:(CGContextRef)context useDimension:(CGRect)rectangle {
NSLog(@"drawRectangle");
CGContextAddRect(context, rectangle);
CGContextStrokePath(context);
CGContextSetFillColorWithColor(context, [UIColor redColor].CGColor); CGContextFillRect(context, rectangle);
}
Notice that this method is define as a class method so make sure to add method definition in the interface file.
Step 6
Next step involves implementing UIResponder touch methods to process when a user touch the screen and how user interface should respond. Here is the code for now, I will explain the content in more details later.
// touch gesture has begun, collect touch point
- (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
UITouch *touch = [[event allTouches] anyObject];
self.origin = [touch locationInView:touch.view];
self.width = 0;
self.height = 0;
NSLog(@"xOrigin=%f, yOrigin=%f", self.origin.x, self.origin.y);
}
// touch gesture movement detected, set width and height measurements
- (void) touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event { // get current X,Y co-ordinates
UITouch *touch = [[event allTouches] anyObject];
CGPoint offset = [touch locationInView:touch.view];
self.width = offset.x - self.origin.x;
self.height = offset.y - self.origin.y;
// update display to dynamically show object being drawn
[self setNeedsDisplay];
}
// touch gesture ended, finalize any drawings details
- (void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { // store co-ordinates in drawObject for display for drawRect method
if (self.width != 0 && self.height != 0) {
// add object to canvas for display
self.width = 0;
self.height = 0;
// update display
[self setNeedsDisplay];
}
}
// touch gesture canceled
- (void) touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event{
// NSLog(@">>>touchesCancelled");
}
Step 7
Run the app and see what it does. When you run the app tap and drag and you will see a red rectangle being drawn. When you let go notice how the image disappears. Well this is because the image is not being stored as a UIView subview to the Canvas. More on this later.
