How to run the cases based on platform(Android and iOS)

How to detect the platform using appium and run the cases in Android and iOS?

Is it correct to get the platform using System.getProperty? If it is right mean, how to done please give the sample code for that. It would be helpful for me.

Hi Loga,

im no expert, but for my cases, where I will have multiple platforms and devices, im using a webhook to instantiate the Android or iosDriver, then I inject the driver to a base class. But in the and, I have a Base Class for android and another for ios. Because the steps are different for each platform.