TUAW’s Daily Mac App: DeepFocus

DeepFocus

When you’re in a noisy environment, such as a café or study room, or even when there’s just the odd sound to distract you in a room of silence, concentrating can be difficult. You could play some music, but often music can be just as distracting as the background noise, especially when you’re trying to put words down on a page. DeepFocus, a US$1.99 app available from the Mac App Store, aims to solve the problem without music, allowing you to concentrate without aural distractions.

It does this by creating a wall of sound, generating random sound patterns defined by a set soundscape or theme, overlaid on white noise. The white noise helps to block out background sounds, while the soundscape gives you just enough (but not too much) to focus on, allowing you to concentrate.

The app comes packing eight different soundscapes for you to choose from, with themes like the seaside to the urban landscape. You first select a soundscape from the menu bar and click ‘Enter DeepFocus!’ Headphones are, of course, a must, and a good set of sound isolators or noise-cancelling headphones will definitely enhance the experience. The white noise works to some extent, but you will still be able to hear a modicum of what’s happening around you.

Both the white noise background volume and the ‘auralscape’ volume can be independently controlled to taste, while an option for a ‘Low level noise mask’ is also present. A timer is included in the menu bar, showing you how long you’ve been in ‘DeepFocus,’ but thankfully, it can be turned off.

If you have trouble concentrating in a noisy environment, or even in a relatively quiet one, DeepFocus could be the answer if, like me, you can’t get by with music alone.

TUAW’s Daily Mac App: DeepFocus originally appeared on TUAW on Thu, 19 May 2011 15:00:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

Apple’s cloud music service could address buffering with local files

A patent has emerged that shows how Apple could address the buffering lag time that is a frequent bane to streaming media users. In the patent, Apple describes storing just small segments of media files locally on a user’s device. These segments would be the beginning of a song, for example, and would begin to play immediately while the device buffers the rest of the song from the cloud servers. Using this method, there would be no lag time between when a user taps on a song to play it on his iPhone and when the song actually begins to play.

Current cloud services often feature a noticeable lag time between when a user selects a song and when it begins to play, since the entire file is stored remotely. This patent is important given the rumor that Apple is soon to launch a cloud-based digital music service. If Apple implements this local file snippet feature into its service, it would be a significant advantage to the usability and quality of its service over rivals like Amazon and Google.

Apple’s cloud music service could address buffering with local files originally appeared on TUAW on Thu, 19 May 2011 14:30:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

Yahoo! Messenger lets iPad 2 owners video chat with PCs

Yahoo!

Yahoo! rolled out a new Messenger app for iOS that includes support for the iPad 2. The tablet-optimized app will let you make voice and video calls using the front-facing camera. Yahoo! Messenger has a wide install base, and you will be able to make video calls to any device with a camera and a compatible version of the messaging app. Besides video calling, Yahoo! Messenger will also send SMS messages for free. The SMS feature is a quick way to message to a friend, but you have to remember these messages come from your Yahoo! account, not your mobile phone number.

Yahoo! Messenger lets iPad 2 owners video chat with PCs originally appeared on TUAW on Thu, 19 May 2011 13:30:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

MacDefender malware protection and removal guide

macdefender splash screen

Screenshot thanks to @jaythenerd

The MacDefender malware has been causing trouble for Mac users all over the world; people are calling Apple Support in a panic, spending time visiting their local Apple Store Genius, and getting all stressed out about it. What’s worse: the malware is mostly harmless. It’s a scam trying to rip off your credit card number, not hurt your Mac.

The attack, which displays a message stating that your machine has been infected with viruses that only a “MacDefender” app can remove, has been spreading rapidly. MacDefender doesn’t infect Macs with a virus, nor does it run a keylogger as a background process on your machine. It’s simply trying to scare users into providing credit card information by registering an unneeded piece of software. MacSecurity and MacProtector are the same scam software, differing in name only.

It’s been reported by ZDNet’s Ed Bott that Apple is telling support reps not to assist with removing this malware. You’re on your own, but TUAW is here to help you. Read more to find out how to protect yourself from MacDefender, what a MacDefender attack looks like, and how to remove the app if it is installed on your Mac.

Continue reading MacDefender malware protection and removal guide

MacDefender malware protection and removal guide originally appeared on TUAW on Thu, 19 May 2011 12:30:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

Happy 10th anniversary Apple Stores

Today marks the 10th anniversary of Apple’s retail stores. On May 19, 2001 the very first store opened in McLean, Virginia, followed later that same day by a store in Glendale, California. Even though the McLean store opened first, the Glendale store carries the designation “001,” causing a bit of controversy among statistics-friendly nerds.

Today the number of Apple Stores has grown to over 300 around the world, as our unofficial retrospective illustrates. Earlier this week, rumors suggested that Apple’s got something special planned to mark the anniversary, though we haven’t seen anything official yet.

Congratulations to Apple on this achievement. Here’s to 10 more successful years.

Happy 10th anniversary Apple Stores originally appeared on TUAW on Thu, 19 May 2011 11:30:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

Apple helping to shape Intel’s future

Intel Senior Vice president Tom Kilroy revealed that Intel is working closely with Apple on future products. This relationship is so cozy that Kilroy claims Apple even “helps shape our roadmap.” Apple is an attractive customer for Intel as the Cupertino company is often regarded as forward-thinking and an influencer.

You only need to look at the recent quarterly estimates for the PC industry to see why Intel is interested in working so closely with Apple. The Cupertino company only holds a 9.3 percent market share, but its PC sales are growing while its rivals are slumping.

Apple and Intel have a proven working relationship. The two companies developed Thunderbolt, which could replace USB as the new standard for I/O technology.

Apple helping to shape Intel’s future originally appeared on TUAW on Thu, 19 May 2011 11:00:00 EST. Please see our terms for use of feeds.

Source | Permalink | Email this | Comments

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