Java framework to support Android and iOS devices

I am looking for a framework, code and examples how to support Android and iOS devices.
What should be the best and simple way?
For example to have parameter with the device type (Android, iOS) and to create AndroidDriver or iOSDriver according to this parameter and also use this parameter to load the apk or api, set the setCapability according to this parameter.
Other suggestions and examples?

I assume this is a common question but I did not find resources about that.

Thanks,
Eyal

I used this Udemy course when I began to do mobile automation.
All the course is with Java.
Don’t buy it at full price, register to the site and wait a bit until a mail with spacial discounts will arrive to you, then you can buy it at 10\15$ instead of it full price.

https://www.udemy.com/mobile-automation-using-appiumselenium-3/learn/v4/overview

Best of luck
Adam

Hi Eyal,

I can Help on preparing framework as a backend support if required. I you any quires you can ping on email. My mail id is [email protected]