Friday, November 13, 2009
Blackberry background key event
Like Red, Green key and the mute.
Wednesday, September 30, 2009
Friday, September 25, 2009
iPhone development short cuts
reorient the Simulator using Command-Left arrow and Command-Right arrow.
n Going home. Tap the Home button (Command-Shift-H) to leave the application
and return to the SpringBoard home screen.
n Locking the “phone.” Hardware, Lock (Command-L) simulates locking the
phone.
n Viewing the console. In Xcode, choose Run, Console (Command-Shift-R) to
view the Xcode console window.This window is where your printf, NSLog, and
CFShow messages are sent by default. In the unlikely case where NSLog messages
do not appear, use the Xcode organizer (Window, Organizer, Console) or open
/Applications/Utilities/Console to view NSLog messages instead.
n Running Instruments. Use Run, Start with Performance Tool to select an
Instruments template (such as Object Allocations or CPU Sampler) to use with the
Simulator. Instruments monitors memory and CPU use as your application runs.
Friday, September 18, 2009
call permission manager
The code I am using is as follows:
ApplicationPermissionsManager apm = ApplicationPermissionsManager.getInstance();
if (apm.getPermission(ApplicationPermissions.PERMISSION_INPUT_SIMULATION) != ApplicationPermissions.VALUE_ALLOW) {
ApplicationPermissions ap = new ApplicationPermissions();
ap.addPermission(ApplicationPermissions.PERMISSION_INPUT_SIMULATION);
ApplicationPermissionsManager.getInstance().invokePermissionsRequest(ap);
}
This brings up the interface for the user to set the permissions. In the Input Simulation options, the only option available is Deny, there is no Allow or Prompt. But on other options, for example Files, all the options are available. Also on the other devices the Input Simulation has all these options available.
Control the screen orientation
Details
BlackBerry smartphones with accelerometer support, such as the touch screen BlackBerry® Storm™ Series, are capable of changing the display orientation between portrait and landscape mode, depending on how the BlackBerry smartphone is held.
It may be desirable for certain applications to limit the possible orientations. For example, a video player application may need to fix the display orientation to landscape mode.
The screen can be oriented in any of four possible directions: north, south, east and west.
To set the allowable screen orientations, MIDlets should use code similar to the following example, prior to calling Display.setCurrent()
from the MIDlet constructor.
DirectionControl dc =
DirectionControl)((Controllable)Display.getDisplay(this)).getControl("net.rim.device.api.lcdui.control.DirectionControl");
int directions = DirectionControl.DIRECTION_EAST | DirectionControl.WEST;
dc.setAcceptableScreenDirections(directions);
The above example forces the display into landscape mode.
Connected Limited Device Configuration (CLDC) applications should make the following call before any invocation of UiApplication.pushScreen()
.
int directions = net.rim.device.api.system.Display.DIRECTION_NORTH |
net.rim.device.api.system.Display.DIRECTION_SOUTH;
net.rim.device.api.ui.Ui.getUiEngineInstance().setAcceptableDirections(directions);
In the above example the display is forced into portrait mode once the BlackBerry smartphone user rotates the BlackBerry smartphone.
from
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800505/800608/How_To_-_Control_the_screen_orientation.html?nodeid=1487645&vernum=0
Friday, September 11, 2009
How to use third part lib in BB project
http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=22240&query.id=82860#M22240
Basically, preverify the jar, make sure no other missing dependence packages. Import it into your project, or make a separated project to work as lib project.
Blackberry connections
If you were trying these methods, then the preferred order, based on various posts on this forum, seems to be:
1) BIS-B
2) WAP 2
3) Direct TCP
4) WAP 1
This is the best post talking about this topic
http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&message.id=29105#M29105
http://supportforums.blackberry.com/rim/board/message?board.id=java_dev&thread.id=29103
What Is - Network Diagnostic Tool
From RIM
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800451/800563/What_Is_-_Network_Diagnostic_Tool.html?nodeid=1450596&vernum=0Details
BlackBerry smartphones support many different transports that facilitate reliable data communication between third-party applications and the Internet. The transports available are direct Transmission Control Protocol (TCP), BlackBerry® Mobile Data System (BlackBerry MDS), BlackBerry® Internet Service Browsing (BIS-B
), BlackBerry® Unite!™ software, Wireless Access Protocol (WAP)1.0, WAP2.0 and Wi-Fi® technology. It is important to understand the differences between these transports and how and when to leverage each transport. It is also crucial to determine if a transport is available for use before trying to use it. The Network Diagnostic Tool is essentially a role model that answers all these questions and is a functional diagnostic tool for testing a URL over various transports supported by the BlackBerry solutions, as well as for displaying the values of many network attributes during the test period.
This article refers to the source code of the Network Diagnostic Tool, which can be downloaded here.
To better understand how each transport works, see the video Network Transports found on blackberrydeveloper.com.
Determining transport availability
The first step to determining the availability of a transport is to check if the ServiceRecord
for that transport is available. This can be done programmatically as follows:
- Get the
ServiceBook
instance by calling the static methodServiceBook.getSB()
. - Get the
ServiceRecords
from theServiceBook
by calling the instance methodServiceBook.getRecords()
. - Iterate through each
ServiceRecord
and determine if it is for the transport you are looking for.
This is demonstrated in the Network Diagnostic Tool's IOThread.initializeTransportAvailability()
.
The next step is to determine if the BlackBerry smartphone has network coverage to communicate through the transport. This can be accomplished by calling the application programming interface (API) CoverageInfo.isCoverageSufficient(int coverageType)
.
Refer to the method IOThread.initializeTransportAvailability()
for a sample implementation of this.
">Creating connections
Developer knowledge base article DB-00396 illustrates how to create an Hypertext Transfer Protocol (HTTP) or socket connection.
The IOThread.get*URL()
methods in the source code shows how to construct URLs for each transport.
Once you have the URL you need, you can create an HTTPConnection
instance using the Connector.open(String url)
static method and start communicating with that URL. See the IOThread.do*()
methods in the Network Diagnostic Tool source code to see a detailed implementation of this.
Note: The BIS-B
transport is available only to partners of the BlackBerry Alliance Program, and therefore is not implemented in the attached source code of the Network Diagnostic Tool. For more information on the BlackBerry Alliance Program, visit http://na.blackberry.com/eng/partners/why_join.jsp.
Displaying network and radio information
Besides testing the different transports for a given URL, the Network Diagnostic Tool also displays network and radio information such as signal level, network name and type, and available network services. Refer to the method ReportScreen.displayNetworkInfo()
in the Network Diagnostic Tool source code for more information on how to display this information.
RadioStatusListener
It is also possible for an application to listen for changes in the radio such as signal level and available network services. To accomplish this, you must implement the interface RadioStatusListener
. The Network Diagnostic Tool implements this interface in the class named IOThread
.
Automatically detecting wireless service providers
It is very useful to be able to detect wireless service providers, especially for applications using the Direct TCP transport for BlackBerry smartphones that operate using Global System for Mobile communications® (GSM®). For these BlackBerry smartphones, correct access point name (APN) information must be specified by the BlackBerry smartphone user before any application can leverage the Direct TCP transport.
APN information can also be set programmatically, which is demonstrated in the referenced Network Diagnostic Tool source code. The details are also explained in DB-00532. If the current wireless service provider for the BlackBerry smartphone can be determined, then the APN information can be set up programmatically from the application. This improves the BlackBerry smartphone user's experience because the APN does not need to be specified manually. To detect the wireless service provider, use a table that contains the name, mobile country code (MCC), mobile network code (MNC) and the APN details of each wireless service provider. Compare the MCC and MNC values returned by the BlackBerry smartphone against the values in the table. Once a match is found, set the corresponding APN information programmatically. For more information on how to read the MCC and MNC values from the BlackBerry smartphone, see DB-00688.
The complete process to automatically detect wireless service providers is also demonstrated by the Network Diagnostic Tool. The Network Diagnostic Tool stores the wireless service provider table in an Extensible Markup Language (XML) file that can be downloaded from here. This file must be stored on the BlackBerry smartphone in the following location: file:///store/netdiag/carrier_info.xml
unless this path is changed in the source code. You can add details for as many wireless service providers as you want to the XML file.
Changes required for earlier versions of the BlackBerry Java Development Environment
Although this article is targeted for BlackBerry® Java® Development Environment (BlackBerry JDE) 4.5 or later, the source code of the Network Diagnostic Tool can be easily modified and compiled using earlier versions of the BlackBerry JDE. Consider the following changes:
- Before BlackBerry JDE 4.3,
RadioStatusListener
had an additional method namedmobilityManagementEvent(int eventCode, int cause)
. This method must be implemented if you are using BlackBerry JDE 4.2 or earlier. CoverageInfo.COVERAGE_DIRECT
is not supported until BlackBerry JDE 4.5. For BlackBerry JDE 4.3 or earlier, useCoverageInfo.COVERAGE_CARRIER
.WLANInfo
class is not available until BlackBerry JDE 4.5. For BlackBerry JDE 4.3 or earlier, use the following logic:RadioInfo.NETWORK_SERVICE_GAN
is not supported in BlackBerry JDE 4.2.1 or earlier. Remove any references to this constant for those versions of the BlackBerry JDE.RadioInfo.NETWORK_SERVICE_EVDO_ONLY
andRadioInfo.NETWORK_SERVICE_UMTS
are not supported in BlackBerry JDE 4.2.1 or earlier. Remove any references to these constants for those versions of the BlackBerry JDE.- The
CoverageInfo
class is introduced in BlackBerry JDE 4.2.0. Remove any references to this class if you are using an earlier version of the BlackBerry JDE to compile this application. However, it is possible to do the following in versions of the BlackBerry JDE earlier than 4.2.0: if(RadioInfo.getSignalLevel() != RadioInfo.LEVEL_NO_COVERAGE)
the BlackBerry smartphone has radio signal.if(RadioInfo.getNetworkService() & RadioInfo.NETWORK_SERVICE_DATA)>0
the BlackBerry smartphone has data connectivity.
if(CoverageInfo.isCoverageSufficient(CoverageInfo.COVERAGE_CARRIER,RadioInfo.WAF_WLAN, false)){
coverageWiFi = true;
wifiLog.addlog("Coverage Status: Online");
}
Tuesday, September 8, 2009
How to get Blackberry device information?
String userAgent = "Blackberry" + DeviceInfo.getDeviceName() + "/" + getOsVersion() + " Profile/" + System.getProperty( "microedition.profiles" ) + " Configuration/" + System.getProperty( "microedition.configuration" ) + " VendorID/" + Branding.getVendorId();
public static String getOsVersion()
{ String version = "";
ApplicationDescriptor[] ad = ApplicationManager.getApplicationManager().getVisibleApplications();
for( int i = 0; i < ad.length; i++)
{ if( ad[i].getModuleName().trim().equalsIgnoreCase( "net_rim_bb_ribbon_app" ) )
{ version = ad[i].getVersion();
break;
}
}
return version;
}
Tuesday, September 1, 2009
How To - Compile a jar file into a BlackBerry Library
come from here
http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800901/How_To_-_Compile_a_JAR_file_into_a_BlackBerry_Library.html?nodeid=801017&vernum=0Details
You can include classes from other compiled JAR files in your application. To include these files, save the JAR file in a new project in the same workspace as your application. Make this new project a library application and make your application dependent on this library. You can then import all of its classes. The following steps make up this procedure.
To create a new project
- Open the workspace that contains your application's project.
- Create a new project.
To add a compiled JAR file to the project
- In the navigation pane, select the project.
- On the Build menu, select Project > Add File to Project.
- Select the appropriate JAR file and click Open.
To make the project a library
- In the navigation pane, select the project.
- Right-click and select Properties. The <Project name> Class Properties window appears.
- Click the Application tab.
- From the Project Type drop-down list, select Library.
To compile the project
- In the navigation pane, select the project.
- Right-click and click Build Project.
To make the project dependent on the new library
- In the navigation pane, select the project.
- Right-click and click Project Dependencies. The Class depends on <Project name:> window appears.
- Select the
check box.
Your application can now import the classes in this JAR file with the import “xxx.yyy.*” command.
Saturday, August 29, 2009
Displays a route between locations on a map.
* Displays a route between locations on a map.
*/
private MenuItem viewRouteItem = new MenuItem("View Route" , 3000, 10)
{
public void run()
{
StringBuffer stringBuffer = new StringBuffer("
stringBuffer.append("
stringBuffer.append("
stringBuffer.append("
Invoke.invokeApplication(Invoke.APP_TYPE_MAPS, new MapsArguments( MapsArguments.ARG_LOCATION_DOCUMENT, stringBuffer.toString()));
}
};
Friday, August 7, 2009
C# calls command
Example 1. Running a command line application, without concern for the results:
private void simpleRun_Click(object sender, System.EventArgs e){
System.Diagnostics.Process.Start(@"C:\listfiles.bat");
}
Example 2. Retrieving the results and waiting until the process stops (running the process synchronously):
private void runSyncAndGetResults_Click(object sender, System.EventArgs e){
System.Diagnostics.ProcessStartInfo psi =
new System.Diagnostics.ProcessStartInfo(@"C:\listfiles.bat");
psi.RedirectStandardOutput = true;
psi.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
psi.UseShellExecute = false;
System.Diagnostics.Process listFiles;
listFiles = System.Diagnostics.Process.Start(psi);
System.IO.StreamReader myOutput = listFiles.StandardOutput;
listFiles.WaitForExit(2000);
if (listFiles.HasExited)
{
string output = myOutput.ReadToEnd();
this.processResults.Text = output;
}
}
Example 3. Displaying a URL using the default browser on the user's machine:
private void launchURL_Click(object sender, System.EventArgs e){
string targetURL = @http://www.duncanmackenzie.net;
System.Diagnostics.Process.Start(targetURL);
}
Using the Code
The code given below creates a process i.e. a command process and then invokes the command that we want to execute. The result of the command is stored in a string
variable, which can then be used for further reference. The command execution can happen in two ways, synchronously and asynchronously. In the asynchronous command execution, we just invoke the command execution using a thread that runs independently. The code has enough comments, hence making it self-explanatory.
Below is the code to execute the command synchronously:
The above code invokes the cmd
process specifying the command to be executed. The option procStartInfo.RedirectStandardOutput
is set to true
, since we want the output to be redirected to the StreamReader
. The procStartInfo.CreateNoWindow
property is set to true
, as we don't want the standard black window to appear. This will execute the command silently.
Below is the code to execute the command asynchronously:
Friday, July 31, 2009
service book sample
import net.rim.device.api.servicebook.*;
public class ServiceBookExample extends Application {
ServiceRecord[] _sRecordsArray; // Creates a ServiceRecord array.
ServiceBook _servicebook; // Creates a ServiceBook variable.
String cidValue, sbName, sbAPN;
public static void main(String[] args) {
// Create a new instance of the application and
// start the event thread.
ServiceBookExample app = new ServiceBookExample();
app.enterEventDispatcher();
}
public ServiceBookExample() {
// Returns a reference to the service book from the factory.
_servicebook = ServiceBook.getSB();
// Returns an array of all registered service records.
_sRecordsArray = _servicebook.getRecords();
// Loops through the service record array
// and obtains specific information relating
// to each item and prints it to the debugging output.
for (int i = 0; i < _sRecordsArray.length; i++) {
// Obtains the Service Book CID
cidValue = _sRecordsArray[i].getCid();
// Obtains the Name of the Service Book
sbName = _sRecordsArray[i].getName();
if (cidValue.equals("BrowserConfig")
&& sbName.startsWith("WAP Browser")) {
// Obtains the Service Book's APN
// (Associated Access Point Name)
String sbAPN = _sRecordsArray[i].getAPN();
}
}
}
}
Tuesday, July 21, 2009
About pushing for iPhone and Blackberry
BB
http://na.blackberry.com/eng/developers/javaappdev/pushapi.jsp#tab_tab_works
iPhone
A nice guide to setup your server:
http://www.macoscoders.com/2009/05/17/iphone-apple-push-notification-service-apns/
another good one:
http://blog.boxedice.com/2009/07/10/how-to-build-an-apple-push-notification-provider-server-tutorial/
basically you need a developer's id, then apply for the iPhone Push Notification Server (PNS) service. After got the certificate, you just put it on your Apache server. Or you may write a Java or .Net program to load the certificate and send out your testing data.
package com.demo.samples;
import java.io.ByteArrayOutputStream;
import java.io.FileInputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.security.KeyStore;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.SSLSocketFactory;
import java.awt.image.RenderedImage;
import java.io.IOException;
public class pushdemo {
/**
* @param args
*/
public static void main(String[] args) {
System.out.println(args[0]);
if (args.length != 2) {
System.out.println("Usage: KeGenerator phonenumber ExpireDate(yyyy-MM-dd)");
System.exit(0);
}
// TODO Auto-generated method stub
try {
int port = 2195;
String hostname = "gateway.sandbox.push.apple.com";
char []passwKey = "keypassword".toCharArray();
KeyStore ts = KeyStore.getInstance("PKCS12");
ts.load(new FileInputStream("devCert.p12"), passwKey);
KeyManagerFactory tmf = KeyManagerFactory.getInstance("SunX509");
tmf.init(ts,passwKey);
SSLContext sslContext = SSLContext.getInstance("TLS");
sslContext.init(tmf.getKeyManagers(), null, null);
SSLSocketFactory factory =sslContext.getSocketFactory();
SSLSocket socket = (SSLSocket) factory.createSocket(hostname,port); // Create the ServerSocket
String[] suites = socket.getSupportedCipherSuites();
socket.setEnabledCipherSuites(suites);
//start handshake
socket.startHandshake();
// Create streams to securely send and receive data to the server
InputStream in = socket.getInputStream();
OutputStream out = socket.getOutputStream();
// Read from in and write to out...
ByteArrayOutputStream baos = new ByteArrayOutputStream();
baos.write(0); //The command
System.out.println("First byte Current size: " + baos.size());
baos.write(0); //The first byte of the deviceId length
baos.write(32); //The deviceId length
System.out.println("Second byte Current size: " + baos.size());
String deviceId = "02da851db4f2b5bfce1982700d3dac72bc87cd60";
baos.write(hexStringToByteArray(deviceId.toUpperCase()));
System.out.println("Device ID: Current size: " + baos.size());
//{ "aps" : { "alert" : { "body" : "Bob wants to play poker", "action-loc-key" : "PLAY" }, "badge" : 5, }, "acme1" : "bar", "acme2" : [ "bang", "whiz" ] }
String payload = "{\"aps\":{\"alert\":\"I like spoons also\",\"badge\":14}}";
System.out.println("Sending payload: " + payload);
baos.write(0); //First byte of payload length;
baos.write(payload.length());
baos.write(payload.getBytes());
out.write(baos.toByteArray());
out.flush();
System.out.println("Closing socket.." + in.read());
// Close the socket
in.close();
out.close();
} catch (Exception e) {
e.printStackTrace();
}
}
public static byte[] hexStringToByteArray(String s) {
byte[] b = new byte[s.length() / 2];
for (int i = 0; i < b.length; i++){
int index = i * 2;
int v = Integer.parseInt(s.substring(index, index + 2), 16);
b[i] = (byte)v;
}
return b;
}
}
Thursday, July 16, 2009
monitor Blackberry BackLight
backlightStateChange
You need to implement the SystemListener2 interface and will be called when light changes. .
void
backlightStateChange(boolean on)
Invoked when the backlight state changes.
http://www.blackberry.com/developers/docs/4.5.0api/net/rim/device/api/system/SystemListener2.html
Friday, July 10, 2009
Setting up a Subversion Server under Windows
Setting up a Subversion Server under Windows
I talked a little bit about what Subversion is in my previous post. Now, let's get it set it up in Windows.
Luckily for us, Joe White has done most of the work already; he has a tremendously helpful post that documents how to set up Subversion. I'll see if I can streamline his excellent post a bit further, and illustrate it with screenshots.
A) Download Subversion
You'll need the latest version of..
- the Windows binaries
- the "run Subversion as a windows service" wrapper
- the TortoiseSVN shell integration utility
B) Install Subversion
- Unzip the Windows binaries to a folder of your choice. I chose c:\program files\subversion\ as my path.
- Now, add the subversion binaries to the path environment variable for the machine. I used %programfiles%\subversion\bin\
- You'll also need another environment variable, SVN_EDITOR, set to the text editor of your choice. I used c:\windows\notepad.exe
C) Create a Repository
- Open a command prompt and type
svnadmin create "c:\Documents and Settings\Subversion Repository"
- Navigate to the folder we just created. Within that folder, uncomment the following lines in the /conf/svnserve.conf file:
[general]
anon-access = read
auth-access = write
password-db = passwdNext, uncomment these lines in the /conf/passwd file:
[users]
harry = harryssecret
sally = sallyssecret
D) Verify that everything is working
- Start the subversion server by issuing this command in the command window:
svnserve --daemon --root "C:\Documents and Settings\Subversion Repository"
-
Create a project by opening a second command window and entering this command:
svn mkdir svn://localhost/myproject
It's a standard Subversion convention to have three folders at the root of a project:
/trunk
/branches
/tags -
At this point, Notepad should launch:
-
You'll now be prompted for credentials. In my case I was prompted for the administrator credentials as well:
Authentication realm: 0f1a8b11-d50b-344d-9dc7-0d9ba12e22df
Password for 'Administrator': *********
Authentication realm: 0f1a8b11-d50b-344d-9dc7-0d9ba12e22df
Username: sally
Password for 'sally': ************
Committed revision 1.Congratulations! You just checked a change into Subversion!
E) Start the server as a service
- Stop the existing command window that's running svnserve by pressing CTRL+C.
- Copy the file SVNService.exe from the zip file of the same name to the subversion\bin folder.
- Install the service by issuing the following commands:
svnservice -install --daemon --root "C:\Documents and Settings\Subversion Repository"
sc config svnservice start= auto
net start svnservice - Test the new service by listing all the files in the repository:
svn ls svn://localhost/
You should see the single project we created earlier, myproject/
F) Set up the shell extension
- Run the TortoiseSVN installer. It will tell you to restart, but you don't need to.
- Create a project folder somewhere on your hard drive. Right click in that folder and select "SVN Checkout..."
type svn://localhost/myproject/ for the repository URL and click OK.
- Create a new file in that directory. Right click the file and select "TortoiseSVN, Add"
- The file hasn't actually been checked in yet. Subversion batches any changes and commits them as one atomic operation. To send all your changes to the server, right click and select "SVN Commit":
And we're done! You now have a networked Subversion server and client set up on your machine. Note that the default port for svnserve is 3690.
For more tips on using subversion, take a look at the free O'Reilly Subversion book.
good J2me UI framework
J2ME | |
Written by Vimal | |
Wednesday, 23 July 2008 09:12 | |
J2ME is a primitive but powerful development platform for devloping applications for mobile devices. A serious issue with J2ME is the lack of built in libraries to accomplish several common tasks. There are several free and commercial libraries availbale that can be used to provide more functionality in our J2ME applications. In this article I shall list down several famous User Interface libraries for J2ME.
License: GPL Category: User Interfaces Apime is a framework to offer more funcionality to J2ME/MIDP. The core is the user interface, with basics components to make applications with swing structure.
License: GPL Category: User Interfaces BaseMovil is a framework for fast development of J2ME applications: a powerful J2ME database engine, a scripting engine and an ui toolkit which is fully integrated with both and allows xml view definition. The framework handles device differences/bugs.
License: LGPL Category: User Interfaces Fire (Flexible Interface Rendering Engine)is a lightweight themable GUI engine for j2me MIDP2 applications. It is designed to be an eye-candy replacement to the traditional midp GUI components. It provides more than the forms and items functionality and its not kvm-implementation depended.
License: GPL Category: User Interfaces Another User Interfaces library for the J2ME platform providing many UI components like Buttons, Checkbox, Radio Box, Progreess Bars, Tabbed Panes etc.. It is designed as a replacement to the traditional J2ME Widgets.
License: Apache License 2.0 Category: User Interfaces, Utilities J4ME is an open source library to help build J2ME applications. It solves many of J2ME's shortcomings including: Uese Interfaces, Logging, GPS and various other utility classes and methods.
License: LGPL Category: User Interfaces , Utilities jMobileCore library is powerful tool for creating J2ME applications. jMobileCore provides support for developing compact and rich Canvas-based GUI, fast data access, reliable communications and simplifies creation of multithreading midlet applications.
License: GPL, Commerical Category: User Interfaces kUI is a Canvas based replacement for the high level LCDUI classes. It can be styled to meet your own branding requirements,avoids problems with implicit close commands, does not require a preprocessing step and offers a consistent behaviour and user interface experience among different devices, simplifying your development and documentation process.
License: GPL Category: User Interfaces Kuix (Kalmeo User Interface eXtensions) is a development framework that allows to create easily high end J2ME applications. It provides most graphical elements (buttons, textfields, lists, menus, etc.) needed to create advanced user graphical interfaces and uses an XML/CSS approach to describe the screens and the user actions in the application.
License: GPL Category: User Interfaces LWUIT is a UI library that is bundled together with applications and helps content developers in creating compelling and consistent Java ME applications. LWUIT supports visual components and other UI goodies such as theming, transitions, animation and more.
License: GPL Category: User Interfaces An advanced widget toolkit for J2ME devices, supporting cross-platform components such as tables, trees, graphical buttons, theming etc.
License: GPL Category: User Interfaces Inspired by its UI big brothers as AWT, Swing and SWT, MWT comes into the scene providing an UI framework designed and optimized for small devices.
Nextel's Open Source J2ME Toolkits License: GPL Category: User Interfaces Nextel's Open Source J2ME Toolkits contain libraries for user interface and RMS development on J2ME handsets.
License: GPL Category: User Interfaces Thinlet is a GUI toolkit, a single Java class, parses the hierarchy and properties of the GUI, handles user interaction, and calls business logic. Separates the graphic presentation (described in an XML file) and the application methods (written as Java code).
License: GPL Category: User Interfaces The Synclast UI API is an extensible toolkit for creating colorful custom user interfaces on MIDP devices in an intuitive yet efficient manner, It provides several Widgets, Layouts, Backgrounds, Powerful Forms and Menus. |
Thursday, July 9, 2009
ant build for your blackberry
http://www.blackberryforums.com/developer-forum/138210-setup-up-eclipse-blackberry-development.html
Blackberry ant tool
http://bb-ant-tools.sourceforge.net/docs
Apache ant here
http://gulus.usherbrooke.ca/pub/appl/apache/ant/binaries/apache-ant-1.7.1-bin.zip
How To - Format the electronic serial number (ESN)
Details
The following code can be used to format the ESN of a BlackBerry smartphone to match the format that is shown under Options > Status on the BlackBerry smartphone.
Note: ESNs are only present on BlackBerry smartphones that operate on the Code Division Multiple Access (CDMA) network.
public String getDecimalSerialNumber()
{
StringBuffer esnStringBuffer = new StringBuffer();
//Determine if the BlackBerry operates on the CDMA network.
if( RadioInfo.getNetworkType() == RadioInfo.NETWORK_CDMA )
{
//It does, so we'll format the ESN number.
int sn = CDMAInfo.getESN();
int firstPart = (sn >> 24) & 0xff;
int secondPart = sn & 0xffffff;
String firstPartString = String.valueOf( firstPart );
String secondPartString = String.valueOf( secondPart );
padESN( esnStringBuffer, 3 - firstPartString.length() );
esnStringBuffer.append( firstPartString );
padESN( esnStringBuffer, 8 - secondPartString.length() );
esnStringBuffer.append( secondPartString );
return esnStringBuffer.toString();
}
else
{
//This BlackBerry does not operate on the CDMA network,
//return 0.
esnStringBuffer.append(0);
}
return esnStringBuffer.toString();
}
//Inserts zeros into the ESN string.
private void padESN(StringBuffer esnStringBuffer, int padCount)
{
for (int i = 0; i < padCount; ++i) {
esnStringBuffer.append('0');
}
}
Thursday, May 28, 2009
How To - Define a rollover icon for an application
Last Updated: 14 November 2008
Article Number: DB-00467
Summary
This article applies to the following:
* BlackBerry® smartphones based on Java® technology
* BlackBerry® Device Software 4.1 and later
* BlackBerry® Java® Development Environment (BlackBerry JDE) 4.1 and later
Description
BlackBerry JDE4.7 and later
BlackBerry JDE 4.7 and BlackBerry JDE Component Package simplify the creation of a rollover icon. Rollover icons can now be specified in a project's properties.
Specifying a rollover icon in BlackBerry JDE 4.7
Complete the following steps:
1. In BlackBerry JDE, right-click the project.
2. Select Properties.
3. Select the Resources tab.
4. Add the non rollover/unfocused application icon in the Icon Files field and add the rollover/focused icon in the Focus Icon Files field.
Specifying a rollover icon in BlackBerry JDE Plug-in for Eclipse
Note: While this option is always present in the BlackBerry® JDE Plug-in for Eclipse™ it will only take effect when the application is built using the BlackBerry JDE Component Package 4.7.0 or later.
Complete the following:
1. In the Eclipse™ Package Explorer, right-click the project.
2. Select Properties.
3. Select BlackBerry Project Properties.
4. Select the Resources tab.
5. Add the non-rollover/unfocused application icon in the Icon Files field and add the rollover/focused icon in the Focus Icon Files field.
Before BlackBerry JDE 4.7
A new application programming interface (API), introduced in the BlackBerry API 4.1 set, grants the ability to add a rollover icon to an application. To leverage this new API correctly, the application must run on startup so the call is executed, and can thus take effect before the BlackBerry smartphone user scrolls to the application. The application itself should not run on startup, but an alternate entry point to the application should be defined to do so. The main entry point should be configured to pass in an argument to the main() method so that the application can identify a startup launch from a BlackBerry smartphone user launching the application from the ribbon.
The rollover icon application’s main() method will now resemble the following:
public static void main(String[] args)
{
if ( args != null && args.length > 0 && args[0].equals("gui") ){
//main entry point
Test theApp = new Test();
theApp.enterEventDispatcher();
} else {
//alternate entry point
Bitmap icon = Bitmap.getBitmapResource("2.png");
HomeScreen.setRolloverIcon(icon);
}
}
Due to an issue in BlackBerry Device Software 4.1, the HomeScreen.setRolloverIcon(Bitmap image)method can throw an IllegalArgumentException. This issue has been resolved in BlackBerry Device Software 4.2. The following code sample shows how to work around this issue:
public class HomeScreenIcon extends UiApplication
{
public static void main(String[] args)
{
//Check for the argument defined in the project properties.
if (args != null && args.length > 0 && args[0].equals("gui"))
{
HomeScreenIcon theApp = new HomeScreenIcon(false);
theApp.enterEventDispatcher();
}
else
{
HomeScreenIcon theApp = new HomeScreenIcon(true);
theApp.enterEventDispatcher();
}
}
public HomeScreenIcon(boolean autoStart)
{
if (autoStart)
{
//The application started using the auto start entry point.
//Setup the rollover icons.
final Bitmap regIcon = Bitmap.getBitmapResource("1.png");
final Bitmap icon = Bitmap.getBitmapResource("2.png");
invokeLater(new Runnable()
{
public void run()
{
ApplicationManager myApp =
ApplicationManager.getApplicationManager();
boolean keepGoing = true;
while (keepGoing)
{
//Check if the BlackBerry has completed its
startup process.
if (myApp.inStartup())
{
//The BlackBerry is still starting up,
sleep for 1 second.
try
{
Thread.sleep(1000);
}
catch (Exception ex)
{
//Couldn't sleep, handle exception.
}
}
else
{
//The BlackBerry has finished its
startup process.
//Set the rollover icons.
HomeScreen.updateIcon(regIcon, 0);
HomeScreen.setRolloverIcon(icon, 0);
keepGoing = false;
}
}
//Exit the application.
System.exit(0);
}
});
}
else
{
//The application was started by the user.
//Start the application and display a GUI.
MainScreen ms = new MainScreen();
ms.setTitle(new LabelField("Hello there."));
pushScreen(ms);
}
}
}
Note: After running on startup to define the rollover icon, the application exits so that it does not run needlessly in the background.
Additional Information
For more information, see DB-00008 regarding alternate entry point applications and DB-00126 on defining an application icon.
Thursday, March 26, 2009
Upgrade existing Eclipse to 3.4.2
http://www.eclipse.org/downloads/
http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/ganymede/SR2/eclipse-jee-ganymede-SR2-win32.zip
Download Jboss or other plug-ins you want to install
Extract new Eclipse version to the old eclipse folder
Overwrite everything in the old folder
Run eclipse
first time should have error, no matter, just close the environment and run it again. Then should success.
How to - Leverage pattern matching in BlackBerry smartphone applications to provide an integrated user experience
Summary
This article applies to the following:
* BlackBerry® Device Software 4.0 and later
* BlackBerry smartphones
Description
Background
You may have noticed how certain strings are underlined in native BlackBerry smartphone applications. For example, phone numbers are underlined or highlighted when composing or reading messages. Once selected, these special strings are assigned a context-sensitive menu item, for example call a phone number. Third-party applications can take advantage of this functionality to add custom context-sensitive menu items to standard BlackBerry smartphone applications. These menu items can be used to launch a custom application, open the BlackBerry® Browser to a specific URL, send a message, or do any number of other things.
This functionality can be achieved by using one of two application programming interfaces (APIs):
1. net.rim.device.api.util.StringPattern - This API was introduced in BlackBerry Device Software 4.0 and requires you to implement your own string matching algorithm.
2. net.rim.blackberry.api.stringpattern.PatternRepository - This API was introduced in BlackBerry Device Software 4.3.0, and allows the use of Perl style regular expressions.
The samples provided in this article match a United States zip code and allow the BlackBerry smartphone user to lookup more information on the zip code.
Procedure
net.rim.device.api.util.StringPattern
The StringPattern source code example uses the string pattern matching that was introduced in BlackBerry Device Software 4.0. It requires implementing another string matching algorithm.
There are four major components required for this implementation
net.rim.device.api.util.StringPattern - This class represents the pattern that you want to recognize. It can be as simple as a zip code, or as complex as an address in its various forms. To write an effective StringPattern, remember that each character typed into the applicable field will be parsed by your implementation. As such, efficiency is important in this class.
net.rim.device.api.ui.component.MenuItem - The MenuItem includes the majority of the implementation for this capability. The MenuItem typically includes or references the action that will occur once a match is found and invoked by the BlackBerry smartphone user. For example, the run method for the MenuItem is invoked when a zip code has been recognized and the BlackBerry smartphone user selects the Lookup Zipcode menu item.
net.rim.device.api.ui.component.ActiveFieldCookie - The ActiveFieldCookie is a container object that allows the StringPattern class to transfer the context-sensitive information to the MenuItem. It also allows the implementation to add the appropriate menu item, or multiple menu items, when a string pattern match is found.
net.rim.device.api.util.Factory - The implementation of the Factory class links the StringPattern to the ActiveFieldCookie when a match is recorded in the StringPattern implementation. Typically, the Factory implementation is quite compact but a necessary requirement for the system.
The ZipCodeLookupSample class provides the starting point for the application. The application is configured as an auto-start system module so that all of the components can be registered upon start up. It is important to note that the main class initializes all of the required components described above, and has been implemented carefully to only initialize these components once.
net.rim.blackberry.api.stringpattern.PatternRepository
The PatternRepository source code sample uses the API that was introduced in BlackBerry Device Software 4.3.0 and allows the use of regular expressions for string matching, which makes the sample much simpler than the prior sample.
There are two major components required for this implementation
net.rim.blackberry.api.stringpattern.PatternRepository - This class will register a Perl-style regular expression or a specific string with the systems pattern repository. When a match is found the ApplicationMenuItem(s) associated with the pattern will appear in the current application's menu.
net.rim.blackberry.api.menuitem.ApplicationMenuItem- The ApplicationMenuItem includes the action that will occur once a match is found and is invoked by the BlackBerry smartphone user.
The application is once again configured as an auto-start system module. This is done to register the regular expression and menu item with the systems pattern repository upon system start up.
To access the sample code, download the attached ZipCodeLookupSamples.zip file.
Tuesday, March 24, 2009
Integer (computer science)
Integer (computer science)
From Wikipedia, the free encyclopedia
This article needs additional citations for verification. Please help improve this article by adding reliable references (ideally, using inline citations). Unsourced material may be challenged and removed. (January 2008) |
In computer science, the term integer is used to refer to a data type which represents some finite subset of the mathematical integers. These are also known as integral data types.
Contents[hide] |
[edit] Value and representation
The value of a datum with an integral type is the mathematical integer that it corresponds to. The representation of this datum is the way the value is stored in the computer’s memory. Integral types may be unsigned (capable of representing only non-negative integers) or signed (capable of representing negative integers as well).
The most common representation of a positive integer is a string of bits, using the binary numeral system. The order of the bits varies; see endianness. The width or precision of an integral type is the number of bits in its representation. An integral type with n bits can encode 2n numbers; for example an unsigned type typically represents the non-negative values 0 through 2n−1.
There are three different ways to represent negative numbers in a binary numeral system. The most common is two’s complement, which allows a signed integral type with n bits to represent numbers from −2(n−1) through 2(n−1)−1. Two’s complement arithmetic is convenient because there is a perfect one-to-one correspondence between representations and values, and because addition, subtraction and multiplication do not need to distinguish between signed and unsigned types. The other possibilities are sign-magnitude and ones' complement. See Signed number representations for details.
Another, rather different, representation for integers is binary-coded decimal, which is still commonly used in mainframe financial applications and in databases.
[edit] Common integral data types
Bits | Name | Range | Decimal digits | Uses |
---|---|---|---|---|
8 | byte, octet | Signed: −128 to +127 | 3 | ASCII characters, C/C++ char, C/C++ int8_t, Java byte, C# byte |
Unsigned: 0 to +255 | 3 | |||
16 | halfword, word | Signed: −32,768 to +32,767 | 5 | UCS-2 characters, C/C++ short, C/C++ int16_t, Java short, C# short, Java char |
Unsigned: 0 to +65,535 | 5 | |||
32 | word, long, doubleword, longword | Signed: −2,147,483,648 to +2,147,483,647 | 10 | UCS-4 characters, Truecolor with alpha, C/C++ long (on Windows and 32-bit Unix), C/C++ int32_t, Java int, C# int, FourCC |
Unsigned: 0 to +4,294,967,295 | 10 | |||
64 | doubleword, longword, long long, quad, quadword | Signed: −9,223,372,036,854,775,808 to +9,223,372,036,854,775,807 | 19 | C/C++ long (on 64-bit Unix), C/C++ long long, C/C++ int64_t, Java long, C# long |
Unsigned: 0 to +18,446,744,073,709,551,615 | 20 | |||
128 | octaword | Signed: −170,141,183,460,469,231,731,687,303,715,884,105,728 to +170,141,183,460,469,231,731,687,303,715,884,105,727 | 39 | C only available as non-standard compiler-specific extension |
Unsigned: 0 to +340,282,366,920,938,463,463,374,607,431,768,211,455 | 39 | |||
n | n-bit integer (general case) | Signed: ( − 2n − 1) to (2n − 1 − 1) | Ada range 2**(n-1) .. 2**n; | |
Unsigned: 0 to (2n − 1) | Ada mod 2**n; |
Different CPUs support different integral data types. Typically, hardware will support both signed and unsigned types but only a small, fixed set of widths.
The table above lists integral type widths that are supported in hardware by common processors. High level programming languages provide more possibilities. It is common to have a ‘double width’ integral type that has twice as many bits as the biggest hardware-supported type. Many languages also have bit-field types (a specified number of bits, usually constrained to be less than the maximum hardware-supported width) and range types (which can represent only the integers in a specified range).
Some languages, such as Lisp, REXX and Haskell, support arbitrary precision integers (also known as infinite precision integers or bignums). Other languages which do not support this concept as a top-level construct may have libraries available to represent very large numbers using arrays of smaller variables, such as Java's BigInteger
class or Perl's "bigint
" package. These use as much of the computer’s memory as is necessary to store the numbers; however, a computer has only a finite amount of storage, so they too can only represent a finite subset of the mathematical integers. These schemes support very large numbers, for example one kilobyte of memory could be used to store numbers up to 2466 digits long.
A Boolean or Flag type is a type which can represent only two values: 0 and 1, usually identified with false and true respectively. This type can be stored in memory using a single bit, but is often given a full byte for convenience of addressing and speed of access.
A four-bit quantity is known as a nibble (when eating, being smaller than a bite) or nybble (being a pun on the form of the word byte). One nibble corresponds to one digit in hexadecimal and holds one digit or a sign code in binary-coded decimal.
[edit] Bytes and octets
The term byte initially meant ‘the smallest addressable unit of memory’. In the past, 5-, 6-, 7-, 8-, and 9-bit bytes have all been used. There have also been computers that could address individual bits (‘bit-addressed machine’), or that could only address 16- or 32-bit quantities (‘word-addressed machine’). The term byte was usually not used at all in connection with bit- and word-addressed machines.
The term octet always refers to an 8-bit quantity. It is mostly used in the field of computer networking, where computers with different byte widths might have to communicate.
In modern usage byte almost invariably means eight bits, since all other sizes have fallen into disuse; thus byte has come to be synonymous with octet.
[edit] Words
The term word is used for a small group of bits which are handled simultaneously by processors of a particular architecture. The size of a word is thus CPU-specific. Many different word sizes have been used, including 6-, 8-, 12-, 16-, 18-, 24-, 32-, 36-, 39-, 48-, 60-, and 64-bit. Since it is architectural, the size of a word is usually set by the first CPU in a family, rather than the characteristics of a later compatible CPU. The meanings of terms derived from word, such as longword, doubleword, quadword, and halfword, also vary with the CPU and OS.
As of 2008 practically all new desktop processors are of the x86-64 family and capable of using 64-bit words, they are however often used in 32-bit mode. Embedded processors with 8- and 16-bit word size are still common. The 36-bit word length was common in the early days of computers.
One important cause of non-portability of software is the incorrect assumption that all computers have the same word size as the computer used by the programmer. For example, if a programmer using the C language incorrectly declares as int
a variable that will be used to store values greater than 216 − 1, the program will fail on computers with 16-bit integers. That variable should have been declared as long
, which has at least 32 bits on any computer. Programmers may also incorrectly assume that a pointer can be converted to an integer without loss of information, which may work on (some) 32-bit computers, but fail on 64-bit computers with 64-bit pointers and 32-bit integers.
[edit] See also
- Signed number representations
- Integer (the mathematical concept)
[edit] Notes
Wednesday, March 18, 2009
Media types supported on the BlackBerry smartphone
Media types supported on the BlackBerry smartphone
Environment
- BlackBerry® smartphones
Overview
In the Media application on the BlackBerry smartphone, you can open media files such as videos, ring tones, pictures, and songs that are stored in the BlackBerry smartphone memory or on a media card.
Note: For instructions on how to transcode audio and video files for the Media application, see KB05419.
The following tables list what codecs are recommended and supported for each specific file format for video and audio on the different BlackBerry smartphones, as well as whether Real Time Streaming Protocol (RTSP) streaming is supported using that file format.
BlackBerry® Storm™ 9500 smartphone and BlackBerry® Storm™ 9530 smartphone
Supported formats
File Format / Extension | Component | Codec | Notes | RTSP Streaming |
MP4 | Video | H.264 | Baseline Profile, 480x360 pixels, up to 2 Mbps, 30 frames per second | Supported |
MPEG4 | Simple Profile Level 3, 480x360 pixels, up to 2 Mbps, 30 frames per second | Supported | ||
H.263 | Profile 0 and 3, Level 30 | Supported | ||
Audio | AAC-LC, AAC+, eAAC+ | Supported | ||
AMR-NB | Supported | |||
QCELP EVRC | ||||
AVI | Video | MPEG4 | Simple Profile Level 3, 480x360 pixels, up to 2 Mbps, 30 frames per second | Supported |
Audio | MP3 | |||
ASF | Video | Windows® Media Video 9 | WMV3, Simple Profile, 480x360 pixels, 30 frames per second | |
Audio | Windows Media Audio 9 | Supported | ||
Windows Media 10 Standard/Professional | Supported | |||
MP3 | Audio | MP3 |
Recommended video format for local playback
File Format / Extension | Component | Codec | Notes |
MP4 | Video | H.264 | Baseline Profile, 480x360 pixels, up to 2 Mbps, 30 frames per second |
Audio | AAC-LC |
BlackBerry® Curve™ 8900 smartphone
Supported formats
File Format / Extension | Component | Codec | Notes | RTSP Streaming |
MP4 M4A MOV 3GP | Video | H.264 | Baseline Profile, 480x360 pixels, up to 1500 kbps, 24 frames per second | Supported |
MPEG4 | Simple and Advance Simple Profile, 480x360 pixels, up to 1500 kbps, 24 frames per second | Supported | ||
H.263 | Profile 0 and 3, Level 45 | Supported | ||
Audio | AAC-LC, AAC+, eAAC+ | Supported | ||
AMR-NB | Supported | |||
AVI | Video | MPEG4 | Simple and Advance Simple Profile, 480x360 pixels, up to 1500 kbps, 24 frames per second | Supported |
Audio | MP3 | |||
ASF WMV WMA | Video | Windows Media Video 9 | WMV3, Simple and Main Profile, 480x360 pixels, 24 frames per second | |
Audio | Windows Media Audio 9 Standard/Professional | |||
Windows Media 10 Standard/Professional | ||||
MP3 | Audio | MP3 |
Recommended video format for local playback
File Format / Extension | Component | Codec | Notes |
MP4 | Video | MPEG4 | Advance Simple Profile, 480x360 pixels, up to 1500 kbps, 24 frames per second |
Audio | AAC-LC |
BlackBerry® Bold™ 9000 smartphone
Supported formats
File Format / Extension | Component | Codec | Notes | RTSP Streaming |
MP4 M4A MOV 3GP | Video | H.264 | Baseline Profile, 480x320 pixels, up to 1500 kbps, 24 frames per second | Supported |
MPEG4 | Simple and Advance Simple Profile, 480x320 pixels, up to 1500 kbps, 24 frames per second | Supported | ||
H.263 | Profile 0 and 3, Level 45 | Supported | ||
Audio | AAC-LC, AAC+, eAAC+ | Supported | ||
AMR-NB | Supported | |||
AVI | Video | MPEG4 | Simple and Advance Simple Profile, 480x320 pixels, up to 1500 kbps, 24 frames per second | Supported |
Audio | MP3 | |||
ASF WMV WMA | Video | Windows Media Video 9 | WMV3, Simple and Main Profile, 480x320 pixels, 24 frames per second | |
Audio | Windows Media Audio 9 Standard/Professional | |||
Windows Media 10 Standard/Professional | ||||
MP3 | Audio | MP3 |
Recommended video format for local playback
File Format / Extension | Component | Codec | Notes |
MP4 | Video | MPEG4 | Advance Simple Profile, 480x320 pixels, up to 1500 kbps, 24 frames per second |
Audio | AAC-LC |
BlackBerry® Pearl™ 8100, BlackBerry® Pearl™ 8110, BlackBerry® Pearl™ 8120, and BlackBerry® Pearl™ 8220 smartphones (Global System for Mobile communications (GSM®), General Packet Radio Service (GPRS), and Enhanced Data Rates for Global Evolution (EDGE) networks)
Supported formats
File Format / Extension | Component | Codec | Notes | RTSP Streaming |
MP4 M4A MOV 3GP | Video | MPEG4 | Simple Profile, 240x320 pixels, up to 768 kbps, 24 frames per second | Supported |
H.263 | Profile 0 and 3, Level 45 | Supported | ||
Audio | AAC-LC, AAC+, eAAC+ | Supported | ||
AMR-NB | Supported | |||
AVI | Video | MPEG4 | Simple and Advance Simple Profile, 240x320 pixels, up to 768 kbps, 24 frames per second | Supported |
Audio | MP3 | |||
ASF WMV WMA | Video | Windows Media Video 9 | WMV3, Simple Profile, 240x320 pixels, 24 frames per second | |
Audio | Windows Media Audio 9 Standard/Professional | |||
Windows Media 10 Standard/Professional | ||||
MP3 | Audio | MP3 |
Recommended video format for local playback (BlackBerry® Device Software 4.5)
File Format / Extension | Component | Codec | Notes |
MP4 | Video | MPEG4 | Simple Profile, 240x320 pixels, up to 768 kbps, 24 frames per second |
Audio | AAC-LC |
Recommended video format for local playback (BlackBerry Device Software 4.2 and 4.3)
File Format / Extension | Component | Codec | Notes |
AVI | Video | MPEG4 | Simple Profile, 240x320 pixels, up to 768 kbps, 24 frames per second |
Audio | MP3 |
BlackBerry® Curve™ 8300, BlackBerry® Curve™ 8310, BlackBerry® Curve™ 8320, and BlackBerry® Curve™ 8350i smartphones, and BlackBerry® 8800 and BlackBerry® 8820 smartphones (GSM/GPRS/EDGE networks)
Supported formats
File Format / Extension | Component | Codec | Notes | RTSP Streaming |
MP4 | Video | MPEG4 | Simple Profile, 320x240 pixels, up to 768 kbps, 24 frames per second | Supported |
H.263 | Profile 0 and 3, Level 45 | Supported | ||
Audio | AAC-LC, AAC+, eAAC+ | Supported | ||
AMR-NB | Supported | |||
AVI | Video | MPEG4 | Simple and Advance Simple Profile, 320x240 pixels, up to 768 kbps, 24 frames per second | Supported |
Audio | MP3 | |||
ASF | Video | Windows Media Video 9 | WMV3, Simple Profile, 320x240 pixels, 24 frames per second | |
Audio | Windows Media Audio 9 Standard/Professional | |||
Windows Media 10 Standard/Professional | ||||
MP3 | Audio | MP3 |
Recommended video format for local playback (BlackBerry Device Software 4.5)
File Format / Extension | Component | Codec | Notes |
MP4 | Video | MPEG4 | Simple Profile, 320x240 pixels, up to 768 kbps, 24 frames per second |
Audio | AAC-LC |
Recommended video format for local playback (BlackBerry Device Software 4.2 and 4.3)
File Format / Extension | Component | Codec | Notes |
AVI | Video | MPEG4 | Simple Profile, 320x240 pixels, up to 768 kbps, 24 frames per second |
Audio | MP3 |
BlackBerry® Pearl™ 8130 smartphone (Code Division Multiple Access (CDMA) network)
Supported formats
File Format / Extension | Component | Codec | Notes | RTSP Streaming |
MP4 | Video | MPEG4 | Simple Profile, 240x320 pixels, up to 768 kbps, 24 frames per second | Supported |
H.263 | Profile 0 and 3, Level 45 | Supported | ||
Audio | AAC-LC, AAC+, eAAC+ | Supported | ||
AMR-NB | Supported | |||
ASF | Video | Windows Media Video 9 | WMV3, Simple Profile, 240x320 pixels, 24 frames per second | |
Audio | Windows Media Audio 9 Standard/Professional | |||
Windows Media 10 Standard/Professional | ||||
MP3 | Audio | MP3 |
Recommended video format for local playback
File Format / Extension | Component | Codec | Notes |
MP4 | Video | MPEG4 | Simple Profile, 240x320 pixels, up to 384 kbps, 24 frames per second |
Audio | AAC-LC |
BlackBerry® Curve™ 8330 smartphone and BlackBerry™ 8830 smartphone (CDMA network)
Supported formats
File Format / Extension | Component | Codec | Notes | RTSP Streaming |
MP4 3GP | Video | MPEG4 | Simple Profile, 320x240 pixels, up to 768 kbps, 24 frames per second | Supported |
H.263 | Profile 0 and 3, Level 45 | Supported | ||
Audio | AAC-LC, AAC+, eAAC+ | Supported | ||
AMR-NB | Supported | |||
ASF WMV WMA | Video | Windows Media Video 9 | WMV3, Simple Profile, 320x240 pixels, 24 frames per second | |
Audio | Windows Media Audio 9 Standard/Professional | |||
Windows Media 10 Standard/Professional | ||||
MP3 | Audio | MP3 |
Recommended video format for local playback
File Format / Extension | Component | Codec | Notes |
MP4 | Video | MPEG4 | Simple Profile, 320x240 pixels, up to 768 kbps, 24 frames per second |
Audio | AAC-LC |
Additional Information
Note: Streaming requires BlackBerry Device Software 4.3 or later.