<> = Installing & Testing Core Apps on Devices = ||<>|| This guide details how to setup your computer to download, install and run core apps on devices running Ubuntu Touch using the Ubuntu SDK. It presumes you're already running Ubuntu and have flashed your device with an up to date image of the Ubuntu Touch Preview. == Preparation == === Installing the Ubuntu SDK === {*} ''You can skip this step if you've already installed the Ubuntu SDK'' Follow Step 1 of the 'gomobile' page on the developer website which details how to install Ubuntu SDK components:- * [[http://developer.ubuntu.com/get-started/gomobile/|Install the Ubuntu SDK >]] Do not proceed until you can successfully open Qt Creator and can see an Ubuntu branded welcome screen and a devices button on the left. If you do not see those, then the above steps have not been done correctly. === Downloading Core Apps === {*} ''You can skip this section if you've already downloaded the core apps once. You instead probably want to [[#Updating|update the core apps]]'' Core apps are available as a package in a PPA, but for this guide we will take the source code directly from trunk. ==== Installing Bazaar ==== You'll need to open a terminal before you run any of these commands. Press CTRL+ALT+T to open a terminal, or open it from the Dash. {{{ sudo apt-get update sudo apt-get install bzr }}} ==== Download Core apps ==== You'll need to open a terminal before you run any of these commands. Press CTRL+ALT+T to open a terminal, or open it from the Dash. {{{ mkdir -p ~/phablet/coreapps cd ~/phablet/coreapps }}} {{{ bzr branch lp:ubuntu-calculator-app bzr branch lp:ubuntu-calendar-app bzr branch lp:ubuntu-weather-app bzr branch lp:ubuntu-clock-app bzr branch lp:ubuntu-rssreader-app }}} === Setup Device in Developer Mode === * Ensure your device is connected to the wireless network. * Attach your previously flashed device via the USB port. * Open Qt Creator from the Dash * Click the 'Devices' button on the left. {{attachment:Enable developer mode.png||width=60%}} Note: If you start Qt Creator and the device was not connected to the network, you can connect it to wifi then click "Detect Devices" in the top right of qtcreator devices pane. * Click the "Enable developer mode" button in Qt Creator devices pane. Note: This will take a minute or so as Qt Creator connects to the device and installs some necessary software. You are now ready to send apps to the device via qtcreator. == Opening Core Apps in Ubuntu SDK == * Start Qt Creator from the Dash * File -> Open File or Project (Ctrl+O) Note: If you previously opened a project it will be available as a selection in the Welcome pane, making it easy to come back to and test again later. Navigate to ~/phablet/coreapps/ubuntu-calculator-app Double click the .qmlproject file (for example ubuntu-clock-app.qmlproject) == Running Apps Locally == Press CTRL+R, or alternatively either press the big green "play" button at the bottom left-hand side or choose Build -> Run from the menu. == Sending Apps to Devices == You must previously have setup the device in developer mode as above and have the application opened. Press CTRL+F12 or choose Build -> Ubuntu -> Run in Ubuntu device from the menu. If you receive an error about ssh being unable to connect, go back to the Devices button on the left-hand side and click "Detect Devices" again to re-connect. Then repeat the above step. <> == Updating core apps == Once you have done the bzr branch above, you can keep the apps updates using bzr pull. You can then go back to loading the app in the SDK and running locally or on the device. * You'll need to open a terminal before you run any of these commands. Press CTRL+ALT+T to open a terminal, or open it from the Dash. {{{ cd ~/phablet/coreapps/ubuntu-calculator-app bzr pull cd ~/phablet/coreapps/ubuntu-calendar-app bzr pull cd ~/phablet/coreapps/ubuntu-weather-app bzr pull cd ~/phablet/coreapps/ubuntu-clock-app bzr pull cd ~/phablet/coreapps/ubuntu-rssreader-app bzr pull }}}