Android Developers Blog

Monday 24 September 2012

iOS vs. Android — Mobile Dev Platform Heads Up


 I think it will be interesting to compare these two mobile platforms head-to-head. And here it is.


1. Development Environment
Before I started iOS programming, I was a long time Java programmer. I was used to some awesome programming IDEs such as IntelliJ IDEA, Eclipse, or NetBeans. My personal favorite is IntelliJ. I like it not only because it has a rich feature set, but also the consideration they have put in for those features. The seamless integration with maven/ant, color coded file names, highlighted changed lines, quick and easy refactoring … Nowadays, number of features is not enough to distinguish an IDE from others, it’s those little “productivity features” that make an IDE outstanding.







That’s why the first time when I started using Xcode 3.x, I was so surprised how outdated it was. It’s like programming in year 2000 on Visual C++ 6.0. No kidding! It does have all the necessary features — it compiles, it edits, it has source control integrated, it can even do refactoring. But all those “productivity features” are not there! You have to go down several levels of menu to do a “svn add”; and the worst part is, you can’t tell if the file is added or not after you clicking that menu! The refactoring often changes the wrong files. It’s hard to find a file. … Even after more than a year working on Xcode, I still felt so happy/relaxed whenever I was back to Java/IntelliJ — because everything I need is just right next to my hand!

Comparing with Xcode 3.x, Xcode 4 is definitely a big progress towards the right direction. I can see more signs from a modern IDE there. More convenience features are added. But as a whole, it still lags behind other modern Java IDEs. I also learned that JetBrains, the company makes IntelliJ IDEA, is creating an IDE for iPhone programming, called AppCode. I am so glad they are doing that — at least they can introduce some competitions to this area.

But on the other hand, I do appreciate Apple giving the whole development package to developers for FREE (thank god they don’t charge us for thousands of dollars like Microsoft charges for Visual Studio) — except the $100 membership fee I have to pay. Many of the tools included in the package, such as Interface Builder, Instruments, are so powerful that their equivalents on Java side can easily cost hundreds or even thousands of dollars. On this part, iOS developers are lucky to have this great all-in-one package.

It’s a close call to decide who wins this category. Java IDEs are better, but Apple does provide better supplement tools and it is catching up quickly on IDE. So I’ll leave this decision for you. Leave a comment and let me know what you think on this topic.

2. App Store vs. Android Market
Since I started programming on iOS, I have watched the amazing growth of the apps on App Store. The invention of “App Store” is a huge benefit for everybody — developers now can list their software on a central place, accessible by hundreds of millions of people all over the world; and consumers can get some top notch games/applications with just 99 cents, which is unimaginable before the App Store era. Apple’s vision and implementation on App Store is probably one of the most important contributions to the consumer software industry.






Google also launched its Android Market soon after iOS App Store, and the number of Android apps have grown rapidly since then. But in many ways, Google’s Android Market is still behind iOS App Store.

One big problem for Android Market is its lack of functionalities. One example is its lack of ways to promote new apps to Android Market. On iOS App Store, a new app could get on many special categories to attract users’ attention, such as “New and Noteworthy”, “What’s Hot”, “Staff Favorites”, … They may not really mean much, but they do provide extra ways for those better new apps to stand out. And if those apps are good enough, they will prevail. But on Android Market, once an app is released, the only way it could be noticed is through “Newly Released” category. With thousands and even tens of thousands new apps released for each category every day, you new app will soon be flooded to nowhere, no matter its quality is good or bad.

So, in this category, Apple is the clear winner!

3. Supporting Infrastructure
When I am talking about “Supporting Infrastructure”, I mean those processes/softwares behind App Store/Android Market, or iTunesConnect/Publisher Console, and those servers running 24×7 to keep the site up, and data up-to-date. You can’t see them, but you can feel it whenever you make a change to your app, either a new release or just a description update. They are the ultra-power behind the scene.






About a month ago, I released my “PenguinLinks 2″ games to App Store. It was an awful experience. At first, my free game went out, but the two “In-app Purchases” associated with it didn’t went out until two weeks later. And then, after my paid version was out, I decided to run a free promotion on a weekend. Unfortunately that’s the weekend when Apple rolled out App Store to 33 more countries. The price change didn’t take effect until Sunday morning. And the worst part is, it briefly went free for an hour, and then was completely rolled back. Clearly there were some glitches in the release process. But it was a disaster to me: when I saw the price changed the first time, I thought that was it; so I sent out all my promotion emails to many websites / friends. An hour later, I got tons of emails complaining it was NOT free.

I don’t really blame Apple on this. I was a backend developer, I know things can go wrong sometime. However, from these incidences, you can tell Apple’s backend infrastructure  supporting App Store and iTC is really outdated. Just think about it, how often do you see other major websites going down for hours just for maintenance? And how slow iTunes is comparing with other websites?

Actually, many things we take as granted nowadays are still not available on App Store. When a user submit a review for your app, it is available immediately on Android Market; but it takes hours to show up on App Store. At Android Market’s publisher console, you can see sales in realtime; but on App Store, sometime you don’t even have an aggregated sales report one day later. I don’t even compare iAd report to Google’s adsense report — there is no comparison.

It may not be fair to compare Apple to Google on this category. After all, Google is probably one of the most capable technology companies (if not “the” company) at processing large volume of data quickly and effectively. Years of experience on search and data mining make it easy for Google to handle those data from Android Market. But for Apple, this is a whole new area. Apple must know this as well. They are building new data centers and hiring data processing experts. I have no doubt they will get better and better, but for now, Google wins this round.

Google improves Chrome Android browser security with latest update



google chrome for android browser

With mobile devices becoming more and more popular, it is no surprise to see malicious adware and viruses continue to pop-up through apps and web browsing.  The latest update to the Chrome Browser for Android beefs up its security by relying heavily on Android’s sandbox technology.

Mobile threats on your device will be contained through Chrome before affecting other processes on your device.  For users running Android 4.1, there will be a seamless integration of Chrome security to protect your handset.

Other updates include location preferences in Google app’s settings, enhanced YouTube video playback in full screen mode, video continues to play through screenlock/unlock, and third party keyboards (such as SwiftKey 3) received increased support.

Overall, the Chrome update sounds like a nice one, where it offers some new features and improves functionality.  Users can download the updated browser immediately from Google Play.

Android Distribution Numbers Updated for September, Like Watching a Race Between Turtles








It’s the first week of the month, and that means that new Android distribution numbers are released. Hooray! Woohoo! <insert catchy Apple blog title about how many months it has been and ICS is only at 20%>.

In all semi-seriousness, we did see a jump of 5% for Ice Cream Sandwich from 15.8% to 20.8%, thanks to devices receiving updates across a number of carriers. Jelly Bean also jumped, though slightly to 1.2% (from 0.8%). Gingerbread, as you can imagine, started to decrease as phones made the jump from Android 2.3 to 4.0. And yeah, that’s pretty much that.

Monday 6 August 2012

Samsung Devices Sure To Get Android 4.1 Jelly Bean Update Soon!


Here is the list of five Samsung devices that are sure to get a Jelly Bean upgrade.



Samsung Galaxy SIII

Samsung Galaxy SIII has emerged as one of the most successful offerings of the Korean smartphone maker and has been one of the best-selling devices as well. The manufacturer cannot afford to leave its patrons in limbo. So the question is when will an upgrade for this one arrive. The company has not given an official word on it but rumours suggest that Galaxy SIII might get Jelly Bean update via Samsung KIES or over the air in the last quarter.

Samsung Galaxy S2

Samsung is reportedly working on providing Android 4.1 Jelly Bean upgrade for Galaxy S II. Only after the tests are done successfully, will the company send out Android 4.1 upgrade for SII.

Galaxy SII was originally launched with Android 2.3 Gingerbread and it received the Ice Cream Sandwich upgrade only recently. The owners of Galaxy SII are likely to receive the update in the fourth quarter.

Samsung Galaxy Note

Galaxy Note is one of the trend-setting devices lunched by Samsung. Since it is one of the premier devices from the company, Samsung cannot afford to miss out on this one. Samsung Galaxy Note was released with Gingerbread out of the box and performs well with ICS, after updates were rolled out. XDA Developers have already released a teaser of how Jelly Bean work on Galaxy Note. So it should not be a big deal for the company.

Samsung Galaxy Nexus

Samsung Galaxy Nexus is one of the first devices to receive Android 4.1 Jelly Bean upgrade. Google started rolling out Android 4.1 Jelly Bean on July 11 with Galaxy Nexus HSPA+. The upgrade was rolled out after Samsung`s win over Apple on the issue of patent infringement. The Korean manufacturer was able to convince the court to let the sales of Galaxy Nexus continue.

Samsung Nexus S

Samsung's Nexus S started getting the Android 4.1 Jelly Bean update on 20 July. Google has been able to keep its words as many Nexus S owners also reported to have received notification about the update. For those who have not received it, it is advised that they contact their carriers.

Tuesday 10 July 2012

API 16 (Jelly Bean) review


API 16 is clearly a minor update. If you look attentively to the API diff documentation, you will notice there has been just a few packages, classes and methods added. However, being a minor update doesn’t mean it is useless. Indeed, what I particularly appreciate about this release is it makes the API more consistent and clearer. Google obviously spent some time making the API more logical and hence easier to understand and use. The list below gives you a set of changes that brings uniformity and clearness to the framework.

From non-final to final: Prior API 16, View Property such as ALPHA, or ROTATION_X were not final. This was obviously a huge mistake because these properties was not intended to be modified (see my Google+ post). When I noticed it, I warned some of the framework engineers and I’m glad to see they fixed it even if it may break some applications.

Methods renaming: In order to always have consistency between getters and setters, some methods have been renamed. For instance, setAlpha(int) on ImageView is now setImageAlpha(int).

Added getter and setter: Prior API 16, it was sometimes impossible to do things in Java while it was completely possible from XML. For example, the size of a scrollbar wasn’t modifiable from Java but it was from XML. Some getters/setters have also been added to ensure all View attributes have a setter and its getter counterpart. In general, you can now set and get all attributes from a widget (ie object that extends View)

Deprecation of some classes: There has been a lot of criticism on the fact Renderscript rendering pipeline is now deprecated. I actually think Google made a mistake not informing developers that the graphic part of Renderscript was experimental at the first release. However, some widgets such as the Gallery are now deprecated and I think that’s a really good point. I really believe advanced widgets like the Gallery are not supposed to exist in the framework. For my point of view, a framework is not supposed to provide everything a developer need. It has to provide very simple but powerful APIs that let you, developers, create whatever you want whenever you want. A simple framework is easier to apprehend and understand and relieves Google of maintaining a too large/complex API. This deprecation (deprecation doesn’t mean it has been removed) is a good start and I hope Google will continue to remove/depreciate classes that should never has been there.1
While reading the entire API differences, I’ve also discovered several interesting changes:


  • A new display density has been introduced: DENSITY_XXHIGH which corresponds to 480 pixels per inch. It clearly demonstrates Google is thinking about Android in a long-term manner and starts to prepare the system to future screen densities. Personally I think this will be the last added density (no need to have a higher density on any device) but I can’t wait to see a Nexus device using it!


  • LongSparseArray has been made public or more specifically unhidden (it has always been in the Android source code). SparseArray<E>s, SparseBooleanArray and SparseIntArray are really great to avoid auto-boxing/auto-unboxing problems in maps. Prior API 16, the LongSparseArray was hidden. As a result, it is now possible to have maps in which keys are longs. This make me believe, the pool API (PoolManager, Poolable, etc.) that lets you easily create a pool object mechanism may be unhidden some day…


  • You can now synchronize your custom animations with the display vertical synchronization (vsync). This can be done using the Choreographer class directly or one of the new View methods (also available in the support library through the ViewCompat class): postOnAnimation(Runnable) and postInvalidateOnAnimation(). I applied it to my implementation of the fly-in app menu and I got to admit I love the result!


  • ViewPropertyAnimator now includes 3 more methods making the animation framework crystal clear and easier to use. Indeed, you can know define a start and/or action directly from it via with[End|Start]Action(Runnable). The API also includes a new withLayer() method. Thanks to this method chaining feature, creating, applying properties and starting an animation has never been so simple.


  • The WebView framework has also been updated because a new WebView.FindListener has been added. it lets you be notified as find-on-page operations progress. The outdated getZoomControls() method has also been completely removed. Here again, it brings clearness to the framework and remove redundancy (zoom controls can be disabled/enabled using WebSettings.setBuiltInZoomControls (boolean))


The minor Jelly Bean release clearly moves Android forward. I sincerely love the work Google has made on this release and hope they’ll continue to follow the path they’ve taken. Lots of developers may complain at first about the introduced changes and deprecations but this is for the good of Android. Google is preparing Android for the future. You, as a developer should stop complaining, get use to it and adapt yourself. Do not forget Android is now a 6 years-old system. Legacy is not something we can ignore.

My personal point of view about what a framework should be is also the explanation of why the fly-in app menu shouldn’t be part of the SDK. The Android SDK contains everything you need to create a stunning fly-in app menu. Stop asking Google integrating it in the SDK. That’s something that should be clearly done by Android developers and optionally by third-party libraries. From time to time I really believe Android developers are pretty lazy. They prefer spending time on askingbegging Google to help them rather than actually developing. Look at the permissive and powerful framework, read the documentation, etc. You have the power of Android in your hands: you just have to use it!

Monday 2 July 2012

Google I/O 2012 Summary


Google has added lots of updates in it’s latest Android OS 4.1 Jelly Bean !! Some Jelly Bean updates are :
  • Widgets are automatically resized to fit, and you can discard them by tossing them off the screen.
  • A better dictionary and predictive typing.
  • Offline voice typing using on-device voice recognition !!
  • Faster and smoother UI under project butter.
  • Deeper integration of Google services.
  • Google Now: “smartphones are only as smart as you tell them to be.” This changes now. Google Now gives you just the right information at just the right time.
  • New Android Beam features: share photo or video by tapping.
  • Project Butter
Jellybean is available OTA in mid July and available for developers right now !!
  • Added smart app updates added for honeycomb above. Now no need to download the complete apk !!
  • Android Cloud to Device Messaging delivers billions of messages every day!
  • Music, movies, TV shows added to google play !!
Time for Google’s Tablets !! Nexus 7 announced. Will ship with jellybean and will be built by ASUS!
  • 1280×800 display, Tegra 3 chipset, quad-core CPU, 12-core GPU.
  • Front-facing camera, WiFi. Bluetooth & NFC
  • Premium magazine experience, also TV and movies !
  • New features in Google maps. Offline maps now available !!


    Sergey Brin comes out with their Google Glass project !!

    He gives a live demo with the help of some sky divers using Google Glass. This demo is impossible to beat.
    Features:
    • Microphones for audio information and speaker. Gyroscope, accelerometer and compass. Multiple radios for communication.
    • It has a display, camera, powerful processor and a lot of memory. Touchpad on the side.