How to identify the browsername that is being used?

Hello,

I work on an advertising app where i will be sharing the link of the product in social media like facebook.
Now when i click on the shared link on the Facebook, it will be redirected to products merchant page which has to be chrome browser for Android and Safari for iOS.
Now i need to verify whether my product has been opened in chrome browser. Can anyone help me how i can verify the browserName here?

Thanks,
An_Kur.

@An_Kur You can define ‘BrowserName’ in your capabilities.
Details can be found on below mentioned link:
http://appium.io/docs/en/writing-running-appium/caps/

System.out.println(driver.getTitle());
System.out.println(driver.getCurrentUrl());

@chetan_thummar Thanks for your reply,
I am getting the title of the webpage but not the browserName.I want to get like Chrome or Safari.Is there any way that i can find the browserName?

Thanks,
An_kur