Changes to the SecretKeyFactory API in Android 4.4

random_droid


In order to encrypt data, you need two things: some data to encrypt and an encryption key. The encryption key is typically a 128- or 256-bit integer. However, most people would rather use a short passphrase instead of a remembering a 78-digit number, so Android provides a way to generate an encryption key from ASCII text inside of javax.crypto.SecretKeyFactory.



Beginning with Android 4.4 KitKat, we’ve made a subtle change to the behavior of SecretKeyFactory. This change may break some applications that use symmetric encryption and meet all of the following conditions:




  1. Use SecretKeyFactory to generate symmetric keys, and

  2. Use PBKDF2WithHmacSHA1 as their key generation algorithm for SecretKeyFactory, and

  3. Allow Unicode input for passphrases



Specifically, PBKDF2WithHmacSHA1 only looks at the lower 8 bits of Java characters in passphrases on devices running Android 4.3 or below. Beginning with Android 4.4, we have changed this implementation to use all available bits in Unicode characters, in compliance with recommendations in PCKS #5.



Users using only ASCII characters in passphrases will see no difference. However, passphrases using higher-order Unicode characters will result in a different key being generated on devices running Android 4.4 and later.



For backward compatibility, we have added a new key generation algorithm which preserves the old behavior: PBKDF2WithHmacSHA1And8bit. Applications that need to preserve compatibility with older platform versions (pre API 19) and meet the conditions above can make use of this code:



import android.os.Build;

SecretKeyFactory factory;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) {
// Use compatibility key factory -- only uses lower 8-bits of passphrase chars
factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1And8bit");
} else {
// Traditional key factory. Will use lower 8-bits of passphrase chars on
// older Android versions (API level 18 and lower) and all available bits
// on KitKat and newer (API level 19 and higher).
factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1");
}



New Tools to Take Your Games to the Next Level


In this mobile world, games aren't just for the hardcore MMOG fan anymore, they're for everyone; in fact, three out of four people with an Android phone or tablet play games. If you're a game developer, Google has a host of tools available for you to help take your game to the next level, including Google Play game services, which let's you leverage Google's strength in mobile and cloud services so you can focus on building compelling game experiences for your users. Today, we're adding more tools to your gaming toolbox, like the open sourcing of a 2D physics library, as well as new features to the Google Play game services offering, like a plug-in for Unity.



LiquidFun, a rigid-body physics library with fluid simulation



First, we are announcing the open-source release of LiquidFun, a new C++ 2D physics library that makes it easier for developers to add realistic physics to their games.



Based on Box2D, LiquidFun features particle-based fluid simulation. Game developers can use it for new game mechanics and add realistic physics to game play. Designers can use the library to create beautiful fluid interactive experiences.



The video clip below shows a circular body falling into a viscous fluid using LiquidFun.





The LiquidFun library is written in C++, so any platform that has a C++ compiler can benefit from it. To help with this, we have provided a method to build the LiquidFun library, example applications, and unit tests for Android, Linux, OSX and Windows.



We’re looking forward to seeing what you’ll do with LiquidFun and we want to hear from you about how we can make this even better! Download the latest release from our LiquidFun project page on GitHub and join our discussion list!



Google Play Games plug-in for Unity



If you are a game developer using Unity, the cross-platform game engine from Unity Technologies, you can now more easily integrate game services using a new Google Play Games plug-in for Unity. This initial version of the plug-in supports sign-in, achievements, leaderboards and cloud save on Android and iOS. You can download the plug-in from the Play Games project page on GitHub, along with documentation and sample code.



New categories for games in Google Play



New game categories are coming to the Play Store in February 2014, such as Simulation, Role Playing, and Educational! Developers can now use the Google Play Developer Console to choose a new category for their apps if the Application Type is “Games”. The New Category field in the Store Listing will set the future category for your game. This will not change the category of your game on Google Play until the new categories go live in February 2014.




Bring Your Apps into the Classroom, with Google Play for Education

Posted by Shazia Makhdumi, Head of Strategic EDU Partnerships, Google Play team


Google Play for Education has officially launched. It’s an extension of Google Play that’s designed for schools, simplifying discovery of educational apps and enabling developers and content providers to reach K-12 educators in the U.S. It offers bulk purchasing with purchase orders and instant distribution of educational apps, videos and other educational content to students' Android tablets via the cloud. Google Play for Education helps your apps gain visibility with the right audiences, without having to knock on school doors.





If you've built an Android app that would be awesome for schools—or even have an idea for one—now's the time to jump in. We'll put you one click away from getting purchased and installed by entire school districts. Class Dojo, Explain Everything, Nearpod, and Socrative are already getting discovered in Google Play for Education.



How to join Google Play for Education


If you already have an educational Android app you can use the Google Play Developer Console to mark your apps for inclusion in Google Play for Education. Marking your app identifies it as suitable for the US K-12 educational market and queues it for educator approval. These educators perform a first-pass qualification of apps, assigning the appropriate subject, grade, and common core standards metadata, while evaluating if the app meets the Google Play for Education criteria for classroom use.



Designing great apps for classrooms


High quality apps are top priority for teachers. Whether you already have an existing K-12 educational app or are looking to build one, take a look at our detailed requirements and guidelines—which we have compiled for you based on educator feedback—to ensure your app is appropriate for a K-12 environment. Also ensure that your app is optimized for both 7” and 10” Android tablets. Then, upload your new or updated app through the Developer Console, opt in to Google Play for Education, and publish. We will email you when your app has been evaluated.



For more information, please visit the Google Play for Education pages on the Android developer site. We are excited to be supporting schools to bring the best content and tools to their students. We look forward to seeing your app on Google Play for Education.













App Translation Service Now Available to All Developers

Posted by Ellie Powers, Google Play team



Today we are happy to announce that the App Translation Service, previewed in May at Google I/O, is now available to all developers. Every day, more than 1.5 million new Android phones and tablets around the world are turned on for the first time. Each newly activated Android device is an opportunity for you as a developer to gain a new user, but frequently, that user speaks a different language from you.



To help developers reach users in other languages, we launched the App Translation Service, which allows developers to purchase professional app translations through the Google Play Developer Console. This is part of a toolbox of localization features you can (and should!) take advantage of as you distribute your app around the world through Google Play.



We were happy to see that many developers expressed interest in the App Translation Service pilot program, and it has been well received by those who have participated so far, with many repeat customers.



Here are several examples from developers who participated in the App Translation Service pilot program: the developers of Zombie Ragdoll used this tool to launch their new game simultaneously in 20 languages in August 2013. When they combined app translation with local marketing campaigns, they found that 80% of their installs came from non-English-language users. Dating app SayHi Chat expanded into 13 additional languages using the App Translation Service. They saw 120% install growth in localized markets and improved user reviews of the professionally translated UI. The developer of card game G4A Indian Rummy found that the App Translation Service was easier to use than their previous translation methods, and saw a 300% increase with user engagement in localized apps. You can read more about these developers’ experiences with the App Translation Service in Developer Stories: Localization in Google Play.



To use the App Translation Service, you’ll want to first read the localization checklist. You’ll need to get your APK ready for translation, and select the languages to target for translation. If you’re unsure about which languages to select, Google Play can help you identify opportunities. First, review the Statistics section in the Developer Console to see where your app has users already. Does your app have a lot of installs in a certain country where you haven’t localized to their language? Are apps like yours popular in a country where your app isn’t available yet? Next, go to the Optimization Tips section in the Developer Console to make sure your APK, store listing, and graphics are consistently translated.







You’ll find the App Translation Service in the Developer Console at the bottom of the APK section — you can start a new translation or manage an existing translation here. You’ll be able to upload your app’s file of string resources, select the languages you want to translate into, select a professional translation vendor, and place your order. Pro tip: you can put your store listing text into the file you upload to the App Translation Service. You’ll be able to communicate with your translator to be sure you get a great result, and download your translated string files. After you do some localization testing, you’ll be ready to publish your newly translated app update on Google Play — with localized store listing text and graphics. Be sure to check back to see the results on your user base, and track the results of marketing campaigns in your new languages using Google Analytics integration.



Good luck! Bonne chance ! ご幸運を祈ります! 행운을 빌어요 ¡Buena suerte! Удачи! Boa Sorte!




Android 4.4 KitKat and Updated Developer Tools

Posted by Dave Burke, Engineering Director, Android Platform



Today we are announcing Android 4.4 KitKat, a new version of Android that brings great new features for users and developers.



The very first device to run Android 4.4 is the new Nexus 5, available today on Google Play, and coming soon to other retail outlets. We’ll also be rolling out the Android 4.4 update worldwide in the next few weeks to all Nexus 4, Nexus 7, and Nexus 10 devices, as well as the Samsung Galaxy S4 and HTC One Google Play Edition devices.



As part of this release, we kicked off Project Svelte, an effort to reduce the memory needs of Android so that it can run on a much broader range of devices, including entry-level devices that have as little as 512MB RAM. From the kernel to system, frameworks, and apps, we've reduced memory footprint and improved memory management so Android can run comfortably on only 512MB of RAM. We did this not only on Android but across Google apps, like Chrome and YouTube.



By supporting a broader range of devices, Android 4.4 will help move the Android ecosystem forward. Now all users will be able to enjoy the very best that Android has to offer, on the devices that best meet their needs.



Here’s a quick look at some of the new features for developers:




  • New ways to create beautiful apps — A new full-screen immersive mode lets your app or game use every pixel on the screen to showcase content and capture touch events. A new transitions framework makes it easier to animate the states in your UI. Web content can take advantage of a completely new implementation of WebView built on Chromium.


  • More useful than ever — A printing framework lets you add the convenience of printing to your apps. A storage access framework makes it easier for users find documents, photos, and other data across their local and cloud-based storage services. You can integrate your app or storage service with the framework to give users instant access to their data.


  • Low-power sensors — New hardware-integrated sensors let you add great new features to your apps without draining the battery. Included are a step detector and step counter that let you efficiently track of the number of walking steps, even when the screen is off.


  • New media capabilities — A new screen recorder lets you capture high-quality video of your app directly from your Android device. It's a great new way to create walkthroughs, tutorials, marketing videos, and more. Apps can use adaptive playback to offer a significantly better streaming video experience.


  • RenderScript in the NDK — A new C++ API in the Android Native Development Kit (NDK) lets you use RenderScript from your native code, with access to script intrinsics, custom kernels, and more.


  • Improved accessibility support — New system-wide captioning settings let your apps present closed captions in the style that's preferred by the user.




There's a lot more, so be sure to check out the Android 4.4 platform highlights for a complete overview of those and other new capabilities for developers. For details on the APIs and how to use them, take a look at the API Overview or watch one of the new DevBytes videos on KitKat.



Along with the new Android 4.4 platform we're releasing a new version of the Android NDK (r9b). The new NDK gives you native access to RenderScript and other stable APIs in Android 4.4, so if you've been waiting to use RenderScript from your native code, give it a try.



Last, we've updated the Support Package (r19) with a new helper library for printing images through the new printing framework, as well as other updates.



You can get started developing and testing on Android 4.4 right away, in Android Studio or in ADT/Ant. You can download the Android 4.4 Platform (API level 19), as well as the SDK Tools, Platform Tools, and Support Package from the Android SDK Manager.




Google Play Services 4.0

Today we're launching a new release of Google Play services. Version 4.0 includes the Google Mobile Ads SDK, and offers improvements to geofencing, Google+, and Google Wallet Instant Buy APIs.



With over 97% of devices now running Android 2.3 (Gingerbread) or newer platform versions, we’re dropping support for Froyo from this release of the Google Play services SDK in order to make it possible to offer more powerful APIs in the future. That means you will not be able to utilize these new APIs on devices running Android 2.2 (Froyo).



We’re still in the process of rolling out to Android devices across the world, but you can already download the latest Google Play services SDK and start developing against the new APIs using the new Android 4.4 (KitKat) emulator.



Google Mobile Ads



If you’re using AdMob to monetize your apps, the new Google Mobile Ads SDK in Google Play services helps provide seamless improvements to your users. For example, bug fixes get pushed automatically to users without you having to do anything. Check out the post on the Google Ads Developer Blog for more details.



Maps and Location Based Services



The Maps and Geofencing APIs that launched in Google Play services 3.1 have been updated to improve overall battery efficiency and responsiveness.



You can save power by requesting larger latency values for notifications alerting your app to users entering or exiting geofences, or request that entry alerts are sent only after a user stays within a geofence for a specified period of time. Setting generous dwell times helps to eliminate unwanted notifications when a user passes near a geofence or their location is seen to move across a boundary.



The Maps API enhances map customization features, letting you specify marker opacity, fade-in effects, and visibility of 3D buildings. It’s also now possible to change ground overlay images.



Google+ and Google Wallet Instant Buy



Apps that are enabled with Google+ Sign-In will be updated with a simplified sign-in consent dialog. Google Wallet Instant Buy APIs are now available to everyone to try out within a sandbox, with a simplified API that streamlines the buy-flow and reduces integration time.



Google Wallet Instant Buy also includes new Wallet Objects, which means you can award loyalty points to a user's saved rewards program ID for each applicable Google Wallet Instant Buy purchase.



New user control over advertising identifier



To give users better controls and to provide you with a simple, standard system to continue to monetize your apps, this update contains a new, anonymous identifier for advertising purposes (to be used in place of Android ID). Google Settings now includes user controls that enable users to reset this identifier, or opt out of interest-based ads for Google Play apps.



More About Google Play Services



To learn more about Google Play services and the APIs available to you through it, visit the Google Services area of the Android Developers site.




Making your App Content more Accessible from Google

Posted by Chaesang Jung, Software Engineer



There are many reasons to build or not to build a mobile app as part of your broader mobile strategy. For instance, while apps offer a rich user experience, users can’t access them through Google Search like they do websites. Today, we’re announcing a new Google Search capability, app indexing, that will start to make apps more accessible through Google on Android.



Let’s say that a user is searching for a movie. With app indexing, Google will begin to include deep links to apps in Android search results. When the user taps on the “Open in app” deep links, the app opens up directly to the movie in question.





In this example, in order for the app deep links to appear in search results,



  • The Flixster app supports deep linking

  • The Rotten Tomatoes website has specified that the Flixster app page is an alternate for the web page

  • Google has indexed the Flixster app to determine relevance

  • The user has installed the Flixster app



The end result is that users will have a seamless search experience when accessing your app content through Google.



Google is currently testing app indexing with an initial group of developers including AllTheCooks, AllTrails, Beautylish, Etsy, Expedia, Flixster, Healthtap, IMDb, moviefone, newegg, OpenTable, Trulia, and Wikipedia. Deep links for these applications will start to appear in Google search results on Android, in the US, in a few weeks.



How to get started



If you are interested in enabling indexing for your Android app, you can learn more about our developer guidelines at developers.google.com/app-indexing and sign up. We are expanding our app indexing efforts and will gradually include more developers over time.




Getting Your SMS Apps Ready for KitKat


Posted by Scott Main and David Braun



Sending and receiving SMS messages are fundamental features on mobile devices and many developers have built successful apps that enhance this experience on Android. Some of you have built SMS apps using hidden APIs—a practice we discourage because hidden APIs may be changed or removed and new devices are not tested against them for compatibility. So, to provide you with a fully supported set of APIs for building SMS apps and to make the user experience for messaging more predictable, Android 4.4 (KitKat) makes the existing APIs public and adds the concept of a default SMS app, which the user can select in system settings.



This means that if you are using the hidden SMS APIs on previous platform versions,
you need to make some adjustments so your app continues to work when Android 4.4 is released later this year.




Make your app the default SMS app





On Android 4.4, only one app can receive the new SMS_DELIVER_ACTION intent, which the system
broadcasts when a new SMS message arrives. Which app receives this broadcast is determined by
which app the user has selected as the default SMS app in system settings. Likewise, only the
default SMS app receives the new WAP_PUSH_DELIVER_ACTION intent when a new MMS arrives.



Other apps that only want to read new messages can instead receive the SMS_RECEIVED_ACTION broadcast intent when a new SMS arrives. However, only the app that receives the SMS_DELIVER_ACTION broadcast (the user-specified default SMS app) is able to write to the SMS Provider defined by the android.provider.Telephony class and subclasses. As such, it's important that you update your messaging app as soon as possible to be available as a default SMS app, because although your existing app won't crash on an Android 4.4 device, it will silently fail when attempting to write to the SMS Provider.



In order for your app to appear in the system settings as an eligible default SMS app, your manifest file must declare some specific capabilities. So you must update your app to do the following things:




  • In a broadcast receiver, include an intent filter for SMS_DELIVER_ACTION ("android.provider.Telephony.SMS_DELIVER"). The broadcast receiver must also require the BROADCAST_SMS permission.

    This allows your app to directly receive incoming SMS messages.



  • In a broadcast receiver, include an intent filter for WAP_PUSH_DELIVER_ACTION ("android.provider.Telephony.WAP_PUSH_DELIVER") with the MIME type "application/vnd.wap.mms-message". The broadcast receiver must also require the BROADCAST_WAP_PUSH permission.

    This allows your app to directly receive incoming MMS messages.



  • In your activity that delivers new messages, include an intent filter for ACTION_SENDTO ("android.intent.action.SENDTO") with schemas, sms:, smsto:, mms:, and mmsto:.

    This allows your app to receive intents from other apps that want to deliver a message.



  • In a service, include an intent filter for ACTION_RESPONSE_VIA_MESSAGE ("android.intent.action.RESPOND_VIA_MESSAGE") with schemas, sms:, smsto:, mms:, and mmsto:. This service must also require the SEND_RESPOND_VIA_MESSAGE permission.

    This allows users to respond to incoming phone calls with an immediate text message using your app.





For example, here's a manifest file with the necessary components and intent filters:


<manifest>
...
<application>
<!-- BroadcastReceiver that listens for incoming SMS messages -->
<receiver android:name=".SmsReceiver"
android:permission="android.permission.BROADCAST_SMS">
<intent-filter>
<action android:name="android.provider.Telephony.SMS_DELIVER" />
</intent-filter>
</receiver>

<!-- BroadcastReceiver that listens for incoming MMS messages -->
<receiver android:name=".MmsReceiver"
android:permission="android.permission.BROADCAST_WAP_PUSH">
<intent-filter>
<action android:name="android.provider.Telephony.WAP_PUSH_DELIVER" />
<data android:mimeType="application/vnd.wap.mms-message" />
</intent-filter>
</receiver>

<!-- Activity that allows the user to send new SMS/MMS messages -->
<activity android:name=".ComposeSmsActivity" >
<intent-filter>
<action android:name="android.intent.action.SEND" />
<action android:name="android.intent.action.SENDTO" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="sms" />
<data android:scheme="smsto" />
<data android:scheme="mms" />
<data android:scheme="mmsto" />
</intent-filter>
</activity>

<!-- Service that delivers messages from the phone "quick response" -->
<service android:name=".HeadlessSmsSendService"
android:permission="android.permission.SEND_RESPOND_VIA_MESSAGE"
android:exported="true" >
<intent-filter>
<action android:name="android.intent.action.RESPOND_VIA_MESSAGE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="sms" />
<data android:scheme="smsto" />
<data android:scheme="mms" />
<data android:scheme="mmsto" />
</intent-filter>
</service>
</application>
</manifest>



Any filters for the SMS_RECEIVED_ACTION broadcast in existing apps will continue to work the same on Android 4.4, but only as an observer of new messages, because unless your app also receives the SMS_DELIVER_ACTION broadcast, you cannot write to the SMS Provider on Android 4.4.



Beginning with Android 4.4, you should stop listening for the SMS_RECEIVED_ACTION broadcast, which you can do at runtime by checking the platform version then disabling your broadcast receiver for SMS_RECEIVED_ACTION with PackageManager.setComponentEnabledSetting(). However, you can continue listening for that broadcast if your app needs only to read special SMS messages, such as to perform phone number verification. Note that—beginning with Android 4.4—any attempt by your app to abort the SMS_RECEIVED_ACTION broadcast will be ignored so all apps interested have the chance to receive it.



Tip: To distinguish the two SMS broadcasts, imagine that the SMS_RECEIVED_ACTION simply says "the system received an SMS," whereas the SMS_DELIVER_ACTION says "the system is delivering your app an SMS, because you're the default SMS app."





Disable features when not the default SMS app



In consideration of some apps that do not want to behave as the default SMS app but still want to send messages, any app that has the SEND_SMS permission is still able to send SMS messages using SmsManager. If and only if an app is not selected as the default SMS app on Android 4.4, the system automatically writes the sent SMS messages to the SMS Provider (the default SMS app is always responsible for writing its sent messages to the SMS Provider).



However, if your app is designed to behave as the default SMS app, then while your app is not selected as the default, it's important that you understand the limitations placed upon your app and disable features as appropriate. Although the system writes sent SMS messages to the SMS Provider while your app is not the default SMS app, it does not write sent MMS messages and your app is not able to write to the SMS Provider for other operations, such as to mark messages as draft, mark them as read, delete them, etc.





So when your messaging activity resumes, check whether your app is the default SMS app by querying Telephony.Sms.getDefaultSmsPackage(), which returns the package name of the current default SMS app. If it doesn't match your package name, disable features such as the ability for users to send new messages.



When the user decides to use your app for messaging, you can display a dialog hosted by the system that allows the user to make your app the default SMS app. To display the dialog, call startActivity() with the Telephony.Sms.Intents.ACTION_CHANGE_DEFAULT intent, including an extra with the Sms.Intents.EXTRA_PACKAGE_NAME key and your package name as the string value.



For example, your activity might include code like this:



public class ComposeSmsActivity extends Activity {

@Override
protected void onResume() {
super.onResume();

final String myPackageName = getPackageName();
if (!Telephony.Sms.getDefaultSmsPackage(this).equals(myPackageName)) {
// App is not default.
// Show the "not currently set as the default SMS app" interface
View viewGroup = findViewById(R.id.not_default_app);
viewGroup.setVisibility(View.VISIBLE);

// Set up a button that allows the user to change the default SMS app
Button button = (Button) findViewById(R.id.change_default_app);
button.setOnClickListener(new View.OnClickListener() {
public void onClick(View v) {
Intent intent =
new Intent(Telephony.Sms.Intents.ACTION_CHANGE_DEFAULT);
intent.putExtra(Telephony.Sms.Intents.EXTRA_PACKAGE_NAME,
myPackageName);
startActivity(intent);
}
});
} else {
// App is the default.
// Hide the "not currently set as the default SMS app" interface
View viewGroup = findViewById(R.id.not_default_app);
viewGroup.setVisibility(View.GONE);
}
}
}



Advice for SMS backup & restore apps



Because the ability to write to the SMS Provider is restricted to the app the user selects as the default SMS app, any existing app designed purely to backup and restore SMS messages will currently be unable to restore SMS messages on Android 4.4. An app that backs up and restores SMS messages must also be set as the default SMS app so that it can write messages in the SMS Provider. However, if the app does not also send and receive SMS messages, then it should not remain set as the default SMS app. So, you can provide a functional user experience with the following design when the user opens your app to initiate a one-time restore operation:





  1. Query the current default SMS app's package name and save it.
    String defaultSmsApp = Telephony.Sms.getDefaultSmsPackage(context);



  2. Request the user change the default SMS app to your app in order to restore SMS messages (you must be the default SMS app in order to write to the SMS Provider).
    Intent intent = new Intent(context, Sms.Intents.ACTION_CHANGE_DEFAULT);
    intent.putExtra(Sms.Intents.EXTRA_PACKAGE_NAME, context.getPackageName());
    startActivity(intent);



  3. When you finish restoring all SMS messages, request the user to change the default SMS app back to the previously selected app (saved during step 1).
    Intent intent = new Intent(context, Sms.Intents.ACTION_CHANGE_DEFAULT);
    intent.putExtra(Sms.Intents.EXTRA_PACKAGE_NAME, defaultSmsApp);
    startActivity(intent);




Prepare to update your SMS app


We encourage you to update your apps as soon as possible to provide your users the best experience on Android. To help you make the changes, we'll soon be providing the necessary SDK components for Android 4.4 that allow you to compile and test your changes on Android 4.4. Stay tuned!



Tablet changes in Google Play coming up November 21

Posted by Ellie Powers, Google Play team



Fueled by the Nexus 7 and other great devices, more than 70 million Android tablets have been activated. Thousands of developers have already designed their apps to look great on tablets, and with the holidays fast approaching, we’re making it even easier for the next wave of tablet owners to discover great apps and games.



Play Store tablet changes coming up on November 21



Earlier this year, Google Play added a “designed for tablets” section, where users could easily discover apps that look great on their 7”- and 10”-tablets. This section includes only apps and games which meet criteria and guidelines we established last year. (Here’s an overview if you missed it.) Developers who invest the time to meet the criteria are seeing great results; take Remember The Milk, which saw an 83% increase in tablet downloads from being in this section. (see the whole story here).



On November 21, the Play Store will make a series of changes so it’s even easier for tablet users to find those apps that are best for their devices. First, by default, users browsing Google Play on a tablet will now see apps and games that are designed for tablets on the top lists (Top Paid, Top Free, Top Grossing, Top New Paid, Top New Free, and Trending). Tablet users will still be able to switch the view so they can see all apps or games if they choose. Also starting November 21, apps and games that do not meet the “designed for tablets” criteria will be marked as “designed for phones” for users who browse the Play Store on tablets.



You’ll want to make sure that your app is designed for tablets; read more about how to do this at the end of this blog post.





Make sure your app is ready!



If you want to be sure your app is included in the “Designed for tablets” view in time for the November 21 Play Store changes, go to the Developer Console to check your tablet optimization tips. If you see any issues listed there, you’ll need to address them in your app and upload a new binary for distribution. If there are no issues listed, your app is eligible to be included in the “Designed for tablets" view in the top lists.





Also, make sure to read the full tablet quality checklist to understand how to build outstanding tablet experiences.



Everyday, thousands of Android developers are taking advantage of the tremendous Android tablet opportunity. The flood of new users coupled with the increased screen size means new user experiences, more engagement and more monetization opportunities. We’re excited to see what you do!




Undoing the pretzel logic of finance

My latest column in Bloomberg came out a few days ago. The article looks at some recent work of young MIT economist Alp Simsek that considers how new derivative instruments influence market stability. He comes to a conclusion that most ordinary people would find utterly unsurprising:
Financial markets in recent years have seen a proliferation of new …financial assets such as different types of futures, swaps, options, and more exotic derivatives. According to the traditional view of …nancial innovation, these assets facilitate the diversi…cation and the sharing of risks. However, this view does not take into account that market participants might naturally disagree about how to value …financial assets. The thesis of this paper is that belief disagreements change the implications of …nancial innovation for portfolio risks. In particular, market participants’' disagreements naturally lead to speculation, which represents a powerful economic force by which fi…nancial innovation increases portfolio risks.
There you go. Because not all people have the same views on the future, derivatives can be used to speculate and gamble. This increases risks in the market. More derivatives and more complete markets is not always a good thing, as standard financial theory would have it.

To be clear, I'm not poking fun at Simsek's work. Not at all. I think this work should be spread far and wide. That this idea comes as news to the academic finance community shows how deeply confused they have become by the received wisdom of market completeness as an ideal. They (at least many) do believe that UP = DOWN, and so news to the contrary sounds radical. In the article I've mentioned several other earlier studies (I've written about them here before, just search on "derivatives") that point to the same conclusion: more derivatives in general leads to more market instability (again, as most people already believe).

It's nice to see some influential young economists picking up and exploring this idea.

The real trouble with economics

I pretty much agree with everything Mark Thoma says here in pointing to sociological factors within academic economics as the source of recent problems. Anyone who has read this blog knows I'm not so sanguine about the supposed "sophistication" of the analytical models currently used in macroeconomics, but, that to one side, Thoma is right that the real problem has been a lack of imagination and willingness to build models (probably messy and inelegant ones) that would inform us in a practically useful way about possible market instabilities:

 "I talked about the problem with the sociology of economics awhile back -- this is from a post in August, 2009:

In The Economist, Robert Lucas responds to recent criticism of macroeconomics ("In Defense of the Dismal Science"). Here's my entry at Free Exchange's Robert Lucas Roundtable in response to his essay:
Lucas roundtable: Ask the right questions, by Mark Thoma: In his essay, Robert Lucas defends macroeconomics against the charge that it is "valueless, even harmful", and that the tools economists use are "spectacularly useless".
I agree that the analytical tools economists use are not the problem. We cannot fully understand how the economy works without employing models of some sort, and we cannot build coherent models without using analytic tools such as mathematics. Some of these tools are very complex, but there is nothing wrong with sophistication so long as sophistication itself does not become the main goal, and sophistication is not used as a barrier to entry into the theorist's club rather than an analytical device to understand the world.
But all the tools in the world are useless if we lack the imagination needed to build the right models. Models are built to answer specific questions. When a theorist builds a model, it is an attempt to highlight the features of the world the theorist believes are the most important for the question at hand. For example, a map is a model of the real world, and sometimes I want a road map to help me find my way to my destination, but other times I might need a map showing crop production, or a map showing underground pipes and electrical lines. It all depends on the question I want to answer. If we try to make one map that answers every possible question we could ever ask of maps, it would be so cluttered with detail it would be useless, so we necessarily abstract from real world detail in order to highlight the essential elements needed to answer the question we have posed. The same is true for macroeconomic models.
But we have to ask the right questions before we can build the right models.
The problem wasn't the tools that macroeconomists use, it was the questions that we asked. The major debates in macroeconomics had nothing to do with the possibility of bubbles causing a financial system meltdown. That's not to say that there weren't models here and there that touched upon these questions, but the main focus of macroeconomic research was elsewhere. ...
The interesting question to me, then, is why we failed to ask the right questions. For example,... why policymakers didn't take the possibility of a major meltdown seriously. Why didn't they deliver forecasts conditional on a crisis occurring? Why didn't they ask this question of the model? Why did we only get forecasts conditional on no crisis? And also, why was the main factor that allowed the crisis to spread, the interconnectedness of financial markets, missed?
It was because policymakers couldn't and didn't take seriously the possibility that a crisis and meltdown could occur. And even if they had seriously considered the possibility of a meltdown, the models most people were using were not built to be informative on this question. It simply wasn't a question that was taken seriously by the mainstream.
Why did we, for the most part, fail to ask the right questions? Was it lack of imagination, was it the sociology within the profession, the concentration of power over what research gets highlighted, the inadequacy of the tools we brought to the problem, the fact that nobody will ever be able to predict these types of events, or something else?
It wasn't the tools, and it wasn't lack of imagination. As Brad DeLong points out, the voices were there—he points to Michael Mussa for one—but those voices were not heard. Nobody listened even though some people did see it coming. So I am more inclined to cite the sociology within the profession or the concentration of power as the main factors that caused us to dismiss these voices.
And here I think that thought leaders such as Robert Lucas and others who openly ridiculed models they disagreed with have questions they should ask themselves (e.g. Mr Lucas saying "At research seminars, people don’t take Keynesian theorizing seriously anymore; the audience starts to whisper and giggle to one another", or more recently "These are kind of schlock economics"). When someone as notable and respected as Robert Lucas makes fun of an entire line of inquiry, it influences whole generations of economists away from asking certain types of questions, some of which turned out to be important. Why was it necessary for the major leaders in macroeconomics to shut down alternative lines of inquiry through ridicule and other means rather than simply citing evidence in support of their positions? What were they afraid of? The goal is to find the truth, not win fame and fortune by dominating the debate.
We need to take a close look at how the sociology of our profession led to an outcome where people were made to feel embarrassed for even asking certain types of questions. People will always be passionate in defense of their life's work, so it's not the rhetoric itself that is of concern, the problem comes when factors such as ideology or control of journals and other outlets for the dissemination of research stand in the way of promising alternative lines of inquiry.
I don't know for sure the extent to which the ability of a small number of people in the field to control the academic discourse led to a concentration of power that stood in the way of alternative lines of investigation, or the extent to which the ideology that markets prices always tend to move toward their long-run equilibrium values caused us to ignore voices that foresaw the developing bubble and coming crisis. But something caused most of us to ask the wrong questions, and to dismiss the people who got it right, and I think one of our first orders of business is to understand how and why that happened.
I think the structure of journals, which concentrates power within the profession, also influence the sociology of the profession (and not in a good way)."

The political problem


Several years ago, immediately post-crisis, I wrote a short article for Nature exploring new ideas about modelling economic and financial systems. I wrote about agent-based models and other similar ideas, nothing all that earth shaking really. In an early draft, I recall adding a section toward the end of the piece making the point that, of course, better models, better science, etc., would never be enough because ultimately policy making has an irreducible political element; financial crises can almost always be traced back to the political influence of powerful forces who shape policies to help themselves (or to try to do so), with little thought for the welfare of others. To my surprise, my editor at Nature took that section out saying something like "we'd like to stick to the science."

I thought that was unfortunate and hugely misleading. Corruption is real, and I really do think that no amount of better economics will eliminate financial and economic crises, because of the reality of politics. No avoiding it. Simon Wren-Lewis has a great post on this topic today, looking at why it would not actually be that hard -- conceptually -- to make the financial system more stable. The only barrier is the intimate connection between finance and politics ("quite frankly, the banks own this place" as U.S. Senator Dick Durbin once put it), which means that banks won't actually have to do things that might help the public good and the nation as a whole:
There is one simple and straightforward measure that would go a long way to avoiding another global financial crisis, and that is to substantially increase the proportion of bank equity that banks are obliged to hold. This point is put forcibly, and in plain language, in a recent book by Admati and Hellwig: The Bankers New Clothes. (Here is a short NYT piece by Admati.) Admati and Hellwig suggest the proportion of the balance sheet that is backed by equity should be something like 25%, and other estimates for the optimal amount of bank equity come up with similar numbers. The numbers that regulators are intending to impose post-crisis are tiny in comparison.

It is worth quoting the first paragraph of a FT review by Martin Wolf of their book:
“The UK’s Independent Commission on Banking, of which I was a member, made a modest proposal: the proportion of the balance sheet of UK retail banks that has to be funded by equity, instead of debt, should be raised to 4 per cent. This would be just a percentage point above the figure suggested by the Basel Committee on Banking Supervision. The government rejected this, because of lobbying by the banks.”
Why are banks so reluctant to raise more equity capital? One reason is tax breaks that make finance using borrowing cheaper. But non-financial companies, that also have a choice between raising equity and borrowing to finance investment, typically use much more equity capital and less borrowing. If things go wrong, you can reduce dividends, but you still have to pay interest, so companies limit the amount of borrowing they do to reduce the risk of bankruptcy. But large banks are famously too big to fail. So someone else takes care of the bankruptcy risk - you and me. We effectively guarantee the borrowing that banks do. (If this is not clear, read chapter 9 of the book here.  The authors make a nice analogy with a rich aunt who offers to always guarantee your mortgage.)

The state guarantee is a huge, and ongoing, public subsidy to the banking sector. For large banks, it is of the same order of magnitude as the profits they make. We know where a large proportion of the profits go - into bonuses for those who work in those banks. The larger is the amount of equity capital that banks are forced to hold, the more the holders of that equity bear the cost of bank failure, and the less is the public subsidy. Seen in this way it becomes obvious why banks do not want to hold more equity capital - they rather like being subsidised by the state, so that the state can contribute to their bonuses. (Existing equity holders will also resist increasing equity capital, for reasons Carola Binder summarises based on the work of Admati and Hellwig and coauthors.)

This is why the argument is largely a no brainer for economists. [1] Most economists are instinctively against state subsidies, unless there are obvious externalities which they are countering. With banks the subsidy is not just an unwarranted transfer of resources, but it is also distorting the incentives for bankers to take risk, as we found out in 2007/8. Bankers make money when the risk pays off, and get bailed out by governments when it does not.

So why are economists being ignored by politicians? It is hardly because banks are popular with the public. The scale of the banking sector’s misdemeanours is incredible, as John Lanchester sets out here. I suspect many will think that banks are being treated lightly because politicians are concerned about choking off the recovery. Yet the argument that banks often make - holding equity capital represents money that is ‘tied up’ and so cannot be lent to firms and consumers - is simply nonsense. A more respectable argument is that holding much more equity capital would translate into greater costs for bank borrowers, but David Miles suggests the size of this effect would not be large. (See also Simon Johnson here, John Plender here and Thomas Hoenig here.) In any case, public subsidies are bound to be passed on to some extent, but that does not justify them. Politicians are busy trying to phase out public subsidies elsewhere, so why are banks so different?

There is one simple explanation. The power of the banking lobby (and the financial industry more generally) is immense, from campaign contributions to regulatory capture of various kinds. It would be nice to imagine that the UK was less vulnerable than the US in this respect, but there are good reasons to think otherwise. [2] As a result, the power and influence of banks and bankers within government has hardly suffered as a result of the Great Recession that they played a large part in creating.
This point bears repeating -- indeed, it ought to be repeated every day for the rest of the year. All the technical and semi-technical articles now being published about measures for getting at systemic risk and improved schemes for weighting capital and so on, however clever and interesting they may be, actually only serve to draw attention away from this most serious problem, which is institutionalized corruption plain and simple. If every finance professor wrote one article on this topic -- after all, shouldn't this really be THE main topic in finance today? -- we might one day get somewhere with fixing the financial system.

What has nature done for us?



I had the opportunity last week to speak at the Edinburgh International Festival of Books alongside Tony Juniper, British environmentalist and former head of Friends of the Earth. I highly recommend his new book, What has nature ever done for us?, which examines the many ways that the natural world contributes to our well being considered in economic terms. "Many ways" is of course an absolutely absurd understatement, as the natural world essentially provides everything that makes our lives possible. But if you turn off your brain, swallow hard and actually do calculations of environmentally produced economic value -- sadly, it seems that only this approach has influence in our world where everything comes down to economic costs and benefits -- you find (without any surprise) that the value of "ecosystem services" on a yearly basis is many times current global GDP.

Personally, I think it is obvious that this is a vast underestimate, but if it is necessary to convince people who cannot think in any other terms, then so be it. The Earth's ecosystems produce the oxygen we breath. How much value is there in that? I would say it is pretty much infinite, although I'm sure someone will argue that we could, with the right hypothetical technology, produce our own oxygen and so replace those messy natural resources with industry based on our own knowledge, perhaps we'd even boost the economy in the process! Bollocks. Juniper's book is a beautifully written corrective to such nonsense.

We've evolved in delicate interdependence with our natural world; we didn't create ourselves above and beyond nature with rational thought and technology, although this is the modern illusion. Although it comes from a very different context -- A Recipe for Happiness by Rabbi Ari Kahn (courtesy of Mitch Julis of Canyon Partners) -- I think the following words hold great wisdom:
Modern man, intoxicated with his own success, is prone to hubris. He sees himself as a self-made man, and worships his ‘creator’ every time he glances in the mirror... Like Narcissus gazing into the water while perched on a rock, modern man no longer recalls where he came from, and his own self-absorption mesmerizes him. He is isolated, and because he has forgotten the past, he has no humility, no perspective, no context. At the same time, he jeopardizes his connection with the future: Only when we transmit historical consciousness to our children, and live beyond the narrow confines of the present, do we stand a chance of being appreciated by our children – rather than being rejected, in turn, as a relic from the past.

THE NEXT CRISIS HAS BEGUN: AND THIS ONE IS GOING TO BE IN THE CURRENCY MARKET

Today the dollar broke through 81.40. This is a major development as it signals that the current daily cycle topped in only 2 days, thus confirming that the intermediate cycle has also topped.



I've been warning for months and months that this was coming. Anyone with a modicum of common sense knew that printing trillions of dollars was going to eventually have consequences. There is no escaping the inevitable, if you debase your currency like that eventually you are going to have a currency crisis. The first one has now begun. 

Over the next 3-4 months the dollar is going to test the lower trend line of the megaphone topping pattern and ultimately break through. When it does we are going to witness a spectacular collapse in the dollar, probably testing the 2011 bottom by the next intermediate cycle low due in November.



This is going to cause all kinds of problems. We are already seeing the bond market breaking free of Fed manipulation. This will only get worse as bonds recognize the severity of the crisis ahead. Ironically the Fed is going to print harder and faster to try and tame the bond market. It will have the reverse effect. It will just accelerate the dollar collapse which will intensify the selling in bonds.

This has already pricked the echo bubble in housing. In the chart below we see the same megaphone topping pattern in play as in the dollar index.



Smart money has known for months this was coming. I strongly suspect the manipulation in gold over the last 8 months was done to transfer physical metal from weak hands into strong hands in preparation for this event. Now it's time for gold to do it's job of protecting wealth during a currency crisis. I told subscribers last night that we will see a war over the next several days and weeks as gold breaks free of the manipulation and gets busy discounting the coming currency crisis. 

The intervention is going to try hard to keep gold prices down, but ultimately gold is going to win and break free of the artificially low prices. Ultimately gold is going to protect wealth during an inflation just like it always does. And ultimately all the manipulation will succeed in doing is to cause price to rise much further and faster than would have occurred if gold had been allowed to trade freely.

Batten down the hatches the next Fed created catastrophe has begun.

Why Homo economicus isn't very smart


I'm getting back tomorrow from extended travels in Poland and the UK and hope to resume some more frequent blogging. Just a quick note today to clarify my recent column in Bloomberg on Homo economicus and the payoffs to friendly types in Prisoner's Dilemma games. Several people commenting on Bloomberg have suggested that what I've said was known 20 years ago or was all evident from the famous work of Robert Axelrod on the iterated Prisoner's Dilemma. They don't seem to have taken a look at the specific paper I referred to in the piece, which is very recent, but maybe that's my fault as I didn't spell out what is new about this work as well as I could have.

This study by Thomas Grund and colleagues does not JUST look at the iterated Prisoner's Dilemma or point out that mechanisms of group selection can support the evolution of altruists. This is indeed already known and has been known for a while. However, these mechanisms are also subject to limitations depending on various factors such as group mixing. The current study looks at a situation in which individuals CAN care about the payoffs for others with whom they interact (their utility function has an other-regarding component). It assumes that this does NOTHING for their reproductive fitness, however, this being totally distinct from utility and depending on an individual's own payoff. In other words, the model assumes that helping behavior is costly.

So, why would someone come to care for about the payoffs to others? Why indeed. This is where the story gets interesting. Just let this be possible by giving everyone a "friendliness" parameter F reflecting how much they care about others (0 = no caring, 1 = a lot of caring). What the study shows is that, even if everyone starts out with F = 0, this situation is unstable to the evolution of caring behavior. If individuals pass on their friendliness (genetically or culturally) to offspring, then random variations in friendliness values, caught on the wing by selection, can spread through the population. In effect, friendliness, even though it matters not for actually fitness, can provide an organizational scaffolding that makes it easier for cooperators to find cooperators. The mere possibility of friendliness (you can call this arbitrary variable anything you like) allows a spatial segregation of the population that enables much higher levels of cooperation.

This is, I think, quite new and very different from earlier studies. It introduces an essentially new element. Homo economicus, in this world, suffers because he is not capable of responding as flexibly as are others in the population (i.e. making decisions on the basis of matters that have no link whatsoever to his fitness). Those who are more flexible -- and apparently unreasonable -- can come to dominate quite quickly in the right circumstances. From the paper:
However, why does this transition happen in just a few generations (see Fig. 1B), i.e. much faster than expected? This relates to our distinction of preferences and behaviour. When an ‘idealist’ is born in a neighbourhood with friendliness levels supporting conditional cooperation, this can trigger off a cascade of changes from defective to cooperative behaviour. Under such conditions, a single ‘idealist’ may quickly turn a defective neighbourhood into a largely cooperative one. This implies higher payoffs and higher reproduction rates for both, idealists and conditional co-operators.

The intriguing phase transition from self-regarding to other-regarding preferences critically depends on the local reproduction rate (see Fig. 2). The clustering of friendly agents, which promotes other-regarding preferences, is not supported when offspring move away. Then, offspring are more likely to encounter defectors elsewhere and parents are not ‘shielded’ by their own friendly offspring anymore. In contrast, with local reproduction, offspring settle nearby, and a clustering of friendly agents is reinforced. Under such conditions, friendliness is evolutionary advantageous over selfishness.
 


July Favorites!!


With the end of July comes July Favorites!! So here are the products that I have been loving this month.

Rimmel's In Vogue 038
I like a good pink lipstick in the summer and this one by Rimmel has been my favorite this month. I like the formula, it smells pretty good and it is a beautiful bright fuchsia  pink color. If you haven't tried this one I would highly recommend it because it is very flattering.

essence 3D single shadow in the color irresistible mermaid kiss 
I picked up this color because I don't have anything like it in my collection. I love the shimmery minty blue shade and you don't have to do much with it to create a nice eye shadow look. I usually just wear it with some black eyeliner.

 Aussie hair conditioners
I love the Aussie Moist line of hair products. The conditioner is great to use if you need to replenish moisture. The 3 minute miracle smells great and makes my hair nice and soft, it is also my preferred conditioner for travel since it is a convenient size. The Hair insurance leave-in conditioner gives me some hold without drying out my hair. 
TIP: I also use the Aussie moist conditioner to shave my legs with! People actually ask me how I get my skin so soft and smooth and it is because I use this conditioner instead of shaving gels or creams! It gives you a nice smooth shave and your legs will feel soooo soft!! Try it. 


Wet n Wild Mega Last 212C Heat Wave
This is a beautiful coral color and I like the extra wide brush on the Megalast polishes, it makes it super easy to apply the polish.
Sephora lip gloss
When I am not wearing bright lipsticks I like to wear simple gloss. These 3 colors compliments many skin tones. They are not very pigmented but they are pretty.

eos lip balms. My fav!

Sugar Lip Balms
when I'm not using my eos lip balms which are my all time favorites I usually wear the Sugar balms. The one in the wine colored tube is clear and the pink color is called rose. It gives my lips a rather natural tint while also leaving them moisturized. They aren't as long lasting as the eos but they are still rather good.

Clean and Clear continuous control acne wash
This face wash works for me because it doesn't cause my skin to become irritated. It helps fight break outs by providing a deep clean and contains salicylic acid. It is oil free and leaves my skin a tad dry so I do need to moisturize after I cleanse which isn't a big deal. I love that this cleanser pumps out of the bottle already foamy, this makes it easier to lather onto my face.

Pink Jewelry Box
I found this pink jeweled box in Dubai at a store called Carrefour which is almost equivalent to Walmart in North America. I thought it would be perfect for small jewelry. 

Lipstick organizers
I bought 2 of these lipstick organizers from Winners but you can also find them online. They make it very easy to keep all your lipsticks and glosses neat and in one place. They were $12.99 each. They also come in different shapes and designs. To check out my other makeup storage ideas CLICK HERE

Oikos Cherry Greek Yogurt
Greek yogurt is very good for you, it contains a lot of good bacteria that is healthy for your digestive system. This Oikos Greek yogurt is thick, rich, creamy and the cherries add a delicious sweetness. It comes in other flavors but cherries are my favorite fruit.

Favorite book this month
A thousand Splendid Suns
This month I didn't read a book that really stood out to me so I decided to add one of my all time favorite novels A Thousand Splendid Suns. This novel is about a girl who is the result of an affair and her life after being forced into marriage at a very young age. I don't want to give too much away but this is an amazing story.

What were some of your favorites in July month? Leave a comment and let me know