Contents
1. Problem Description
Some device do not allow opening multiple network connections. Many connected applications may need multiple connections: browser, email, IM, Network games, Mapping/Location based applications). 2. Solution Description
Application design should avoid relying on multiple connections, this feature is fragmented. However, some application may take advantage of multiple connections, when available, to improve performance or user experience. This solution is compatible with MIDP 1.0 and up Code the maximum (or lower) number of network connections in the JAD file, but not in the manifest, in order to avoid useless creating versions. Create a tester midlet. This midlet will count the maximum number of allowed connections on a target device. The test midlet attempt to create several connections until it reaches the maximum number. When this maximum number of allowed connections is known, include it in JAD file attribute, but not in the JAR file manifest. This number will be retrieved at runtime. The application shall maintain a global variable (application wide) with the current number of open connections. Hard coding the maximum number of allowed connections in the source code should be avoided, it introduces useless fragmentation. Defensive programming, i.e. runtime detection of the maximum number of allowed connections should be avoided as it may have some impact on the user bill, and may create hard to understand security prompts. Example: Defining maximum number of connections in the JAD file.
Example: Reading max number of connections from the JAD file.
Example: Creating simultaneous network connections.
Example: Closing simultaneous network connections.
Example: Counting the maximum number of connections.
None 3. List of Affected Devices
All devices 4. Keywords
Network, Multiple Connections, Browser, Email, IM, Network games, Mapping, Location Copyright 2006 Sun Microsystems, Inc. and Orange SA All Rights Reserved. | |||||||||||||||||
|
| ||||||||||||