on 01-22-2009 6:48 AM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.