01-10-2012 01:55 AM
I have a requirement to add menu item for the browser menu. On menu item click,I have to get the stream and upload to server. I am using ApplicationMenuItemRepository and its methods to add menu item to browser.On the menu item click Blackberry Api returns the web page url. I am creating a http connection with the returned URL and getting the webpage stream.
I have two concerns/issues in this requirement:
1.How to get the image data?
2.How to get stream for the web pages which are session based. Example: Open website which asks for user credentials in browser on device.Enter credentials and login to website.Now when menu item is clicked, API returns a URL. When we try to create a http connection with the URL the session gets expired and unable to fetch the web page stream.
Please let me know if this is the right approach to read the web page stream on menu item click. Also solutions for the above issues
01-10-2012 02:07 AM
If I recall correctly, the device browser has its own connection factory so I don't how you can fulfill these requirements (the second one is more problematic).
However, if you would use a browserField, you can control the rendering and the resource fetching.
Hope that helps,
01-10-2012 05:08 AM
01-10-2012 05:28 AM
If you are using browserField in your application, you can use the various Manager (Connection Manager, Navigation Manager, etc') to catch the events you need and to apply your own Connection.