Apple, for the first time in years, is hearing footsteps.
The maker of iPhones, iPads and iPods has never faced a challenger able to make a truly popular and profitable smartphone or tablet - not Dell, not Hewlett-Packard, not Nokia, not BlackBerry - until Samsung Electronics.
The South Korean manufacturer's Galaxy S III smartphone is the first device to run neck and neck with Apple's iPhone in sales. Armed with other Galaxy phones and tablets, Samsung has emerged as a potent challenger to Apple, the top consumer electronics maker.
The two companies are the only ones turning profits in the highly competitive mobile phone industry, with Apple taking 72 per cent of the earnings and Samsung the rest.
Yet these two rivals, who have battled in the marketplace and in the courts worldwide, could not be more different.
Samsung Electronics, a major part of South Korea's expansive Samsung Group, makes computer chips and flat-panel displays as well as a wide range of consumer products including refrigerators, washers and dryers, cameras, vacuum cleaners, PCs, printers and TVs.
Where Apple stakes its success on creating new markets and dominating them, as it did with the iPhone and iPad, Samsung invests heavily in studying existing markets and innovating inside them.
"We get most of our ideas from the market," said Kim Hyun-suk, an executive vice president at Samsung, in a conversation about the future of mobile devices and television. "The market is a driver, so we don't intend to drive the market in a certain direction," he said.
That is in stark contrast to the philosophy of Apple's founder, Steve Jobs, who rejected the notion of relying on market research. He memorably said that consumers don't know what they want.
Nearly everything at Samsung, from the way it does research to its manufacturing, is unlike Apple. It taunts Apple in its cheeky advertisements while Apple stays above the fray.
And Samsung may even be putting some pressure on Apple's world-class designers. Before Apple released the iPhone 5, which had a larger screen than earlier models, Samsung had already been selling phones with even bigger displays, like the 5.3-inch screen Galaxy Note, a smartphone so wide that gadget blogs call it a phablet.
Samsung outspends Apple on research and development: $10.5 billion, or 5.7 per cent of revenue, compared with $3.4 billion, or 2 per cent. (Samsung Electronics is slightly bigger than Apple in terms of revenue - $183.5 billion compared with $156.5 billion - but Apple is larger in terms of stock market value.)
Samsung has 60,000 staff members working in 34 research centers across the globe, including Russia, Britain, India, Japan, Israel, China and Silicon Valley. It polls consumers and buys third-party research reports, but it also embeds employees in countries to study trends or merely to find inspiration for ideas.
Designers of the Galaxy S III say they drew inspiration from trips to Cambodia and Helsinki, a Salvador Dali art exhibit and even a balloon ride in an African forest. (It employs 1,000 designers with different backgrounds like psychology, sociology, economy management and engineering.)
"The research process is unimaginable," said Donghoon Chang, an executive vice president of Samsung who leads the company's design efforts. "We go through all avenues to make sure we read the trends correctly."
He said that when the company researches markets for any particular product, it is also looking at trends in fashion, automobiles and interior design.
Hangil Song, a Samsung product designer, described a visit to the Marina Bay Sands resort in Singapore, where he said he was amazed by the views of the sky, the cityscape and the water. He wanted to create an effect where water was overflowing from the screen. As a result, taps and swipes on the Galaxy S III's phone screen create a unique ripple effect.
The genesis of the wide Galaxy Note phone reflects that same kind of consumer research. From focus groups and surveys, Samsung found that many respondents wanted a device that was good for handwriting, drawing and sharing notes. Asian-language speakers, in particular, found it easier to write characters on a device using a pen than typing.
Those insights led to the Note, a smartphone that comes with a digital pen.
In courts, jury members have said some of Samsung's research appears to comes closer to copying. Apple sued Samsung in US District Court last year for patent infringement and won a $1 billion judgment. One of the most explosive pieces of evidence was a detailed report breaking down each hardware and software feature of the iPhone and how each compared to Samsung phone features. Samsung is fighting the decision in court.
Samsung says studying the market helps it build confidence for the wireless carriers that its mobile devices will sell well. That, in turn, persuades the carriers to aggressively sell Samsung phones and tablets.
"That's kind of the secret sauce," said Kevin Packingham, chief product officer of Samsung. (Samsung also spends heavily on advertising globally. It outspends Apple and Microsoft.)
Daniel Hesse, Sprint's chief executive, called Samsung a "terrific partner" because of its willingness to work with the carriers on the creation of phones.
For carriers, that could be a refreshing alternative to working with Apple, which completely controls the design of its iPhone's hardware and software.
"They work with the carriers, they want to hear from you what you want, they don't tell you what it's going to be. It's very two-way," Hesse said.
Samsung differs in one other important way. It remains a manufacturer, while Apple contracts out the assembly of its devices. Horace H Dediu, a mobile industry analyst at Asymco, said that historically, it built its business around producing and selling components to other manufacturers, including Apple, Sony and Hewlett-Packard.
While Samsung had been making and selling consumer electronics in South Korea and developing markets for decades, these relationships taught it a lot about competing with - and beating - the biggest names in the industry. By working with so many companies, it gets insight into how to plan investments for successful products.
And it can use the same resources to build its own products, Dediu said. This is why Samsung has long had a reputation of being a "fast follower."
Apple has been one of Samsung's largest customers. Samsung's flash memory processors, graphic chips, solid-state drives and display parts have appeared in Apple's iPhones, iPads and iPod touch devices and MacBooks. But for some of its latest mobile products, Apple has been seeking other vendors like Toshiba, Elpida and Sharp to use their components instead.
Having worked closely with Apple and other companies for years, Samsung, which dedicated $21 billion last year - almost twice as much as Apple - for capital expenditures, can easily get a sense of how to plan production and distribution of a successful phone, Dediu said.
The next battle between Apple and Samsung is expected to be in TVs and wearable computers. Despite being labeled a fast follower, Samsung doesn't appear to be waiting for Apple to make the first move in smarter TVs. Samsung is offering a box that people can buy to upgrade the speed and software of their Samsung TV, similar to the way they would get software upgrades for their phones.
This year, most of the televisions it is selling are internet-connected and can run apps that help customers find what to watch. That's something similar to what Apple watchers have been predicting for years from the Cupertino, California, company.
Dediu said that Samsung has made no serious investment in the cloud, where content is stored on remote servers and pulled from people's devices over the Internet. The cloud could play a more crucial role as mobile products shift away from big screens toward wearable devices, like glasses and wrist devices, he said.
But then, the one thing Samsung may have trouble learning is how exactly Apple is going to swerve next.