Shares of motion sensor maker InvenSense (NYSE:INVN) have fallen nearly 50% over the past 12 months, due to its loss of the Apple (NASDAQ:AAPL) Watch to STMicroelectronics (NYSE:STM) and sluggish sales growth. Now that the stock has retreated near its IPO price of $7.50, some investors might be thinking about buying the stock as a contrarian investment. But before they do, they should recognize the two biggest threats to InvenSense's future.

Image Source: InvenSense.

1. Slowing smartphone sales
InvenSense's 6-axis gyroscope and accelerometer combo is used in Apple's iPhone 6s, Samsung's Galaxy S6, and many other mobile devices.Orders from Apple and Samsung accounted for nearly 60% of InvenSense's revenue last year.

Unfortunately, Apple and Samsung's smartphone sales have slowed down over the past year due to intense competition and market saturation. Apple's iPhone revenue rose just 1% annually last quarter and is widely expected to decline for the full year. Samsung's mobile device revenues declined 7% annually last quarter. As a result, InvenSense's sales only rose 4% annually last quarter, compared to 24% growth in the previous quarter and 74% growth a year earlier.

Looking ahead, research firm Gartner expects global smartphone sales to only rise 7% this year, with most of that growth fueled by low-end devices in emerging markets. The OEMs which make those devices, which cost as little as $50, could prefer to install cheaper and older sensors to cut costs. That would be bad news for InvenSense, which relied on smartphone and tablet sensors for 65% of its revenue last quarter.

2. STMicro is bigger and hungrier
Prior to the launch of the Apple Watch, InvenSense boldly claimed that it had a 100% share in smartwatch motion sensors. But after STMicro won the Apple Watch, InvenSense's market share was quickly cut in half.

Image Source: Apple.

STMicro previously supplied the accelerometer and gyroscope for the iPhone, but Apple awarded that slot to InvenSense in the iPhone 6s. That's because Apple frequently alternates between suppliers, which prevents it from becoming too dependent on a single supplier while giving it more clout to negotiate favorable prices. This means that InvenSense investors shouldn't get too comfortable with Apple installing its motion sensors in iPhones.

Samsung has also been using more STMicro components lately, including a touchscreen controller for the Galaxy S6 and an image-stabilization gyroscope for the Galaxy S7. That second win is troubling for InvenSense, since image-stabilization sensors accounted for 14% of its sales last quarter. Those wins also indicate that STMicro, which has deeper pockets and operates on slimmer margins than InvenSense, might undercut InvenSense to score more business from its two biggest customers.

InvenSense's plans to counter those threats
InvenSense believes that it can stay ahead of the competition with new sensors for drones, security systems, connected cars, and industrial applications. These sensors, which are grouped with its Internet of Things sensors, accounted for 21% of InvenSense's sales last quarter. Unfortunately, STMicro plans to expand into the same markets.

InvenSense also recently introduced "ultrasonic" fingerprint sensors which can scan through glass, metal, moisture, and other contaminants. Therefore, instead of using a stand-alone fingerprint scanning button, companies can integrate fingerprint sensors directly onto their mobile displays. But as fellow Fool Ashraf Eassa pointed out last November, Apple is more likely to keep using its own fingerprint scanning tech instead of a third-party solution. Meanwhile, margin-starved Android OEMs could shun the sensors as an unnecessary expense.

Is InvenSense worth buying at its IPO price?
Despite those challenges, analysts still expect the company to grow its annual earnings 18% over the next five years, which gives it an "undervalued" 5-year PEG ratio of 0.9. With an enterprise value of $610 million, the company could also be a smart acquisition for STMicro or other chipmakers.

Unfortunately, InvenSense's low valuation and buyout potential don't make it a reliable investment in my book. The slowdown in mobile device sales and the threat of larger rivals selling similar cheaper components don't bode well for the company, and indicate that the stock could continue to fall.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.