Like Apple (NASDAQ:AAPL), Samsung (NASDAQOTH:SSNLF) relies on sales of mobile hardware for much of its revenue and profit -- but unlike Apple, it doesn't own the operating system powering most of these devices.

It might one day -- sort of. Samsung is increasingly taking steps to differentiate its products from other devices running Google's (NASDAQ:GOOGL) Android: pushing exclusive apps, partnering with other software developers, and building a hardware ecosystem. In time, Samsung's dominance of Android could prove problematic for Google.

Samsung's big problem
Samsung has a problem of its own -- customer retention. Apple's customers are famously loyal: A recent study from Consumer Intelligence Research Partners, or CIRP, found that 81% of iPhone owners stayed with Apple when it came time to upgrade. Users of Android are less loyal in general (only 68% in CIRP's study stayed), but Samsung has even more reason to be concerned.

Because Apple controls its operating system, its phones are the only option when it comes to iOS. Users who have poured hundreds (perhaps thousands) of dollars into Apple's ecosystem on books, music, movies and apps is essentially stuck. Sure, they could make the switch to Android, but bringing their media with them would be a pain, and the apps they bought for their old iPhone wouldn't carry over.

Samsung doesn't have this luxury. A customer who pours money into Google's app store, Google Play, is loyal to Google -- not Samsung. Someone with Samsung's Galaxy S3 today could upgrade to an HTC One tomorrow.

The first Samsung Developer Conference
To counteract that possibility, Samsung is slowly building its own ecosystem on top of Google's, blending hardware compatibility with software exclusivity. Samsung offers its own apps to compete with Google's, and then uses its hardware to encourage their use. Samsung's native email app, for example, might not be as good as Google's version, but only Samsung's app works with the S-pen, its smart stylus.

Then there are Samsung's deals with other developers: Dropbox gives 50 GB of free cloud storage to owners of most newer Samsung handsets -- discouraging them from relying on Google's competing product, Drive. Twitter's new Android-tablet app, is a Samsung exclusive (for the time being).

More deals could be on the horizon. Sunday marks the start of Samsung's Developer Conference, a first for the company. Both Apple and Google use these conferences to encourage developers to take advantage of their platforms; Samsung's decision to host its own suggests a focus on software going forward.

The Galaxy Gear lock-in
And while it works to court developers, Samsung is already flexing its hardware muscle. Its new Galaxy Gear smartwatch requires an Android handset to function -- but not just any phone running Google's operating system will do.

Right now, the Galaxy Gear only works with Samsung's Galaxy Note 3. Soon, owners of other Galaxy handsets will be able to use the Gear, and Samsung has said it plans to bring compatibility to phones made by other manufacturers, but it isn't clear how that would work. To put apps on the Gear, you need to use Samsung's own app store, which isn't available on Google Play.

The Galaxy Gear could be just the first in a long-line of devices. Based on a recent patent filing, Samsung appears to be working on an alternative to Google Glass -- other wearables could follow.

Perhaps that's why Google is pushing back. Various reports have suggested that Google is about to unveil its own smartwatch, a likely possibility given that Google acquired smartwatch-maker WIMM Labs last year. When Google unveils its device, it will compete with Samsung's offering, but will likely work with nearly any Android handset.

Is Google's mobile strategy in danger?
The danger to Google is that Samsung could, at some future date, decide to completely fork Android -- removing Google's apps and services in place of its own. That would be a crushing blow to Google's mobile strategy, as the search giant gives Android away for free in the hopes that it will encourage mobile use of its apps and Web services.

Nevertheless, Samsung has to do something. It's the dominant Android-handset maker now, but that might not always be the case -- unlike Apple, it doesn't have the luxury of having a monopoly on the production of Android handsets.

Sam Mattera has no position in any stocks mentioned. The Motley Fool recommends and owns shares of Apple and Google. Try any of our Foolish newsletter services free for 30 days. We Fools don't all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.