PlayStation?Mobile Development Cookbook
上QQ阅读APP看书,第一时间看更新

Deploying to PlayStation Mobile certified Android devices

This recipe covers deploying an application to an Android device. Running on an Android device requires a developer license that you can purchase in the PSM portal.

Getting ready

You need to have installed the PlayStation Mobile SDK to have access to required files. Of course you will also require a PlayStation Mobile compatible Android device. Make sure the Android ADB driver for your phone is installed on your computer; you can download a generic version from Google's Android development website if required.

How to do it...

  1. Attach your Android phone by USB to your computer. It may install a driver at this point, let it.
  2. Open a Command Prompt (Start | Run and type cmd.exe) and type "%SCE_PSM_SDK%/tools/update_psmdevassistant.bat" including the quotes. This will install the PSM Development Assistant on your device.
  3. On your device, locate and run the PSM Development Assistant application.
  4. On your computer, in the PlayStation Mobile folder in the Start menu, load Publishing Utility.
  5. Now you need to create a Publisher Key; you will only have to do this once. First click the Key Management tab, then the Generate Publisher Key button. Name your key and then enter your login information for the PSM portal. A key will be generated for you.
    How to do it...
  6. Click on the Generate App Key Ring button. In the app.xml field locate the App.xml file of the project you want to run on your device and then click on OK. You will have to authenticate with your SEN ID again. If all goes well, your app will now be listed in the Registered App Key Ring list.
    How to do it...
  7. Now fire up your project in PSM Studio. Make sure that you have the PlayStation Mobile Development Assistant running on your device and your phone is connected by a USB connection. Set Android as your target using the Project | PlayStation Mobile Device Target menu item and select your phone device.
    How to do it...
  8. Run your application by pressing the F5 key or choosing Run or Debug from the menu and your application will be copied to your Android device and run.

There's more...

You need to make sure that USB debugging is enabled on your Android device. This varies from device to device, but is generally located in the Settings | Developer Options | USB debugging menu.

I ran into an error when trying to add my application to the key ring. To fix this, I recreated my Publisher Key. If you are working alone, this isn't a big process, but if you are part of a team, you will need to distribute the updated key.