




























































































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Practical Notes Lab assignmemts of Android fundamental application development
Typology: Exercises
1 / 136
This page cannot be seen from the preview
Don't miss anything!





























































































SITTTR – Smart Device Programming Manual Page 1
SITTTR – Smart Device Programming Manual Page 2
STATE INSTITUTE OF TECHNICAL TEACHERS TRAINING AND RESEARCH
GENERAL INSTRUCTIONS Rough record and Fair record are needed to record the experiments conducted in the laboratory. Rough records are needed to be certified immediately on completion of the experiment. Fair records are due at the beginning of the next lab period. Fair records must be submitted as neat, legible, and complete. INSTRUCTIONS TO STUDENTS FOR WRITING THE FAIR RECORD In the fair record, the index page should be filled properly by writing the corresponding experiment number, experiment name , date on which it was done and the page number. On the right side page of the record following has to be written:
SITTTR – Smart Device Programming Manual Page 4
SITTTR – Smart Device Programming Manual Page 5
Introduction
Android is an open source and Linux-based Operating System for mobile devices such as smartphones and tablet computers. Android was developed by the Open Handset Alliance, led by Google, and other companies. Android offers a unified approach to application development for mobile devices which means developers need only develop for Android, and their applications should be able to run on different devices powered by Android. The first beta version of the Android Software Development Kit (SDK) was released by Google in 2007 where as the first commercial version, Android 1.0, was released in September 2008. The source code for Android is available under free and open source software licenses.
Android is an operating system based on Linux with a Java programming interface. Android provides a rich application framework that allows to build innovative apps and games for mobile devices in a Java language environment. The Android Software Development Kit (Android SDK) provides all necessary tools to develop Android applications. The Android SDK contains tools to create, compile and package Android application. The Android SDK also provides an Android device emulator, so that Android applications can be tested without a real Android phone. We can create Android virtual devices (AVD) via the Android SDK, which run in this emulator. The Android SDK contains the Android debug bridge (adb) tool which allows to connect to a virtual or real Android device. Google offers the Google Play service in which programmers can offer their Android application to Android users. Google phones include the Google Play application which allows installing applications. Google Play also offers an update service ie. if a programmer uploads a new version of his application to Google Play, this service will notify existing users that an update is available and allow to install it.
SITTTR – Smart Device Programming Manual Page 7
Step1: Setup the repo for installing Android Studio
$ sudo apt-add-repository ppa:paolorotolo/android-studio
Step2: $ sudo apt-get update
Step3: $ sudo apt-get install android-studio
Above install command will install android-studio in the directory /opt. Now, run the following command to start the setup wizard:
Step4: $ /opt/android-studio/bin/studio.sh
This will invoke the setup screen. Following are the screen shots that follow to set up Android studio:
SITTTR – Smart Device Programming Manual Page 11
Chapter-
Installing Android Studio on Windows Android Studio is one of the best and most popular IDE for development of Android application which is released by IntelliJ IDEA. Android studio has rich functionalists and easy to work. Android studio has great and awesome user interface, it is also smart with coding and will save your time.
Android programming is Java based programming so it requires JDK & JRE environment. You must have toinstall JDK & JREfor working with android. After installing JDK and JRE you need to configure Environment variables on your computer. Environment variables let to provide some specific path for android. There will be JDK/bin or JDK only. After installing JDK & JRE and configuring environment variables, the next step will be installation of SDK (Software Development Kit). This is another important component for android programming. If you are thinking to develop android apps, then you must install SDK on your computer.
Installing Andrio Studio on Windows
To download Android Studio for you computer, you need to visit official site of android. There you will see android studio download button.
SITTTR – Smart Device Programming Manual Page 13
Step3: Now choose what you want to install, all are most important component in android programming.
Go for "Next"
SITTTR – Smart Device Programming Manual Page 14
Step4: Go for "I Agree", It's for integrating SDK, it will confirm SDK installation.
Step5: Go for "I Agree", It's for Haxm installation.
SITTTR – Smart Device Programming Manual Page 16
Step7: Here you need to define the size of android emulator processor. You can define up to
2GB and more than that, depends on your RAM capacity. The size will be determined
through Haxm. This will help your android studio to run faster.
SITTTR – Smart Device Programming Manual Page 17
Step8: Now choose setting for shortcut of android studio on your computer.
SITTTR – Smart Device Programming Manual Page 20
Chapter-
Creating New Project on Android Studio Android Studio is one of the best IDE (Integrated Development Environment) for Android Developers with rich functionality and control mechanism. It was announced on 2013 and today it is one of the most popular IDE in the world for android development purpose.
In this chapter we will learn how to create new project on android studio.
Step1: First of all you need to start your Android Studio. Then it will show you the default start window on your screen, where you can see various options.