Showing posts with label Free Mobile Development Tips and Tricks. Show all posts
Showing posts with label Free Mobile Development Tips and Tricks. Show all posts

Wednesday, July 27, 2011

Beginning Android Application Development now rank #1 in Amazon.com's Software Development category

My Beginning Android Application Development book is now ranked #1 in Amazon.com's Software Development category!

If you want to jumpstart your Android development effort, check out my book!

Thanks everyone for the support!

iOS Chat Application using Bonjour

A number of readers have asked where can they find the Bonjour Chat application that was mentioned in my Beginning iOS 4 Application Development book by Wrox. It is part of the code download for the book. To download the source code, head over to here. Go to the Chapter for Bonjour and the project contains all the code for Bonjour chatting! Enjoy!

Tuesday, July 26, 2011

Android Article - Preserving User Preferences in Android Applications

Often you need to store personalized information for each user of your application. For example, your application may require users to logon to a secure server for authentication. In this case, the user needs to supply his credentials, such as a login name and a password. The first time the user uses your application this information will be entered by the user, but subsequently it would be useful for your application to “remember” this information somewhere so that it can save the user the trouble of entering the same information every time he uses your application. To save this information, there are a couple of ways you could use – files, databases, etc. However, a much better way would be to use the SharedPreferences feature in Android. In this article, I will walk you through the steps to creating an Android application that makes use of this SharedPreferences feature.

Friday, July 08, 2011

Objective-C Memory Management Tip 1 - Remember to retain item(s) retrieved from an array

Very often in Objective-C, you have an array that contains a number of objects, like this:

NSMutableArray *array = [[NSMutableArray alloc] init];
[array addObject:@"Item 1"];
[array addObject:@"Item 2"];
[array addObject:@"Item 3"];

And often, you need to retrieve an object from the array and then assign it to another object, like this:
NSString *item = [array objectAtIndex:1];
However, the statement above is not safe as the object can be removed any time, like this:

NSString *item = [array objectAtIndex:1];
[array removeObjectAtIndex:1];

In this case, the item is no longer pointing to a valid memory location. You should instead use a retain on the object that is assigned to the object from the array:

NSString *item = [[array objectAtIndex:1] retain];
[array removeObjectAtIndex:1];
Doing so will ensure that even if the object in the array is removed, the object pointing to it will still remain valid.

In short, remember to retain item(s) retrieved from an array.

Monday, July 04, 2011

My new eBook published - Building Applications for the Mac App Store

My new eBook has just been released at Wrox.com - "Building Applications for the Mac App Store". Here is a brief synopsis of the book:

In this Wrox Blox, you will learn how to obtain and access the Mac App Store from your Mac. You will also learn about the opportunities available for developers who want to venture into the Mac market. This Wrox Blox also walks you through the steps you need to perform to publish your apps in the Mac App Store. You will use the Xcode 4 development tool provided by Apple to develop a Mac OS X application, and then see how it can be published in the Mac App Store.

Wednesday, December 19, 2007

Tip: Missing controls in Toolbox - Visual Studio 2008

I encountered a problem today when I uninstalled my Visual Studio 2008 Beta 2 and then installed the RTM version of Visual Studio 2008 Professional.

When I created a Windows Mobile project, the controls in Toolbox were missing. In place of the usual controls is a tab labelled "#13119". The usual remedy of right-clicking the Toolbox and then selecting Reset Toolbox did not help.

After some searching of Visual Studio folders, I finally found the solution. You need to navigate to the following folder:

C:\Documents and Settings\\Local Settings\Application Data\Microsoft\VisualStudio\9.0

And within this folder are some hidden files. Simply remove the following files:

"toolbox.tbd", "toolboxIndex.tbd", "toolbox_reset.tbd", "toolboxIndex_reset.tbd"

Then restart Visual Studio 2008. Your controls should now come back up! ;-)

Click here for more mobile development tutorials!