1 <p>This application is an example of an Android library project, a type of 2 project that lets you store and manage shared code and resources in one place, 3 then make them available to your other Android applications. </p> 4 5 <p>The TicTacToeLib library project is designed to provide a game-play Activity, 6 <code>GameActivity</code> to other applications. Dependent applications simply 7 launch the Activity using an explicit intent — once launched, 8 <code>GameActivity</code> assumes control of the application lifecycle and 9 handles all events and UI interactions.</p> 10 11 <ul> 12 <li>The library project includes an <a 13 href="AndroidManifest.html">AndroidManifest.xml</a> file that 14 declares <code>GameActivity</code>.</li> 15 <li><a 16 href="src/com/example/android/tictactoe/library/GameActivity.html">GameActivity.java</a> 17 handles most of the application lifecycle and manages general game play.</li> 18 <li><a 19 href="src/com/example/android/tictactoe/library/GameView.html">GameView.java</a> 20 renders the UI of the game and manages interaction events during game play.</li> 21 </ul> 22 23 <p>If you want to build the TicTacToeLib application, you can obtain it by 24 downloading the "Samples for SDK API 8" component (or higher version) into your 25 SDK, using the <em>Android SDK and AVD Manager</em>. </p> 26 27 <p>Note that you can not build and run TicTacToeLib independently, since it is a 28 library project and not a true Android application project. To run it, you need 29 to build the application that uses the library project — in this case, the 30 <a href="../TicTacToeMain/index.html">TicTacToeMain</a> application, which is also included in the Samples 31 SDK comnponent. </p> 32 33 <p>To build an application that uses a library project, you also need to update 34 to the latest version of the SDK tools (r6 or higher) and Android platforms, as 35 well as the latest version of ADT (0.9.7 or higher), if you are developing in 36 Eclipse. </p> 37 38 <p>For information about how to set up Android library projects, refer to 39 <a href="../../../guide/developing/eclipse-adt.html#libraryProject">Developing 40 in Eclipse with ADT</a> or <a 41 href="../../../guide/developing/other-ide.html#libraryProject">Developing in 42 Other IDEs</a>, depending on your environment.</p>