Вы находитесь на странице: 1из 14

Sony Tablet

Sony Corporation

Document Version

1.20
Date

2012-2-15

Development guideline of SDK Add-on for Sony Tablet

Sony Tablet
Sony Corporation

Document Version

1.20
Date

2012-2-15

Table of Contents
1 2 Introduction........................................................................................................................................ 3 User Guide (for all OS) ...................................................................................................................... 3 2.1 2.2 2.3 3 3.1 3.2 3.3 4 4.1 4.2 4.3 5 5.1 5.2 5.3 6 7 8 9 6.1 7.1 8.1 9.1 9.2 9.3 9.4 Advance Preparation ................................................................................................................... 3 Supported OS version.................................................................................................................. 3 SDK Directory Structure............................................................................................................. 4 Configuration............................................................................................................................... 4 Create AVD ................................................................................................................................. 4 Run the emulator ........................................................................................................................ 6 Configuration............................................................................................................................... 6 Create AVD ................................................................................................................................. 7 Run the emulator ........................................................................................................................ 9 Configuration............................................................................................................................... 9 Create AVD ................................................................................................................................. 9 Run the emulator ...................................................................................................................... 11 Run the emulator ...................................................................................................................... 11 Run the emulator ...................................................................................................................... 12 Run the emulator ...................................................................................................................... 12 Set Up Eclipse ........................................................................................................................... 13 Create AVD ............................................................................................................................... 13 Run the emulator ...................................................................................................................... 14 Set the build target ................................................................................................................... 14

User Guide (for Linux) ....................................................................................................................... 4

User Guide (for Windows) .................................................................................................................. 6

User Guide (for Mac) .......................................................................................................................... 9

How to Launch from Eclipse (for Linux) ......................................................................................... 11 How to Launch from Eclipse (for Windows) .................................................................................... 12 How to Launch from Eclipse (for Mac) ............................................................................................ 12 How to Launch from Eclipse (for all OS) ......................................................................................... 13

Note .......................................................................................................................................................... 14

2/14 Copyright 2011 Sony Corporation

Sony Tablet
Sony Corporation

Document Version

1.20
Date

2012-2-15

Introduction
The purpose of this guideline is to describe how to use the SDK Add-on for Sony Tablet The SDK Add-on contains emulators for Sony Tablet S and Sony Tablet P. Please use them for development.

User Guide (for all OS)

2.1 Advance Preparation


1. Download the Android SDK, depending on your Android platform, from the following URL. http://developer.android.com/index.html Uncompress it then set it to an arbitrary directory (hereinafter referred to as sdk-setup directly). 2. Launch Android SDK Manager to install a package. Execute android (if you use Windows, it is android.bat) in tools folder of Android SDK. If you have not installed Android SDK yet, please install it. Android SDK Platform 3.2, revision 1 is mandatory.

2.2 Supported OS version


OS Windows Version Windows XP 32bit Windows Vista 32bit/64bit Windows 7 32bit/64bit Ubuntu Linux Mac OS X Ubuntu 10.04 or later Snow Leopard (Mac OS X 10.6) Lion (Mac OS X 10.7)

3/14 Copyright 2011 Sony Corporation

Sony Tablet
Sony Corporation

Document Version

1.20
Date

2012-2-15

2.3 SDK Directory Structure


Sony-Tablet-SDK_Add-on-eng.integ-build-all-x86 docs libs skins tools Reference Library Emulator skin Customized emulator images Emulator samplesSample application

hardware.ini manifest.ini

User Guide (for Linux)

3.1 Configuration
1. Unpack the archive ( Sony-Tablet-SDK_Add-on-eng.integ-build-all-x86.zip) and store it in add-ons folder. 2. Add the following lines in .bashrc to set the environment variable. export PATH=$PATH:{sdk-setup-directory}/add-ons/ Sony-Tablet-SDK_Add-on-eng.integ-build-all-x86/tools export ANDROID_SDK_ROOT={sdk-setup-directory} 3. Reflect the environment variable $ source .bashrc

3.2 Create AVD


1. Create AVD by AVD Manager Launch Android Virtual Device Manager". - Execute android by avd option in tools folder of Android SDK. Click new. It displays "Create new Android Virtual Device (AVD)". Fill Name and SD Card.
4/14 Copyright 2011 Sony Corporation

Sony Tablet
Sony Corporation

Document Version

1.20
Date

2012-2-15

Display the drop-down list from "Target" and select "Sony Tablet Add-on (Sony Corp.) - API Level 13". Set "Skin" as "SonyTabletP" or "SonyTabletS". Click "Create AVD". 2. Create AVD by command line You need to use android in tools folder of Android SDK. Confirm that AVD target list contains "Sony Corp.: Sony Tablet Add-on:13". - Execute "./android list target" from command line. Execution example of "./android list target" $ ./android list target ==================== (snip) =========================== id: 10 or "Sony Corp.: Sony Tablet Add-on:13" Name: Sony Tablet Add-on Type: Add-On Vendor: Sony Corp. Revision: 2 Description: Sony Tablet Device Based on Android 3.2 (API level 13) Libraries: * com.sony.nfx.largescreen (com.sony.nfx.largescreen.jar) Skins: WXGA, SonyTabletP (default), SonyTabletS ABIs : armeabi Create AVD - Execute "./android create avd" from command line. Execution example of "./android create avd" $ ./android create avd -n SonyTabletS -t 10 -c 512M -s SonyTabletS Auto-selecting single ABI armeabi Created AVD 'SonyTabletS' based on Sony Tablet Add-on (Sony Corp.), ARM (armeabi) processor, with the following hardware config: hw.sdCard=yes hw.lcd.density=160 vm.heapSize=96 hw.lcd.dual=no
5/14 Copyright 2011 Sony Corporation

Sony Tablet
Sony Corporation

Document Version

1.20
Date

2012-2-15

hw.ramSize=512 *The value for "-t(--target)" should correspond the ID number of "Sony Corp.: Sony Tablet Add-on:13". *Set arbitrary values for "-n(--name)" and "-c(--sdcard)". *Set SonyTabletP or SonyTabletS for "-s(--skin)". Check the created AVD - Execute "./android list avd" from command line. Execute example of "./android list avd" $ ./android list avd Available Android Virtual Devices: Name: SonyTabletS Path: /home/{USERNAME}/.android/avd/SonyTabletS.avd Target: Sony Tablet Add-on (Sony Corp.) Based on Android 3.2 (API level 13) ABI: armeabi Skin: SonyTabletS Sdcard: 512M

3.3 Run the emulator


- Execute "emulator_sony_tablet_linux" from command line. Execute example of "emulator" $ emulator_sony_tablet_linux @SonyTabletS *"@(-avd)" should be the created AVD name. *You can expand and shrink the emulator window by "-scale". The range of the setting value is from 0.1 to 3.

User Guide (for Windows)

4.1 Configuration
1. Unpack the archive (Sony-Tablet-SDK_Add-on-eng.integ-build-all-x86.zip) and store it in add-ons folder.
6/14 Copyright 2011 Sony Corporation

Sony Tablet
Sony Corporation

Document Version

1.20
Date

2012-2-15

2. Set the environment valuable. Add the following values from Control Panel System and Security System Advanced System Settings Environment Variables (This is for Windows7). NamePath Value {sdk-setup-directory}add-onsSony-Tablet-SDK_Add-on-eng.integ-build-all-x86tools; NameANDROID_SDK_ROOT Value{sdk-setup-directory}

4.2 Create AVD


1. Create AVD by AVD Manager Launch Android Virtual Device Manager". - Execute AVD Manager.exe or android.bat by avd option in tools folder. Click new. It displays "Create new Android Virtual Device (AVD)". Fill Name and SD Card. Display the drop-down list from "Target" and select "Sony Tablet Add-on (Sony Corp.) - API Level 13". Set "Skin" as "SonyTabletP" or "SonyTabletS". Click "Create AVD". 2. Create AVD by command line You need to use android.bat in tools folder of Android SDK. Confirm that AVD target list contains "Sony Corp.: Sony Tablet Add-on:13". - Execute "./android.bat list target" from command line. Execute example of "android.bat list target" >android.bat list target Available Android targets: ==================== (snip) =========================== id: 2 or "Sony Corp.: Sony Tablet Add-on:13" Name: Sony Tablet Add-on Type: Add-On Vendor: Sony Corp Revision: 2
7/14 Copyright 2011 Sony Corporation

Sony Tablet
Sony Corporation

Document Version

1.20
Date

2012-2-15

Description: Sony Tablet Device Based on Android 3.2 (API level 13) Libraries: * com.sony.nfx.largescreen (com.sony.nfx.largescreen.jar) Skins: WXGA, SonyTabletP (default), SonyTabletS ABIs : armeabi Create AVD - Execute "./android.bat create avd" from command line. Execute example of "android.bat create avd" >android.bat create avd -n SonyTabletP -t 2 -c 512M -s SonyTabletP Auto-selecting single ABI armeabi Created AVD 'SonyTabletP' based on Sony Tablet Add-on (Sony Corp), ARM (armeabi) processor, with the following hardware config: hw.sdCard=yes hw.lcd.density=160 vm.heapSize=96 hw.lcd.dual=yes hw.ramSize=512 *The value for "-t(--target)" should correspond the ID number of "Sony Corp: Sony Tablet Add-on:13". *Set arbitrary values for "-n(--name)" and "-c(--sdcard)". *Set SonyTabletP or SonyTabletS for "-s(--skin)". Check the created AVD - Execute "./android.bat list avd" from command line. Execute example of "android.bat list avd" >android.bat list avd Available Android Virtual Devices: Name: SonyTabletP Path: C:Users{USERNAME}.androidavdSonyTabletP.avd Target: Sony Tablet Add-on (Sony Corp.) Based on Android 3.2 (API level 13) ABI: armeabi Skin: SonyTabletP Sdcard: 512M
8/14 Copyright 2011 Sony Corporation

Sony Tablet
Sony Corporation

Document Version

1.20
Date

2012-2-15

4.3 Run the emulator


- Execute "emulator_sony_tablet_win.exe" by command prompt. Execute example of "emulator" >emulator_sony_tablet_win.exe @SonyTabletP *"@(-avd)" should be the created AVD name. *You can expand and shrink the emulator window by "-scale". The range of the setting value is from 0.1 to 3.

User Guide (for Mac)

5.1 Configuration
1. Unpack the archive (Sony-Tablet-SDK_Add-on-eng.integ-build-all-x86.zip) and store it in add-ons folder. 2. Add the following lines in .bash_profile to set the environment variable. export PATH=$PATH:{sdk-setup-directory}/add-ons/Sony-Tablet-SDK_Add-on-eng.integ-build-all-x 86/tools export ANDROID_SDK_ROOT={sdk-setup-directory}

5.2 Create AVD


1. Create AVD by AVD Manager Launch "Android Virtual Device Manager". - Execute android by avd option in tools folder of Android SDK. Click new. It displays "Create new Android Virtual Device (AVD)". Fill Name and SD Card. Display the drop-down list from "Target" and select "Sony Tablet Add-on (Sony Corp.) - API Level 13". Set "Skin" as "SonyTabletP" or "SonyTabletS". Click "Create AVD". 2. Create AVD by terminal You need to use android in tools folder of Android SDK. 9/14 Copyright 2011 Sony Corporation

Sony Tablet
Sony Corporation

Document Version

1.20
Date

2012-2-15

Confirm that AVD target list contains "Sony Corp.: Sony Tablet Add-on:13". - Execute "./android list target" from terminal. Execute example of "./android list target" $ ./android list target ==================== (snip) =========================== id: 2 or "Sony Corp: Sony Tablet Add-on:13" Name: Sony Tablet Add-on Type: Add-On Vendor: Sony Corp Revision: 2 Description: Sony Tablet Device Based on Android 3.2 (API level 13) Libraries: * com.sony.nfx.largescreen (com.sony.nfx.largescreen.jar) Skins: WXGA, SonyTabletP (default), SonyTabletS ABIs : armeabi Create AVD - Execute "./android create avd" from terminal. Execute example of "android.bat create avd" Execute example of ./android create avd $ ./android create avd -n SonyTabletP -t 2 -c 512M -s SonyTabletP Auto-selecting single ABI armeabi Created AVD 'SonyTabletP' based on Sony Tablet Add-on (Sony Corp), ARM (armeabi) processor, with the following hardware config: hw.sdCard=yes hw.lcd.density=160 vm.heapSize=96 hw.lcd.dual=yes hw.ramSize=512 *The value for "-t(--target)" should correspond the ID number of "Sony Corp: Sony Tablet Add-on:13". *Set arbitrary values for "-n(--name)" and "-c(--sdcard)". *Set SonyTabletP or SonyTabletS for "-s(--skin)".
10/14 Copyright 2011 Sony Corporation

Sony Tablet
Sony Corporation

Document Version

1.20
Date

2012-2-15

Check the created AVD - Execute "./android list avd" from terminal. Execute example of "./android list avd" $ ./android list avd Available Android Virtual Devices: Name: SonyTabletP Path: /Users/{USERNAME}/.android/avd/SonyTabletP.avd Target: Sony Tablet Add-on (Sony Corp) Based on Android 3.2 (API level 13) ABI: armeabi Skin: SonyTabletP Sdcard: 512M

5.3 Run the emulator


- Execute "emulator_sony_tablet_mac" from terminal. Execute example of "emulator_sony_tablet_mac" $ emulator_sony_tablet_mac @SonyTabletP *"@(-avd)" should be the created AVD name. *You can expand and shrink the emulator window by "-scale". The range of the setting value is from 0.1 to 3.

How to Launch from Eclipse (for Linux)

Change the custom emulators file name depending on your Android platform then replace the emulator in tools folder of Android SDK with it. The following 6.1 is an example to replace the emulator by command line.

6.1 Run the emulator


1. Move emulator in tools folder of Android SDK. - Emulator name is "emulator_def" in the following example. $ mv {sdk-setup-directory}/tools/emulator {sdk-setup-directory}/tools/emulator_def

2. Copy the custom emulator "emulator_sony_tablet_linux" to tools folder of Android SDK.


11/14 Copyright 2011 Sony Corporation

Sony Tablet
Sony Corporation

Document Version

1.20
Date

2012-2-15

- Change the filename to emulator before copy the file. $ cp {sdk-setup-directory}/add-ons/Sony-Tablet-SDK_Add-on-eng.integ-build-all-x86/tools/emulator _sony_tablet_linux {sdk-setup-directory}/tools/emulator

How to Launch from Eclipse (for Windows)

Change the custom emulators file name depending on your Android platform then replace the emulator in tools folder of Android SDK with it. The following 7.1 is an example to replace the emulator by explorer.

7.1 Run the emulator


1. Move emulator.exe in tools folder of Android SDK. 2. Copy the custom emulator "emulator_sony_tablet_win.exe" to tools folder of Android SDK. 3. Change the custom emulator name to "emulator.exe".

How to Launch from Eclipse (for Mac)

Change the custom emulators file name depending on your Android platform then replace the emulator in tools folder of Android SDK with it. The following 8.1 is an example to replace the emulator by terminal.

8.1 Run the emulator


1. Move emulator in tools folder of Android SDK. - Emulator name is "emulator_def" in the following example. $ mv {sdk-setup-directory}/tools/emulator {sdk-setup-directory}/tools/emulator_def

2. Copy the custom emulator "emulator_sony_tablet_mac" to tools folder of Android SDK. - Change the filename to emulator before copy the file.
12/14 Copyright 2011 Sony Corporation

Sony Tablet
Sony Corporation

Document Version

1.20
Date

2012-2-15

$ cp {sdk-setup-directory}/add-ons/Sony-Tablet-SDK_Add-on-eng.integ-build-all-x86/tools/emulator _sony_tablet_mac {sdk-setup-directory}/tools/emulator

How to Launch from Eclipse (for all OS)

9.1 Set Up Eclipse


1. From Eclipse menu, select Help Install New Software to display install dialogue. 2. Install Developer Tools from https://dl-ssl.google.com/android/eclipse/. 3. Restart Eclipse. 4. From Eclipse menu, select Window Settings and display Settings dialog. 5. Select Android in Settings dialogue then change SDK location to the path for the target SDK.

9.2 Create AVD


1. Launch AVD Manager from Window Android Virtual Device Manager. 2. Click new. It displays "Create new Android Virtual Device (AVD)". 3. Fill Name and SD Card. 4. Display the drop-down list from "Target" and select "Sony Tablet Add-on (Sony Corp.) - API Level 13". 5. Set "Skin" as "SonyTabletP" or "SonyTabletS". 6. Click Create AVD.

13/14 Copyright 2011 Sony Corporation

Sony Tablet
Sony Corporation

Document Version

1.20
Date

2012-2-15

9.3 Run the emulator


1. Launch AVD Manager from Window Android Virtual Device Manager. 2. Select the created AVD from the AVD list then click Start to display Launch Options dialogue. - You can expand and shrink the emulator window by Scale display to real size. 3. The emulator is launched when you click Launch.

9.4 Set the build target


Set Sony Tablet Add-on as the build target when you develop an application by Sony Tablet_SDK_Add-on. The following is an example of how to select the build target. 1. Select File New Android Project from the Eclipse window project to display New Android Project dialog. 2. Specify an arbitrary project or location then click Next. 3. Specify Sony Tablet Add-on and click Next. Designate an arbitrary application information then click Finish.

Note
Sony Tablet is a trademark of Sony Corp.. Android is trademarks of Google Inc.

14/14 Copyright 2011 Sony Corporation

Вам также может понравиться