While Android might have started earlier than iOS, it was just some random idea by an unknown company.
iPhone development started in 2004, and Jobs informed Apple's Board (which Eric Schmidt sat on).
Schmidt panicked because he knew iPhone, if successful, would kill desktops and Google's desktop ad revenues.
Because of this, Schmidt (in the mother of all conflicts of interest) made Google buy Android in 2005 to compete with iPhone.
The first iPhone shipped in January 2007.
The public release of the Android beta on November 5, 2007.
The first commercial version, Android 1.0, was released on September 23,
The ENTIRE POINT of Google rushing Android phones to market was a response to Steve Jobs revealing the iPhone to him (confidentially while he was sitting on Apple's board)! If Schmidt isn't on Apple's board, there are no Android phones as you know them.
The irony is, Schmidt's evil plan didn't really work very well. The lion's share of mobile ad revenue goes through iPhone. So much so, that Google pays Apple billions of dollars per year just to be the default search engine.
One really wonders if Android has been net profitable for Google if you take all of that into account.