README.txt
上传用户:szyfpy
上传日期:2021-03-01
资源大小:240k
文件大小:7k
源码类别:

通讯/手机编程

开发平台:

Java

  1. // Copyright 2004 Nokia Corporation.
  2. //
  3. // THIS SOURCE CODE IS PROVIDED 'AS IS', WITH NO WARRANTIES WHATSOEVER,
  4. // EXPRESS OR IMPLIED, INCLUDING ANY WARRANTY OF MERCHANTABILITY, FITNESS
  5. // FOR ANY PARTICULAR PURPOSE, OR ARISING FROM A COURSE OF DEALING, USAGE
  6. // OR TRADE PRACTICE, RELATING TO THE SOURCE CODE OR ANY WARRANTY OTHERWISE
  7. // ARISING OUT OF ANY PROPOSAL, SPECIFICATION, OR SAMPLE AND WITH NO
  8. // OBLIGATION OF NOKIA TO PROVIDE THE LICENSEE WITH ANY MAINTENANCE OR
  9. // SUPPORT. FURTHERMORE, NOKIA MAKES NO WARRANTY THAT EXERCISE OF THE
  10. // RIGHTS GRANTED HEREUNDER DOES NOT INFRINGE OR MAY NOT CAUSE INFRINGEMENT
  11. // OF ANY PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OWNED OR CONTROLLED
  12. // BY THIRD PARTIES
  13. //
  14. // Furthermore, information provided in this source code is preliminary,
  15. // and may be changed substantially prior to final release. Nokia Corporation
  16. // retains the right to make changes to this source code at
  17. // any time, without notice. This source code is provided for informational
  18. // purposes only.
  19. //
  20. // Nokia and Nokia Connecting People are registered trademarks of Nokia
  21. // Corporation.
  22. // Java and all Java-based marks are trademarks or registered trademarks of
  23. // Sun Microsystems, Inc.
  24. // Other product and company names mentioned herein may be trademarks or
  25. // trade names of their respective owners.
  26. //
  27. // A non-exclusive, non-transferable, worldwide, limited license is hereby
  28. // granted to the Licensee to download, print, reproduce and modify the
  29. // source code. The licensee has the right to market, sell, distribute and
  30. // make available the source code in original or modified form only when
  31. // incorporated into the programs developed by the Licensee. No other
  32. // license, express or implied, by estoppel or otherwise, to any other
  33. // intellectual property rights is granted herein.
  34. Release Notes: btsppEcho MIDlet                    (March 2004)
  35. ===============================================================
  36. These notes are only intended as a brief guide for building and running
  37. the example.  A more detailed description of the design of this MIDlet
  38. example has been provided as a separate design document.
  39. 1. Build environment
  40. --------------------
  41. 'JBuilder' with 'MobileSet' plus 'Nokia Developers Suite
  42. for J2ME' were used to build and run the MIDlet on a Windows test
  43. environment.  Installation, configuration and use of these tools is beyond
  44. the scope of the release notes.
  45. A build.xml file is also included to build the MIDlet using ant
  46. It uses the MIDP tasks included in the Antenna project. It can be found
  47. at http://antenna.sourceforge.net. Copy the antenna-bin.jar file to
  48. the ANT_HOME/lib directory
  49. If necessary to customize some properties build.properties can be used
  50. 2. Building and running the example using JBuilder
  51. --------------------------------------------------
  52. Step 1. Open the BtsppEcho.jpx project
  53.         This project contains all the .java source files contained
  54.         in the subdirectory '.src...'
  55.         Notes:
  56.           - The 'Project' / 'Project Properties' windows can be used
  57.             to set project properties related to building and running a MIDlet.
  58.           - (The 'Tools' / 'Nokia Developer's Suite for J2ME(TM)' /
  59.              'Create Application Descriptor' can be used to create a .jad and
  60.              .jar files. These have already been created as a convienence.)
  61. Step 2. Building the MIDlet
  62.         These JBuilder mechanisms were used to build the MIDlet classfiles:
  63.            'Project' / 'Make Project "btsppEcho.jpx"'
  64.            'Project' / 'Rebuild Project "btsppEcho.jpx"'
  65.         You should see a message like: 'Build succeeded. Build took 4 seconds.'
  66.         Once the project has been built at least once as in Step 1,
  67.         one can use:
  68.            'Tools' / 'Nokia Developer's Suite for J2ME' / 'Recreate'
  69.         to recreate the jar file.
  70. Step 3. Running the MIDlet
  71.         Use this mechanism to run the example:
  72.            'Run' / 'Run Project'
  73.         The 'Project' / 'Project Properties' / 'Run' / 'MIDlet' tab
  74.         may be used to run the example using via the .jad and .jar files.
  75.         
  76.         For a Bluetooth piconet, start running the 'Bluetooth slaves' first
  77.         (i.e. the 'application-level clients' in this example) and then start the
  78.         'Bluetooth master' (i.e. the 'application-level server' in this example)
  79.         and initiate the Bluetooth connections from the master to the slaves.
  80. Step 4. Preparing the MIDlet for OTA download
  81.         One may wish to perform various optional steps at this point,
  82.         such as obfuscation, optimized compiling, jar file compression, etc.
  83.         These are beyond the scope of these release notes.
  84.         Because a variety of methods could be used to create the final .jad
  85.         and .jar files used for OTA downloading of the MIDlet:
  86.           - I recommend checking that the attributes in the .jad and
  87.             .jar manifest files are correct, and that they match EXACTLY when
  88.             present in both. One should think about the reasons why some
  89.             arbitrary actual MIDP device might refuse to run a MIDlet
  90.             (JAR size mismatches, attribute mismatches, etc.)
  91.           - The 'check.sh' script gives a model of the types of things one
  92.             might want to double-check (e.g. attribute values should match,
  93.             MIDlet-Jar-Size should match the actual size, MIDlet-Jar-URL
  94.             should be correct, etc.) in the process of preparing .jad and
  95.             .jar files for use in OTA downloading. It is a guide and may
  96.             not be an exhaustive list.
  97.           - It is worth emphasizing that the mandatory parameters of the
  98.             .jad and .jar manifest files should be present, should be correct,
  99.             and should match for those attributes which are present in both.
  100.             The MIDP specification covers the mandatory .jad and .jar
  101.             manifest attributes.
  102. Consult the relevant documentation of your build tools, for any
  103. other questions or issues that may arise.
  104. 3. Building and running the example using ant
  105. ---------------------------------------------
  106. Having ant and antenna installed the MIDlet can be built using the
  107. 'ant' or ant 'build' command.
  108. For a clean build use the
  109. 'ant cleanbuild' command
  110. 4. Other notes
  111. --------------
  112. This MIDlet does Class of Device (COD) filtering after 'device
  113. inquiry' and before 'service discovery'. This is essential in a real
  114. MIDlet, so the MIDlet don't search to see if a game service is
  115. running on any arbitrary nearby Bluetooth device (e.g. headset, etc.),
  116. but just one the ones where the service is most likely to be found.
  117. See the related code for the COD filtering in method
  118. 'deviceDiscovered' of class 'example.btsppecho.ServiceDiscoveryList'.
  119. However the 'Series 60 MIDP Concept Emulator Beta 0.3.1' doesn't
  120. seem to return values from methods DeviceClass.getMajorDeviceClass()
  121. and DeviceClass.getMinorDeviceClass() that one might
  122. expect from a real mobile phone. That means the COD filtering
  123. code fails when using that beta version of the emulator. As a
  124. workaround if you use that emulator, you can set the parameter
  125. "isEmulator = true" in method 'deviceDiscovered' of class
  126. 'example.btsppecho.ServiceDiscoveryList' by modifying the
  127. Java sourcecode. If you do this, you should remember to set
  128. "isEmulator = false" before compiling the MIDlet for download
  129. onto real a MIDP phone.