Introducing the OMH Maps Client Library: Simplifying Unified Mapping for Android Developers

Introducing

August 29 2023

If you have a history as an Android developer, chances are that you’ve come across the challenges posed by compatibility when crafting applications intended to function across various Android platforms. This becomes particularly intricate when dealing with devices embedded with Google Mobile Services (GMS). I am thrilled to introduce a promising solution: the latest Map Client Library, which comes as an integral facet of the Open Mobile Hub (OMH) open-source initiative. This innovation holds the potential to effectively address and surmount these longstanding issues.

This OMH Maps Client Library is an Android SDK that simplifies map integration, catering to both Google Mobile Services (GMS) and non-GMS devices. It conforms to our set of guidelines which ensure it will remain idiomatic, consistent, approachable, and dependable across all Android platforms. You can easily add Google Maps, OpenStreetMap, and other third-party maps via the Plugins architecture to your apps. No more juggling separate codebases! This library provides a unified interface for a consistent map experience, making your development process smoother and more efficient.

OMH Main Benefits

🌍 Unified Experience: Say goodbye to maintaining separate code for different Android builds. OMH Maps allows your app to work seamlessly on various devices.

🔧 Multiple Providers/Open Interfaces: With support for Google Maps and OpenStreetMap, you can easily switch between map providers without hassle.

🚀 Effortless Integration: Implementing maps becomes a breeze with the comprehensive Getting Started guide in our GitHub repository:

🆓 Open Source: As an open-source project, OMH offers several benefits associated with open-source software, including freedom and flexibility in usage, high quality, security, compliance, and access to support and innovation.

Learn More

How OMH Maps Resolves the Issue

OMH Maps presents a transformative solution to the problem of integrating diverse mapping service providers. The crux of this solution is the OMH Maps unified API, which offers a single interface accessed via client libraries for multiple API Service Providers. This approach allows providers like Google Maps and OpenStreetMap to seamlessly integrate their services within the OMH Maps framework. You can find their implementations at OMH Google Maps and OMH OpenStreetMap.

The ultimate aim is to broaden this approach to include more providers like MapBox and Microsoft Bing Maps, all conforming to the OMH Maps API. This collective effort empowers developers to build applications once, eliminating the need for code modifications when switching between mapping providers.

OMH

OMH Maps’ success lies in its ability to provide a uniform developer experience across different services, simplifying the development process and enhancing flexibility for developers.

Let’s see it in Action

To introduce the new client, we’ll explore some sample apps with examples that walk through some of the key functionality of the SDK, including support of both GMS and non-GMS platforms, as shown below:

Step 1: Initializing OmhMapProvider with Google Maps and OpenStreetMap

In this step, we will initialize the OmhMapProvider to support both Google Maps Services (GMS) and non-GMS devices. This involves configuring the provider to seamlessly switch between Google Maps and OpenStreetMap based on device capabilities and user preferences. This step sets the foundation for a versatile map experience across various devices.

OMH


Step 2: Integrate OmhMapFragment into your map fragment

This section demonstrates how to seamlessly integrate OmhMapFragment to create interactive maps within your Android application.

OMH


Step 3: Test Across GMS and Non-GMS Devices

Unified codebase on different devices. Run the app to verify its implementation. Witness its adaptability across GMS devices like Pixel and Samsung, as well as non-GMS devices like Amazon FireOS and Huawei. This validates the successful integration of Google Maps and OpenStreetMap, ensuring a consistent user experience.

Non-GMS Device

Maps non-GMS

GMS Device

Maps GMS

OMH

Fork our samples and try them yourself.

Learn more

For additional information about getting started, documentation, and the code sample, check out the GitHub link here: https://github.com/openmobilehub/omh-maps/

Thank you for reading this OMH SDK article! We hope that you learned something new and welcome you to share this post. We are open to any open-source contributors of this project, please contact us at contact@openmobilehub.com if you are interested in joining the unified mapping revolution now!

#openmobilehub #OMHMaps #AndroidDevelopment #MappingSimplified #UnifiedExperience