Defining condition based on what device the app is on?

Hi bubblers.
I’m in full progress to develop my first native mobile app and are only missing a few things to be done.
One feature I have is to navigate to the phone’s map app and navigate to an address.

But I want to know if it is possible to define in a condition if it’s an android or an apple phone. Because that’s important for if it should open Google Maps or Apple Maps