This is an old revision of the document!


Lab 0. Setup

Objectives:

  • Create your github classroom repository
  • Configure Android studio, sdk and emulator
  • Create a Hello World app and run it in the emulator
  • Familiarize with basic git and create a pull request

Github Classroom repository

As mentioned in Online Activities page, you will use a git repository hosted on github classroom for all activities (labs and project).

Step 1. Create a github account or login on an existing one

Step 2. Use the invite link received from your Teaching Assistant during the live session

Step 3. Accept the assignment

Step 4. Refresh your page

Step 5. Click on your repository link (if you get an error, make sure you are logged in)

Step 6. Edit the readme file and add your name, master programme and any other information you consider necessary

Tip: You can edit files directly on github, which is an useful feature especially for readme files.

Android environment

:!: This part can take more than half an hour due to all the tools you need to download

Install on any OS you prefer the following tools:

* Android Studio

  • It offers support for git, logcat (android logs), profiling, database inspection, layout inspection

* Install the SDK and tools

SDK - the latest one should be enough (Android 11)

  • We recommend installing the sources as well to easily see the javadocs of the API you'll use

Android SDK Tools and Emulator

The Android SDK Tools offer adb, which you can use to connect to your device.

Android Emulator

Most apps can be run in an emulator (most because the emulator lacks support for some features such as Bluetooth connectivity). You can run the apps your create during the labs in an emulator or on a physical device.

Step 1. To setup a virtual device you need to access Tools → AVD Manager Step 2. Create a device

Step 3. Select a device type and system image

Setting up your physical device

Activate Developer Options

  • Go to About phone in the phone Settings
  • Tap on the Build number tile 7 times until it says “You are now a developer!”
  • You should now see a tile that says “Developer options” right above of the “About phone” tile

Connect your device via an USB cable or configure adb via Wi-FI

When the device is connected you can see it in the run targets window:

or in the Logcat view:

TODO

or using the adb devices command from the CLI (make sure you add android sdk tools to your Path)

$ adb devices
List of devices attached
R58M24W63GN     device

Hello World

Let's create a Hello World project to try out the IDE and tools.

Explanations about these steps: Create your first project

Run the app on your physical device or in a virtual device. Press the run button

You can check the logs in the Logcat window

smd/laboratoare/00.1615397422.txt.gz · Last modified: 2021/03/10 19:30 by adriana.draghici
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0