cancel
Showing results for 
Search instead for 
Did you mean: 

Browser Detection in Web Dynpro

Former Member
0 Kudos

Dear All,

I am developing an application which would be used from a BlackBerry browser as well as a PC browser.

I there a way to detect which browser has been used for opening the applicaion?

I need this because I would be using 2 different layouts for the 2 cases.

I found some ways of detecting the browser:

1) TaskBinder.getCurrentTask().getClient().getClientDescription().getName().

But this should not be used as it is not an API.

2) WDProtocolAdapter.getProtocolAdapter().getRequestObject().getProtocolRequest()

But it is not supported now I suppose. We are using NWDS 7.0.17.

Please suggest a solution.

Thanks and regards,

Mayuresh

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Mayuresh,

Try this:

String clientType = TaskBinder.getCurrentTask().getClient().getClientDescription().getName();

String userAgent = TaskBinder.getCurrentTask().getClient().getClientCaps().getClientUserAgent();

It's works for me.

Regards,

David Faustini