Does blackberry browserfield show hindi text? - blackberry

How to show hindi text in blackberry browserfield ?

First of all make sure you installed Hindi support on the device via BB Desktop Software. Then here is the code:
StringBuffer details = new StringBuffer();
// download HTML to details [...]
_browserField.displayContent(details.toString().getBytes("utf-8"),
"text/html; charset=utf-8", "http://localhost");

Related

how to use jquery mobile asp.net mvc 4 to download and display pdf memory stream data

I have a desktop/mobile web app that needs to display a pdf stream on the target device. I now have this working on the desktop using the jquery dialog. For mobile tho...my html View page has the following link:
View PDF
And that correctly takes me into the Controller Action:
public ActionResult PdfView(string id = "")
{
PayStubDataEntity ps = PayStubAccess.GetPayStubByID(new Guid(id), new Guid(Session["Session_Application_UserID"].ToString()));
WebHelper.SetHeadersForDownload(System.Web.HttpContext.Current.Response, "application/pdf", "PayStub.pdf", false);
MemoryStream pdfMemoryStream = SendPayStubToBrowserAsPdf(ps);
//WebHelper.SendFile(System.Web.HttpContext.Current.Response, "application/pdf", "PayStub.pdf", false, pdfMemoryStream);
return File(pdfMemoryStream, "application/pdf");
}
But nothing ever shows up on my iphone emulator (electric plum). No error messages. I am not sure where the output s/b going or how to view it? Any ideas would be most appreciated.
We have this same issue with android phones and there can be two issues going on. If the website uses ssl and the phone you are on does not accept it as a valid ssl, it will say downloading pdf in the manager, but it never completes a download.
The second issue is the file you are sending to the phone needs to be named in order to download properly to the phone.
Ex: return File(pdfMemoryStream, "application/pdf", fileDownloadName:"PayStub.pdf");
I would suggest using Google Chrome for phone emulation. When you change the settings, it will behave similarly to the phone and you can debug easily.
For example, when I set Google Chrome to the mobile phone user agent Android 4.0.2, it will download the pdf, instead of displaying within the web browser. When it does that, I know it is working locally. It also has iPhone emulation.

How to play video in vaadin?

I used both video component
Video video = new Video();
and embedded
Embedded embed = new Embedded("my video", new ExternalResource("yyy/xxx.mp4"));
embed.setMimeType("application/x-shockwave-flash");
This plays quite well in iphone which uses safari browser, but in my pc am using mozilla firefox browser its not playing.
It shows an like error in mime type.
Can you check this code from vaadin sampler :
Embedded e = new Embedded(null, new ExternalResource(
"http://www.youtube.com/v/meXvxkn1Y_8&hl=en_US&fs=1&"));
e.setAlternateText("Vaadin Eclipse Quickstart video");
e.setMimeType("application/x-shockwave-flash");
e.setParameter("allowFullScreen", "true");
e.setWidth("320px");
e.setHeight("265px");
addComponent(e);
It works for me both chrome and firefox. I think your firefox addons may cause this problem.

What's limited size of Video file when directly play on Blackberry Programming?

This is my source :
public MyScreen() {
// Set the displayed title of the screen
setTitle("MyTitle");
// URL of video file about 200KB size
String url = "http://a1408.g.akamai.net/5/1408/1388/2005110405/1a1a1ad948be278cff2d96046ad90768d848b41947aa1986/sample_mpeg4.mp4";
BrowserSession browserSession = Browser.getDefaultSession();
browserSession.displayPage(url);
browserSession.showBrowser();
}
When I changed another URL of video file -- URL = "http://myServer/test.mp4" (this file about 2M size ) so my Apps can not run video file... It has one error popup appear on my screen. This is error content :
The item you selected can not displayed. Do you want to save or cancel?
Why appear this error . I think file size is reason of this error( may be##)...
If you know that. please help me...
I need to your support ##
Your specified url "http://a1408.g.akamai.net/5/1408/1388/2005110405/1a1a1ad948be278cff2d96046ad90768d848b41947aa1986/sample_mpeg4.mp4"
is not working in mozilla also for streaming
Understand some process for browser
when you provide request to server it will give reply according to your user agent and request
if the reply content is supported by browser then it will display no problem.
if browser not support that content then it will offer us to "save"
you can save that item then you can open.
for example blackberry browser does not support .pdf files till now. so if you request to open any pdf file in browser it wont open. that browser offer us to save
same this way some of the contents not supported by browser

how to open default blackberry browser when click on loaded page through browserfield

how to open default blackberry browser when click on browserfield.
i am trying load a html page on browserfield when i click on opened browser page that time i want to open blackberry default browser.
BrowserField browser = new BrowserField();
MyBrowserFieldListener listener = new MyBrowserFieldListener();
browser.addListener(listener);
MainScreen screen = new MainScreen();
screen.add(browser);
pushScreen(screen);
browser.requestContent(url);
i use this code it works but it also load in browserfield i dont want to load on browserfied
It is always easier to answer questions when they have some information on what you are trying to accomplish. Like jprofitt I'm confused about what you want to happen. However, it is a bit of a kluge but you could:
in MyBrowserFieldListener detect that a link has been clicked when documentLoaded is called;
get the URL from the BrowserField with getDocumentUrl();
Launch the default browser with that URL;
If you want the BrowserField to remain on the original page call requestContent() or back().

how to stop numbers to be formatted as telephone number on a blackberry browser

I am developing web pages for blackberry 8700. I have few 5 digits or sometimes 10 digits numbers in my page. These number are displayed or formatted as mobile numbers and on click of the same a telephone call is initiated. Please let me know how to stop that and display that number as a string on the blackberry browser. Thanks in advance. :)
From the BlackBerry Knowledge Base:
The BlackBerry® Browser underlines phone numbers and allows a BlackBerry smartphone user to automatically place a call from within the BlackBerry Browser; however, it can sometimes mistake other numbers for being a phone number and underline or hyperlink this number.
To disable all phone numbers from being hyperlinked in an HTML or Wireless Markup Language (WML) page, add the following tag to the source code:
<meta name="x-rim-auto-match" http-equiv="x-rim-auto-match" forua="true" content="none"/>

Resources