Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
Developing Apps for Android
Alan German
Ottawa PC Users’ Group
Get the “How-to” from Youtube
Writing your first Android app – everything you need to know
https://www.youtube.com/watch?v=mAJeK283j0I
Gary Sims, Android Authority
Download Android Studio
https://developer.android.com/studio
Installation Instructions
Ctrl-C to cut
from web page
Ctrl-Shift-V
to paste into
Terminal
• Ignore Youtube download (JDK) and setup steps
• Unpack zip file to create the folder android-studio
• Run sudo caja (give file manager root access)
• Move android-studio to /usr/local
• Run /usr/local/android-studio/bin/studio.sh
Linux Installation
navigate to the android-studio/bin/ directory, and execute studio.sh
Leave all defaults:
• Installation type = Standard
• Verify Settings
• Emulator Settings
• Download Components
(e.g. SDK, Android Emulator)
Setup Wizard
Download and installation of multiple components
takes several minutes - eventually we get to the…
Main Menu!
Menu – Programming – Android Studio
(and… Add to desktop)
Click to display the Event Log
Project
tree
Code editor and design
Message area
Palette (Widgets) Properties
Design/Text
Text Mode
Preview
Edit text directly in
the XML file or in
the preview window
So, what are people
going to do?
So, what are people
going to do?
…let’s prepare a
response!
public void onButtonTap(View v) {
Toast myToast = Toast.makeText(
getApplicationContext(),
“Some text in response",
Toast.LENGTH_LONG);
myToast.show();
}
Add a toast*
*A “toast” is a message that is
briefly displayed on the screen
Run the current project
(app) in the emulator
Press!
Build a Release Version
Fix? - Remove the line:
android:layout_below="@+id/textView"
touchy_button.apk
Available from the aStore
or from the Pl-a-y Store
App Now Available!
Touchy Button
$0.01