Apple, China Mobile supposedly reach agreement on 4G iPhone

A story at MarketWatch suggests that Apple and China Mobile have reached a consensus on a 4G iPhone. Unfortunately, China Mobile Chairman Wang Jianzhou was stingy with the details.

Wang noted that negotiations with Apple aren’t complete, and didn’t provide details other than to say that his company and Apple have reached an agreement. China Mobile currently serves 4 million iPhone customers.

Last January, Reuters reported that Apple would support China Mobile’s TD-LTE 4G technology. Apple’s support is a significant boost for China Mobile and could prompt other handset makers to follow Apple’s lead.

[Via MacRumors]

Apple, China Mobile supposedly reach agreement on 4G iPhone originally appeared on TUAW on Thu, 19 May 2011 10:10:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

iPhone location data to be closely regulated in Europe

The fuss over the storage of location data by iOS has crossed international waters. The EU data protection advisory panel, a watchdog group that advises the European Commission, has said that location data is personal data. This ruling may lead to further restrictions limiting how this data may be used by Apple, advertisers and third-party applications.

The panel further recommended that companies need to get permission from smartphone owners before collecting location data and should be clear about how this data is being used. The group also suggests location services should be switched off by default. These proposals may become the early framework for a new law regulating location data in the EU. Eventually, these and other similar proposals could be included in Europe’s broader revised Data Protection Directive later this year.

iPhone location data to be closely regulated in Europe originally appeared on TUAW on Thu, 19 May 2011 09:00:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

TUAW’s Daily iOS App: Casey’s Contraptions

I won’t mince words here: I’ve seen and played a lot of iOS games, and when I first saw Casey’s Contraptions back at GDC this year (which is out today for the first time on the iPad), I thought it was the most impressive iOS game I’d ever seen.

The Incredible Machine is what jumps to mind to describe it, but really, this game is more than that — it’s a full engine of physics gameplay. The idea is that you’re presented with over 70 included puzzles by young Casey, and then you have to solve them with various items, which span everything from punching gloves to darts and RC cars. After that, you can also create your own levels and even share both created levels and solutions around with an incredible social backdrop. The whole app is very impressive — the design is just perfect, there’s a huge number of items to interact and build with, and the social features are really amazing and incorporated seamlessly through email and Game Center.

Seriously, if you own an iPad, Casey’s Contraptions is pretty much a must-have title. There are content and feature updates on the way as well (and if you don’t happen to own Apple’s tablet, there’s also an iPhone version coming soon). Casey’s Contraptions is in the App Store right now for US$2.99.

TUAW’s Daily iOS App: Casey’s Contraptions originally appeared on TUAW on Thu, 19 May 2011 08:00:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

XtremeMac intros InCharge Home/Auto BT charging and wireless solutions

Accessory manufacturer XtremeMac just announced two new products that it’s adding to its growing line of InCharge charging products for iOS devices. The InCharge Home BT (US$79.99) and InCharge Auto BT ($79.99) are chargers that also provide a way to link to stereo equipment in your home or car.

Both of the new InCharge Bluetooth products feature an adapter that plugs into a power source — the 12V adapter for your car, and a wall socket for your home. The adapters also have a wired connection to your car or home stereo system. If you want to charge your iOS device and send music to your sound equipment at the same time, grab your standard USB charging cable and plug it into the USB port on the InCharge.

When the iOS device is fully charged, unplug the USB cable and the InCharge Home or Auto BT acts as a Bluetooth receiver through which you can stream music to your home or auto stereo system. The advantage? You can use your USB cable when you need to charge, or go wireless when you just want to listen to tunes.

The XtremeMac website was showing these two products as “coming soon” as late as Noon EDT yesterday, but they should be available in the near future. We’re hoping to do a hands-on review of the InCharge Home BT once the product is available.

XtremeMac intros InCharge Home/Auto BT charging and wireless solutions originally appeared on TUAW on Thu, 19 May 2011 07:00:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

Today is a useful, lightweight calendar app for the Mac

today second gear softwareToday from Second Gear Software is a lightweight calendar app for the Mac that focuses on simplicity and speed. It’s not an alternative to iCal, but rather a tidy front end. With some configuration, you’ll be using Today to create events, tasks and more, all with custom keyboard shortcuts. I’ve spent a few days using Today. Here is my review.

Note: yesterday I reviewed Fantastical from Flexibits, and tomorrow I’ll post a head-to-head shootout between the two. Don’t miss it. Additionally, I’ll have a brief bonus comparison to Quick Cal from Smelly Puppy. For now, on with the review.

Continue reading Today is a useful, lightweight calendar app for the Mac

Today is a useful, lightweight calendar app for the Mac originally appeared on TUAW on Thu, 19 May 2011 06:00:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

EMI joins Warner Music Group in Apple cloud music service

Sources have told CNET that EMI has signed a deal with Apple to license its music for cloud-based services. EMI joins Warner Music Group, which signed on with Apple for cloud-based music services last month. The remaining two major labels, Sony and Universal, are expected to sign similar deals with Apple as early as next week.

Getting all four major music labels to sign on to a cloud-based service is seen as a serious win and another vote of confidence for Apple’s rumored cloud-based digital distribution services. Amazon and Google both launched cloud-based digital lockers earlier this month, yet neither of those companies have any agreements with the four major music labels. Cloud-based services are rumored to be a big part of iOS 5, and late last month it was revealed that Apple’s digital locker services might be called iCloud after Apple bought the icloud.com domain from a Swedish company.

EMI joins Warner Music Group in Apple cloud music service originally appeared on TUAW on Thu, 19 May 2011 01:00:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

Android App Development:Using Preferences

We saw before that we can persist an application’s data using SQLite database. Android offers another way to store user’s data through using preferences.

Android preferences is a key/value entries that store data that can be specific to a certain activity or shared among all activities within the application.
the data are stored in a xml file within the application folders.

Saving Preferences

We can save preferences in three ways:

  1. Preferences can be retrieved only by a single activity.
  2. Preferences can be shared and retrieved among all activities within the application.
  3. Preferences can be shared and retrieved through all applications on the device.

Saving Activity-level preferences:

To save preferences that are accessed only from a single activity, we do it like this:

SharedPreferences prefs=getPreferences(Context.MODE_PRIVATE);
        SharedPreferences.Editor editor=prefs.edit();
        editor.putString("pref 1", "some text");

        editor.commit();

We get a SharedPreferences object by calling getPreferences(int mode) method which takes an integer value as a parameter, the mode value can be one of the following:

  1. Context.MODE_PRIVATE (0): a file creating mode that makes the created file only accessible by applications with the same user ID (access the file from the same application context, will desctribe later).
  2. Context.MODE_WORLD_READABLE (1): file mode makes the file readable from other applications.
  3. Context.MODE_WORLD_WRITEABLE (2): file mode allows other applications to write to the file.

Then we get an instance of SharedPreferences.Editor and write the preference value with editor.putString(String key, String value) method.
shared preferences allows you to insert preferences using the following methods:

  1. editor.putBoolean(String key, boolean value).
  2. editor.putFloat(String key,float value).
  3. editor.putInt(String key, int value).
  4. editor.putLong(String key, long value)
  5. editor.putString(String key, String value)

Then we call edit.commit() to save the preferences to the file. commit returns a boolean indicating the result of saving, true if successful and false if failed.

Reading preferences values:

To read preferences values:

SharedPreferences prefs=getPreferences(Context.MODE_PRIVATE);
String val=prefs.getString("pref 1", "some text");

We use sharedpreferences.getString(String key, String defaultValue) (or get boolean/float/int) to return the value stored with a specific key or defaultValue if not found.

Saving Application-level preferences:

To save preferences that can be retrieved from all activities in the application we do it like this:

SharedPreferences prefs= getSharedPreferences("demopref", Context.MODE_WORLD_READABLE);
        SharedPreferences.Editor editor=prefs.edit();
        editor.putString("demostring", "hello");
        editor.commit();

Same as the code above, but the difference is that we give our preferences file a name (demopref in this case) so that other activities can reference that preferences file.

Sharing preferences across applications:

We can store preferences in one application and read them in another application, this is done reading the preferences file by loading them through the first application’s context.

Let’s assume we have two applications:

  1. Application 1 with package name “com.mina.prefdemo”.
  2. Application2 with package name “com.mina.demoapp”.

If application1 creates a preferences file with the name “demopref” and inserts a String preference with the key/value “demostring/hello”.
now we access this file and value from application 2 like this:

Context con;
  try {
   con = createPackageContext("com.minasamy.prefdemo", 0);
   SharedPreferences pref=con.getSharedPreferences("demopref", Context.MODE_PRIVATE);
   String x=pref.getString("demostring", "not found");
   txt.setText(x);
  } catch (NameNotFoundException e) {
   Log.e(Tag, e.toString());
  }

Creating Preferences Activities:

Android provides another nice way of presenting and saving preferences. you can create Activities that extend PreferenceActivity.
PreferenceActivity is an activity that displays a set of built-in preferences related widgets that are defined in xml file.

The preference activity can be divided to several PreferenceCategory each containing a set of related preferences.
The preferences widgets that Android provide are:

  1. CheckBoxPreference: displays a check box widget.
  2. EditTextPreference: displays an EditText widget to save user prefs.
  3. RingtonePreference: displays a list with the  ringtones on the device.
  4. ListPreference: displays a list of key/value items.

Each one of these preferences widgets is associated with a preference key. it’s value is persisted instantly as the widget selection changes.
we can construct our preferences screen xml (saved in res/xml directory) layout like this:

<?xml version="1.0" encoding="utf-8"?>
<PreferenceScreen
  xmlns:android="http://schemas.android.com/apk/res/android">
    <PreferenceCategory
    android:title="Catogory one"
    android:summary="sample summary">
        <CheckBoxPreference
         android:title="Enable"
         android:key="pref_enable"
         android:summary="enables a preference"/>
        <EditTextPreference
        android:summary="Edit text prefrence"
        android:title="Edit"
        android:key="pref_edit"/>

    </PreferenceCategory>
    <PreferenceCategory
    android:title="Category2"
    android:summary="sample summary">
        <RingtonePreference
        android:key="pref_ring"
        android:title="Ringtones preference"/>

        <ListPreference
        android:key="pref_list"
        android:title="List Preference"
        android:dialogTitle="List Pref Dialog"
        android:entries="@array/pref_items"
        android:entryValues="@array/pref_items_values"/>
    </PreferenceCategory>

Then from our activity:

public class PrefActivity extends PreferenceActivity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		addPreferencesFromResource(R.xml.prefs);

	}
}

The activity will look like this:

prefs1
prefs2
prefs3
prefs4

The ListPreference can be associated with String array resources as it’s key/value entries

<string-array name="pref_items">
    <item>Item1</item>
    <item>Item2</item>
    <item>Item3</item>
    <item>Item4</item>
    <item>Item5</item>
    </string-array>

    <string-array name="pref_items_values">
    <item>1</item>
    <item>2</item>
    <item>3</item>
    <item>4</item>
    <item>5</item>
    </string-array>

To reference the preference widgets programmatically:

EditTextPreference pref_edit=(EditTextPreference)findPreference("pref_edit");

And that’s was all about Android preferences. stay tuned for another tutorial next week

Open Source: Lightweight And Fast Regular Expressions Library

In the past I have mentioned some excellent libraries from Google for iOS and Mac development which includes a library for regular expressions.

Regular expressions are a topic that I see searched for very frequently on this site, often with words like “too slow” added to the search.  While the NSPredicate class added some limited regular expressions support the performance can be quite dreadful.

If you want faster performance you may want to checkout RegexKitLite.  RegexKitLite allows you to easily use regular expressions  objects while being faster and more lightweight than other solutions.  Unlike the heaver RegexKit RegexKitLite only provides additions to NSString.

You can download RegexKitLite from the RegexKit homepage here (make sure to get the Lite version):
http://regexkit.sourceforge.net/

You can read further details on RegexKitLite here:
http://regexkit.sourceforge.net/RegexKitLite/

If you want an easy drop-in solution for faster regular expressions RegexKitLite could be the solution.

©2011 iPhone, iOS 4, iPad SDK Development Tutorial and Programming Tips. All Rights Reserved.

.

DeliciousTwitterTechnoratiFacebookLinkedInEmail

Tutorial And Tool: Cutscenes With Cocos2D

One of the great things about the Cocos2D game engine is the ability to easily create custom animation sequences with the included  CCAction classes.   Beyond the simple animations seen is most games it is possible to create more complex animations like those seen in cutscenes.

I found an interesting tutorial today that does just that using the CCAction class along with a customized tool for developing keyframed animations.  The developers, Crocodella have also been nice enough to include a version of their own internal tool for creating cutscenes with Cocos2D.

You can find the tutorial along with a special version of the tool on their website here:
Leveraging Cocos2D Actions For Cutscenes

Overall looks like a great little tool and approach for creating cutscenes.  The editor is limited to 30 seconds of animation, but is cool nontheless.

 

©2011 iPhone, iOS 4, iPad SDK Development Tutorial and Programming Tips. All Rights Reserved.

.

DeliciousTwitterTechnoratiFacebookLinkedInEmail

How to Put an iPhone Into DFU Mode

To put the iPhone into DFU mode so you can do an iTunes firmware restore follow these steps:

Step One
Open iTunes and connect the iPhone to your Mac.

Step Two
Press and hold the Home button and the Sleep/Wake button at the same time.

Step Three
After exactly 10 seconds release the Sleep/Wake button. Continue holding the home button until you iTunes pops up a message telling you that it has detected an iPhone in recovery mode.

via How to Put an iPhone Into DFU Mode

ImageLoad from Server in iPhone

In this application we will see how to image fetch from the server and place it to the view. I will show you the easiest way for image fetch from server. So let see how it will work.

Step 1: Open the Xcode, Create a new project using Window base application. Give the application “imageLoad”.

Step 2: Xcode automatically creates the directory structure and adds essential frameworks to it. You can explore the directory structure to check out the content of the directory.

Step 3: We need to add one ViewController class in the project. So select the project -> New File -> Cocoa Touch ->ViewController class and give the class name “ImageLoadFromServer”.

Step 4: Open the ImageLoadAppDelegate.h file, we need to define ImageLoadFromServer class and create an instance of ImageLoadFromServer class. So make the following changes in the file.

#import <UIKit/UIKit.h>
@class ImageLoadFromServer;

@interface ImageLoadAppDelegate : NSObject  {
ImageLoadFromServer *imageLoadFromServer;
}
@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet ImageLoadFromServer *imageLoadFromServer;

@end

Step 5: Now make the following changes in the ImageLoadAppDelegate.m file.

#import "ImageLoadAppDelegate.h"
#import "ImageLoadFromServer.h"

@implementation ImageLoadAppDelegate

@synthesize window=_window;
@synthesize imageLoadFromServer;

(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{

imageLoadFromServer = [[ImageLoadFromServer alloc] init];
[_window addSubview:imageLoadFromServer.view];
[self.window makeKeyAndVisible];
return YES;
}

(void)applicationWillResignActive:(UIApplication *)application
{

}

(void)applicationDidEnterBackground:(UIApplication *)application
{

}

(void)applicationWillEnterForeground:(UIApplication *)application
{

}

(void)applicationDidBecomeActive:(UIApplication *)application
{

}

(void)applicationWillTerminate:(UIApplication *)application
{

}

(void)dealloc
{
[_window release];
[super dealloc];
}

@end

Step 6:  Open the ImageLoadFromServer.h file and create an instance of UIImageView. So make the following changes in the file:

#import <UIKit/UIKit.h>

@interface ImageLoadFromServer : UIViewController {

UIImageView *imageLoad;

}
@property (nonatomic, retain) IBOutlet UIImageView *imageLoad;
@end

Step 7: In the ImageLoadFromServer.m file make the following changes:

#import "ImageLoadFromServer.h"
@implementation ImageLoadFromServer
@synthesize imageLoad;

(id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {

}

return self;
}

(void)dealloc
{
[imageLoad release];
[super dealloc];
}

(void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
}

#pragma mark – View lifecycle

(void)viewDidLoad
{
[super viewDidLoad];

NSURL *imageurl = [NSURL URLWithString:@"http://www.chakrainteractive.com/mob/ImageUpoad/pic2-2.png"];
NSData *imagedata = [[NSData alloc]initWithContentsOfURL:imageurl];
UIImage *image = [UIImage imageWithData: imagedata];
imageLoad = [[UIImageView alloc] initWithImage: image];

[self.view addSubview:imageLoad];

}

(void)viewDidUnload
{
[super viewDidUnload];
}

(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

@end

Step 8: Now compile and run the application in the Simulator.

You can Download SourceCode from here ImageLoad

New phishing email pretends to be from Apple’s online store

We’ve received several reports today of an email making the rounds that’s very likely a phishing scam. The message content is cleverly designed to look like it’s coming from the Apple Store, and clicking on any of the links will take you to a website that’s even superficially similar to Apple’s online store.

If you get this email, don’t buy anything from its associated website, as there are a few dead giveaways to the inauthenticity of the message. First, the message sender will come up as a random string of characters followed by @live.com. All messages from the Apple Store should have apple.com at the end, and nothing else. The URL that you’re directed to if you click anything in the message will eventually resolve to appledownload.com instead of the proper URL, store.apple.com, and you’ll find a website that looks sort of like Apple’s storefront but is focused seemingly exclusively on software sales.

The “about” section on the site is written in quite broken English and claims the business is based in San Francisco. However, a simple WhoIs lookup shows that the site is registered to “Lyubov Bushmakina” in St. Petersburg, Russia. If that’s not a red flag, I don’t know what is.

Bottom line: don’t buy anything from this site if you’re the least bit paranoid of being defrauded. There’s a slim chance the site may be a legitimate software outlet, but by “slim chance” I really mean “snowball’s chance on the surface of Venus.” Always be wary of emails like this that offer to sell you stuff, especially if there’s telltale signs it’s not coming from who you think it is at first glance.

New phishing email pretends to be from Apple’s online store originally appeared on TUAW on Wed, 18 May 2011 23:30:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

Apple setting up another data center in Silicon Valley

We haven’t even officially been told what’s up with the data center in North Carolina, but apparently Apple wants more — the company is also setting up another new data center much closer to home in Silicon Valley. The 11,000 square foot setup is smaller than the big complex in North Carolina, which is said to be over 500,000 square feet (with about a fifth of that as actual server space). But the Silicon Valley center will still be pulling its own load when the 2.2 megawatts of critical power load comes online in September of this year. Apple is leasing the space wholesale from a company called DuPont Fabros, and it’s not a stretch to think that if Apple needs more data center capacity very soon, DuPont Fabros will be more than happy to provide it.

This one is located in Santa Clara, CA, and here’s an interesting tidbit: There are a lot of data centers in that neck of the woods because the local power provider, Silicon Valley Power, offers relatively cheaper rates than Pacific Gas and Electric Company nearby. Hopefully we’ll hear what all of this data center space is for soon — WWDC is just around the corner.

Apple setting up another data center in Silicon Valley originally appeared on TUAW on Wed, 18 May 2011 21:00:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

Playboy archives coming to iPad tomorrow

If you’ve been waiting for those Playboy archives ever since we heard about them in January, the wait is almost over. App Advice says the web app containing all back issues of the famously controversial gentleman’s magazine will finally be ready to go on the iPad tomorrow, for a subscription price of $8 a month, of course. Back in March, an iPad app was released, but it’s since disappeared from the App Store, perhaps because of Apple’s restrictions on adult content there. Of course, the web app has no such restrictions, so interested subscribers will be able to browse all of Playboy’s 50-plus years of content.

We’re just reading it for the articles, of course. But if this flies with consumers, we may see more publications going with a web-based content service occasionally, rather than depending on the Apple App Store to deliver archived content.

Playboy archives coming to iPad tomorrow originally appeared on TUAW on Wed, 18 May 2011 20:35:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

4th and Battery’s second game is Candy Train

All right, so maybe Unpleasant Horse wasn’t quite the success that 4th and Battery would have liked to kick the new PopCap sub-studio off with, but that’s kind of the point — the idea of 4th and Battery is for the company to experiment a little more, rather than having every single game they release live up to the PopCap reputation. And that means faster releases as well — the company’s second game is due out on the App Store this week, and it’s called Candy Train.

This is actually an older game — it was originally released as a Flash title on PopCap’s website and pulled soon after, to players’ chagrin. But a few developers decided to revamp it for iOS, and it’s coming to the App Store as a free download. The idea, as you can see above, is that you need to rotate small pieces of track to keep a train running, and it seems fun enough.

4th and Battery also has a third game on tap, which will also be free, and we’re supposed to see it later on sometime this summer. Exciting!

4th and Battery’s second game is Candy Train originally appeared on TUAW on Wed, 18 May 2011 18:30:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments