Chromium vs Android

There are a couple reasons why we open activities launched from Chrome with NEW_TASK flag. The biggest reason is that it provides a much clearer user experience: the user sees the new app as a separate entry in recents — also, if we were to place a different application on top of Chrome activity, the Chrome icon may end up opening that application sitting on top of Chrome, which is fairly confusing for the user.

Bug 445956, wherein the Chromium developers consider the Android task metaphor too confusing for users and work around it.

Programmatically adding a PagerTabStrip or PagerTitleStrip to a ViewPager on Android

The Lanyrd Android app does the majority of its layout programatically, because the views are described by a JSON file sent from the server. There aren’t a lot of resources on how to build a set of swipe-able views with a PagerTabStrip programmatically, so here’s what I’m doing:

pager = new ViewPager(context);

// ViewPagers must have a view ID. I use http://stackoverflow.com/a/15442997/656736 to generate them.
pager.setId(MyApplication.generateViewId());

PagerTabStrip strip = new PagerTabStrip(context);
ViewPager.LayoutParams layoutParams = new ViewPager.LayoutParams();
layoutParams.height = ViewPager.LayoutParams.WRAP_CONTENT;
layoutParams.width = ViewPager.LayoutParams.MATCH_PARENT;
layoutParams.gravity = Gravity.TOP;
pager.addView(strip, layoutParams);

Things about Google+

Some thoughts about Google+.

First the simple one. I understand / appreciate Twitter’s simplicity a lot more now. It only does one thing. You don’t need to keep track of notifications and posts and tags and checkins and comments. You just read the timeline till you get bored or catch up.

Secondly, on an Android phone, with the Plus app installed, I’m now able to share my photos and comments, and links, you name it, into Plus from the system-wide Share menu, using any application on the system that supported sharing. On my iPhone, I need to wait for the G+ API to be released, then for all of the applications I use to individually invent and implement their own seperate ways of adding a “share to Google+” button, then for Apple to approve new releases of all their software, then I have to upgrade them all on my phone.

One of the reasons that Apple makes products with such nice experiences is because they control the stack from the hardware level right up to the applications on the phone. Everything works together. But that’s where Apple’s work stops – all the applications are (intentionally) silos that don’t / can’t talk to each other. The assumption is that once you have an application to do a thing, you’re finished. To do a different thing, use a different application.

Google’s management / control doesn’t reach down as far as the hardware, or even the OS layer (as the operators / manufacturers can do a lot of things to the platform in the name of differentiation), so Android suffers from a framgmentation problem at those levels. But at the network ecosystem level, they’re stronger than Apple – all of their internet products play together reasonably well. It’s not great, but it’s decent. Google+ can recommend contacts from my address book, or because I’ve sent them mail in the past. It can use the profile I already had. I can use photos that are already in Picassa in my posts without me having to faff (if I used picassa..).

Android has better Share support because Android is a platform that understands the Internet, whereas iOS stops at the Application layer. If you care about having nice applications, iOS is better, because everything about it is aimed at having nice applications. But in the next version of iOS, Apple might manage to ship system-wide support for Twitter, just as everyone I know stops caring.

(Related – when I get a notification on iOS that I have a new @reply tweet, or a new message on some service, it’s merely a notification. I have to launch the app to see what it is. If I’m underground when I see the notification, then I’m just stuffed. On Android, I’ll have the notification because the app already has the data. When I lived in Berlin, this didn’t matter, because you can get decent data everywhere, even on the u-bahn. In London, data is a lot spottier, and it’s changing the importance I put on offline support and background-fetching of data.)

Notification slide-downs

Android

The pull-down is a progressive reveal: when it’s half-way out, you see the top half, which is probably where the stuff you care about is.

iOS 5

The pull-down slides the view into place: when it’s half-way out, you see the bottom half, which will be blank if you only have a couple of notifications. Also, there’s no indication that you have any notifications unless you pull the slide out.

Pretty trivial, to be honest. And both entirely fixable before the actual release of the thing.

OS release schedules

Google delays Honeycomb tablet OS; what if that was Apple

Can you imagine if it were Apple delaying a software release. What would the press say if Apple admitted it took shortcuts with its OS to keep up with Google and now they couldn’t release it? The press would have a field day with that story.

You’re right. Apple would never release, say, an OS with multitasking in it for only their new phone platform, and not make it available for their tablets for months. They’d get ROASTED.

OH WAIT.

What Are Tablets For? · The trade-off is obvious. You win because you can show a bigger picture, which is important, and you lose because it just won’t fit in many pockets, which is important. It’ll go in most purses, though.

ongoing by Tim Bray · Galaxy Tab

Tim thinks tablets are big phones, then. And maybe the tab is. But my iPad is a computer, not a phone.

(via Instapaper)

Links on iPhone and Android

Pages that have caused some sort of emotional response in me. There’s a bias here towards things complaining about App Store policies, because they annoy me, but there’s the odd pro-Apple piece in there as well; they might count as balance.

They’re listed in the order I came across them. I may add to the list later – I’ll probably add things to it as I find them.

Ben Ward’s Scattered Mind

So, the original, 3 years old EDGE iPhone, which has not been on sale since the iPhone 3G was launched in 2008, and which has been supported with every iPhone OS update so far, is a comparable ‘legacy’ situation to the fact I can go to Verizon right now and purchase a ‘Motorola Devour’ that only runs Android 1.6?

— Ben Ward

Sayonara, iPhone: Why I’m Switching to Android

What makes this even more insulting is that Jobs tries to dress up his selfishness as a kind of altruism. He says it’s all about creating a beautiful experience, that while he may be selling you an intentionally crippled device, he’s doing it for your own good.

— Dan Lyons

Android vs. iPhone Notes – Steven Frank

A long list of pros/cons that I can’t reasonably excerpt here.

I’m Abandoning iPhone Development

Ask permission environments crush creativity and innovation. In healthy environments, when would-be innovators/creators identify opportunities the only thing that stands between the idea and its realization is work. In the iPhone OS environment when you see an opportunity, you put in work first, ask Apple’s permission and then, only after gaining their approval, your idea can be realized.

— Dan Grigsby

*cough* bullshit *cough*

Apple is a company that produces amazing, human-usable products. I love them for the same reason I love any such company, and I forgive them their eccentricities because their products are so amazing. They make decisions that I’m told are bad for me, yet I don’t see that reflected in their products as I use them.

— Mike Lee

revMobile and Apple’s new iPhone SDK Agreement

In response to a question in a recent Apple shareholder’s meeting, Jobs said that a HyperCard-like product for the iPad would be a good idea “though someone would have to build it”.

Steve Jobs has now rejected our proposal and made it clear that he has no interest in having revMobile available on the iPhone or iPad in any form

— Kevin Miller

[C4 release];

Apple is crazy-innovative in terms of hardware and software design, but I can count the total number of software engineering advances they’ve made on one hand.

Section 3.3.1 makes developers wholly reliant on Apple for software engineering innovation.

— Jonathan ‘Wolf’ Rentzsch

iPad definitely a threat to Windows

I love my ThinkPad T400. But when I go to it, I have to pray whether it’ll come out of sleep. If it does come out of sleep, it’ll be slow. Maybe it will be out of batteries. Who knows.

— frogboy

Open is for losers

When Costolo asked whether he would invest in a company building for the iPhone versus Google’s Android platform, [Paul] Graham answered, “Of course, iPhone. I’m talking about what I hope will set us free, not what will generate opportunities.

— Anthony Ha

Regarding John Nack on Apple’s Control Over Native iPhone OS Software

Apple is testing whether a tightly controlled and managed app console platform will succeed or fail based on its own merits, as determined by customers.

— John Gruber

Cocoa, Flash, and Safari

HTML5 is an open standard. Yes, the W3C process can be frustrating. But Apple is a W3C member, and more importantly, it has a product in Safari / WebKit that not only tracks the standard, but drives it. WebKit has been a leader in modern web technology adoption for years. Apple happily gives its improvements back to the public WebKit branch, because leading is the next best thing after owning.

— Matt Drance

Is Android Evil?

Is Android evil? No, it isn’t. It has done no harm – quite the contrary, Android has boosted the level of innovation on mobile software. The point of the article is not to vilify Google or concoct visions of Darth Vader; but to balance the level of openness hysteria with a reality check on the commercial dynamics of mobile open source.

— Andreas Constantinou

Five rational arguments against Apple’s 3.3.1 policy

It’s hard to build a business on a platform where you feel like you cannot trust the men in power. If they can take down Adobe a few days before the launch of their flagship product, what hope do smaller players hold?

[..] This is especially true when Tier A developers like EA gets away with things that Tier C developers in their basement don’t. It breeds an air of aristocracy where the lords can roam as they please but the peasants are kept on a tight leash.

— David Heinemeier Hansson

Apple’s wager

Cumulatively, these actions represent a huge bet placed by Apple. The proposition is this: Apple is betting it can grow its platform fast enough, using any means necessary, that developers will stick around despite all the hardships and shoddy treatment. Each time it chooses to do what it thinks is best for the future of the iPhone OS platform instead of what will please developers, Apple is pushing more chips into the pot.

— John Siracusa

Why Apple Changed Section 3.3.1

If you’re a developer and you’ve been following Apple’s advice, you will never even notice this rule. You’re already using Xcode, Objective-C, and WebKit. If you’re an iPhone developer and you are not following Apple’s advice, you’re going to get screwed eventually. If you are constitutionally opposed to developing for a platform where you’re expected to follow the advice of the platform vendor, the iPhone OS is not the platform for you. It never was. It never will be.

— John Gruber

Pain Is A Gift

Pain is a gift: the signal that prevents a burned finger tip from becoming a body engulfed in flames. Apple is numb from success, and I hope the emerging competition from Google and others will re-sensitize them to the threat of failure.

— Daniel Jalkut

Android VM Performance is not a Factor

Fifteen years ago, all we thought that Java needed to rule the known universe was a faster VM. If we just had that, Windows and all native UI applications were toast. After lots of hard work by wicked smart people, and more than a few years, Java VM performance was increased to the point where it wasn’t a problem any more. But that didn’t change the equation of where Java did or didn’t succeed. Most notably, the Java GUI applications didn’t suddenly kick native Windows or MacOS applications to the curb.

— James Duncan Davidson

From iPhone to Android

Where Android shines in some areas, it really falls apart in others. Things that are ridiculously simple on the iPhone such as taking a screenshot involves installing an SDK and going through a 15 step tutorial to do on Android.

— Justin Williams

Gameloft Keeps Getting it Wrong

According to our refund policy, once the game is successfully installed, we cannot resend it for any reason, unless you buy it again. One purchase entitles you to one download of the game to one phone number and on one phone model only. If you delete or otherwise remove the game from your phone, or change your handset, you will have to buy it again.

— Scott Webster

(Turns out, a single app store does stop people pulling really nasty moves)

Sentence first — verdict afterwards

Our application is being removed for a very murky reason, one which is nowhere to be found in any documentation that Apple give us developers, even worse one which Apple themselves refuse to explain, or put in writing.

— ShiftyJelly blog

Steve Jobs Live at D8

“We’re just trying to make great products,” says Jobs again. “We don’t think Flash makes a great product, so we’re leaving it out. Instead, we’re going to focus on technologies that are in ascendancy. If we succeed, people will buy them and if we don’t they won’t….And, so far, I have to say, people seem to be liking the iPad. We are selling an iPad every 3 seconds.”

Stance

I don’t think Steve Jobs or Apple is evil, but I do think that the App Store is an idea that’s been executed in a way that deeply offends everyone involved that isn’t Apple.

— waffle

Pulse iPad App Gets Steve Jobs’s Praise in Morning…Then Booted From App Store Hours Later After NYT Complains

[..] by the afternoon, that flush of entrepreneurial success had turned sour, after Apple informed the two that Pulse was being pulled from the App Store after it received a written notice from the New York Times Company declaring that “The New York Times Company believes your application named ‘Pulse News Reader’ infringes The New York Times Company’s rights.”

— Kara Swisher

Google protests Apple’s iPhone developers agreement

The updated language — which was first noted by the MediaMemo blog — appeared to
put in place significant new restrictions, particularly when it comes to Google.

Hello Lua

While explicit approval from Apple is still required, these new terms seem to acknowledge that there’s a difference between an app that happens to have non-compiled code, and a meta-platform. It’s a step that should allow for many new possibilities.

— Matt Drance

Joyce’s Ulysses Banned Again—by Apple

Again, Apple can censor what it wants, and the rest of us can like it or not. But Apple is making a mockery of its own anti-porn stance in this instance. There is no clear reason why it should define obscenity more narrowly than the U.S. courts do. And even if there were, broadening the definition of porn to frivolous extremes turns the App Store into a joke at a moment when viable alternatives are emerging.

— Kevin Kelleher

Almost on the App Store

When the Apple reviewers saw bs chunks of code littered throughout the documentation, it’s not hard to see how they thought I was running a custom script interpreter on the phone.

— Rob Rhyne

Hard to judge this one. In certain lights, it is interpreting code. From another angle, it’s just loading a document. Is there really a distinction anyway?

On needing approval for what we create, and losing control over how it’s distributed

The problem is that fundamentally, it’s just never going to be possible to prevent the garbage. If you want to have a boutique, like the Apple retail stores, where you can buy a specially selected subset of merchandise from third parties, then great. But instead, we’ve conflated wanting to have that kind of retail control (a smart idea) with the only conduit by which software can be sold for the platform (an already flawed idea).

— Ben Fry

Complexity

[..] the iPad attempts to simplify computing not by some stroke of magic, but by doing less. You can’t have full multitasking and multiple apps oncscreen at the same time and apps installable from everywhere and compatibility with Mac OS X and a physical keyboard AND simplicity.

— Neven Mrgan

Briefs.app

Three fucking months Briefs.app has sat in the review queue, and in that time, the app review team has allowed other prototyping applications onto the app store: applications that do the same basic tasks that Briefs.app was created to do.

— Jeff LaMarche

Android / HTML Simplenote client

Recently I’ve been bouncing back and forth a lot between Android and iPhone, both platforms now having multiple aspects that I like and multiple aspects that annoy me. In an effort to remove one of the major problems with Android, I’ve written myself a mobile HTML Simplenote client so I can read my notes when away from the iPhone (simplenote being one of the Killer Apps of the iPhone for me).

 

It’s an HTML5 ‘app’, is as much as android has those. It stores the contents of your notes in local storage, so it’s fast, and it’ll poll for changes, and it’s got caching of files, so it should work if your phone is offline letting you read your notes on an aeroplane or something. If you’re weird and want to use it on an iPhone, it works there as well and has proper home screen bookmark support.

Caveats – It’s an early hack – this represents a few evenings of work (mostly spent yelling at cache manifests), not a real project. It’s also read-only – you can’t change notes yet. 90% of my use case is just reading things I’ve written on the desktop, so it’s not likely to gain this ability any time soon either. I don’t really care about the ability to edit notes.

Most importantly, because of HTML and cross-domain stuff being what it is, all requests made my this app go to MY server, and I proxy them to the simplenote server. This means that (a) I might be logging your password (I’m not, but you can’t prove that), and (b) it all goes over HTTP because I don’t have an HTTPS certificate, so someone else can sniff your password.

DO NOT USE IT IF YOU CARE ABOUT THIS.

Anyway. check out the app itself, or have a look at the inevitable github project.

Android Intent consistency

Some time ago, I wrote a thing about Android that mentioned how nice Activities are. I’ve been trying to write the odd Android app recently (aren’t damp miserable evenings great?) and this has prompted me to work out exactly what’s going on, and I’m very confused.

The iPhone is simple, though very annoying. If you’re in a twitter client, and you click a web link, the twitter client will quit (let’s ignore the 4.0 multi-tasking stuff here, because it doesn’t really change the underlying metaphor) and the web browser will open. The only way to get back to your twitters is to quit the web browser, run the twitter client again, and then maybe it’s remembered where you were. Also, your web browser still has that window open in the background.

Sometimes, to get round this, the twitter client implements its own web view. You click a link, and you’ll get an embedded web browser. This time you can go back to the twitter client, and you’re not messing with the state of another application. But you can’t bookmark the page you’re looking at, because you’re not really in your web browser. And the twitter client has had to do a lot of programming to get to this point, which I’d rather they spent on twitter-related features.

On Android, the interface revolves around Intents. My twitter client can just start a ‘VIEW’ intent with the URL of the page I want to look like. The system will interpret this by opening a web browser and putting it over my twitter client, displaying the page I wanted. If I press the hardware ‘Back’ button, I’ll go back to the twitter client. Best of both worlds yay.

But at a system level there really is a web browser application here that I’m starting. It’s not just a magical disconnected window. What’s going on? Can I construct a meaningful model that tells me what’s going on?

Testing on my Hero here has revealed the following behaviour:

Suppose I have my web browser open, looking at foo.com, and I have some browser history. Wow, what a site. Now I tap the Home button, and open my twitter client, to see if anything is up. Someone has twittered something with a link, so I click that link. A web browser window appears, and the link opens, so now I’m looking at bar.com. Let’s call this my base state.

Suppose I press ‘Back’. I return to my twitter client! Yay. If I then press Home and open my web browser app, I see foo.com. Perfect.

Ok, so instead of that, I don’t press Back from the browser to get back to twitter, but instead I press Home, then re-launch my web browser application. Now when it opens, I’m looking at bar.com. If I press Back in this state, I return to the home screen. If I now open the web browser again, I find myself looking at foo.com. But if I press back now, I won’t return home, instead I navigate backwards in my browser history.

So opening a link from another application has actually hijacked my current browser tab/window/whatever, and navigated it somewhere else, but with a hook in the history so that when you press ‘back’ over that note, it closes the browser and returns to what you were doing before. Which should have been twitter, but I’d relaunched the browser from the home screen, so it closed the browser. When I returned to my browser and saw foo.com before, it was because I’d navigated back to it from bar.com, but the interface had hidden that fact from me.

This is confusing.

Contact sync is scary

So what the Nexus One did was decide that my device was the Master, and the Gmail server hosting all of my contacts should be overwritten with this master content. [..] I had 5 years worth of contacts in my gmail, from so many projects and encompassing so many people I’ve met and done work with.

Alfie lost his GMail contacts. I feel for him; contact (and calendar) sync can be magic, annoying (because now you have two of everything) or _lethal_, because everything is suddenly gone, and there’s no undo. But there’s an important lesson here. Back things up. Just because it’s in the cloud doesn’t mean you don’t have to have backups. It just makes doing them harder.