Presentation is loading. Please wait.

Presentation is loading. Please wait.

TODAY Android Studio Installation Getting started Creating your 1 st App Beginning to understanding Intents.

Similar presentations


Presentation on theme: "TODAY Android Studio Installation Getting started Creating your 1 st App Beginning to understanding Intents."— Presentation transcript:

1 TODAY Android Studio Installation Getting started Creating your 1 st App Beginning to understanding Intents

2 HOW DID YOUR INSTALLATION GO? AVAST is not your friend If you are cheap, go with AVG Hardware Acceleration Errors ? Update ! Update ! Update ! A look at your emulator Keywords: SDK manager, AVD manager

3 SDK MANAGER An SDK is a software development kit SDKs include tools, libraries, documentation and sample code that would help a programmer to develop an application. Most of the SDKs could be downloaded from the internet and many of the SDKs are provided free to encourage the programmers to use the SDK‘s programming language. Some widely used SDKs are Java SDK (JDK) that includes all the libraries, debugging utilities, etc., which would make writing programs much easier in Java. The Android SDK Manager separates the SDK tools, platforms, and other components into packages for easy access and management. You can also customize which sites the SDK Manager checks for new or updated SDK packages and add- on tools. Android apps are Java based, hence you had to install the Java SDK before Android studio.

4

5

6 Updates and not installed: Check for hardware accelaration

7 WHAT A MINUTE: WHAT IS AN API? API stand for Application Programming Interface. API is an interface that allows software programs to interact with each other. It defines a set of rules that should be followed by the programs to communicate with each other. APIs generally specify how the routines, data structures, etc. should be defined in order for two applications to communicate. Confused ? Remember this: “All SDKs consist of or contain APIs but not all APIs are SDKs.”

8 Updates and not installed: Check for hardware accelaration

9 AVD MANAGER An AVD is an Android Virtual Device An AVD is created using the Android emulator application. The Android emulator provides a virtual mobile device, an AVD, on which you can run your Android applications. The AVD models an actual device by defining hardware and software options to be emulated by the Android Emulator. As such, an AVD is an emulator configuration. Using the emulator you can run (prototype, develop and test) Android applications without using a physical device. The AVD Manager provides a graphical user interface (GUI) n which you can create and manage AVDs.

10

11

12 USING THE DEFAULTS IS JUST FINE ! Who knows – you may even recognize your own device.

13 Once created, here is where you start (run) your emulated device. Be patient this can take a while …

14

15

16 HAX errors will show up here. Go back to SDK manager to troubleshoot.

17 VOILA: YOU HAVE EMULATED

18 TODAY Android Studio Installation Getting started Creating your 1 st App Beginning to understanding Intents

19 RECAP OR POP QUIZ? 4 major classes: Activities Intents IntentServices BroadcastReceivers Take a piece of paper and write down what is an activity and what is an intent?

20 ANSWERS Activity is a core component of the Android platform. An activity is typically associated with a screen in the application. That means that most activities start and then show a user interface. When an Android app launches, some activity must be launched. An intent is used to make a request to the Android operating system. An Intent contains all the information needed by the Android OS to start a task. When you want to start an Activity, you must create an Intent that specifies that Activity

21 “My Answers “ by Anonymous Student “My Answers “ by Anonymous Student

22 USING AN INTENTS TO START AN ACTIVITY To launch one Activity from another, you will use an Intent. To start one Activity from another, you need to create two activities. At home, do this: 1. Create a new project MyFirstApplication. 2. Add a new blank Activity called MainActivity. Have a look at the manifest, java, and res folders. 3. Create a second Activity called SecondaryActivity. To do this, right click Java folder 4. Add code to MainActivity that starts SecondaryActivity when the Floating Action button is clicked. That’s the easy part !

23 Add the following code to your Floating Action Button: Intent startIntent = new Intent(getApplicationContext(),SecondaryActivity. class); startActivity(startIntent);

24 DEMO NOW ASSIGNMENT 2 – AT HOME Create the app demo’ed in class. Before panicking about rendering errors, Wait. It can take time. Please don’t edit the root tag. Instead, right click on the device image “Hide including lay-out” Make sure your emulator works. Check your SDK manager. Run your app in at least 4 AVD. Read the annotated code of the main activity.


Download ppt "TODAY Android Studio Installation Getting started Creating your 1 st App Beginning to understanding Intents."

Similar presentations


Ads by Google