Are you going to watch TV tonight? If so, what will you watch?
Developing Apps for Android - OPCUG · Edit text directly in the XML file or in the preview window...
Transcript of Developing Apps for Android - OPCUG · Edit text directly in the XML file or in the preview window...
![Page 1: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/1.jpg)
Developing Apps for Android
Alan German
Ottawa PC Users’ Group
![Page 2: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/2.jpg)
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
![Page 3: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/3.jpg)
Download Android Studio
https://developer.android.com/studio
![Page 4: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/4.jpg)
Installation Instructions
![Page 5: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/5.jpg)
Ctrl-C to cut
from web page
Ctrl-Shift-V
to paste into
Terminal
![Page 6: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/6.jpg)
• 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
![Page 7: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/7.jpg)
![Page 8: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/8.jpg)
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…
![Page 9: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/9.jpg)
Main Menu!
![Page 10: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/10.jpg)
![Page 11: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/11.jpg)
![Page 12: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/12.jpg)
![Page 13: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/13.jpg)
![Page 14: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/14.jpg)
Menu – Programming – Android Studio
(and… Add to desktop)
![Page 15: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/15.jpg)
Click to display the Event Log
![Page 16: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/16.jpg)
![Page 17: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/17.jpg)
Project
tree
![Page 18: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/18.jpg)
Code editor and design
![Page 19: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/19.jpg)
Message area
![Page 20: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/20.jpg)
![Page 21: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/21.jpg)
Palette (Widgets) Properties
Design/Text
![Page 22: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/22.jpg)
Text Mode
Preview
![Page 23: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/23.jpg)
Edit text directly in
the XML file or in
the preview window
![Page 24: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/24.jpg)
![Page 25: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/25.jpg)
![Page 26: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/26.jpg)
![Page 27: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/27.jpg)
So, what are people
going to do?
![Page 28: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/28.jpg)
So, what are people
going to do?
…let’s prepare a
response!
![Page 29: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/29.jpg)
![Page 30: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/30.jpg)
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
![Page 31: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/31.jpg)
![Page 32: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/32.jpg)
![Page 33: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/33.jpg)
![Page 34: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/34.jpg)
![Page 35: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/35.jpg)
![Page 36: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/36.jpg)
![Page 37: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/37.jpg)
![Page 38: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/38.jpg)
Run the current project
(app) in the emulator
![Page 39: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/39.jpg)
Press!
![Page 40: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/40.jpg)
![Page 41: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/41.jpg)
![Page 42: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/42.jpg)
Build a Release Version
![Page 43: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/43.jpg)
![Page 44: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/44.jpg)
![Page 45: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/45.jpg)
Fix? - Remove the line:
android:layout_below="@+id/textView"
![Page 46: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/46.jpg)
![Page 47: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/47.jpg)
touchy_button.apk
![Page 48: Developing Apps for Android - OPCUG · 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](https://reader034.fdocuments.us/reader034/viewer/2022051605/600cc7d2e32e2708eb09c042/html5/thumbnails/48.jpg)
Available from the aStore
or from the Pl-a-y Store
App Now Available!
Touchy Button
$0.01