Build and Run your app on device
Build the .apk file
Rename the .apk file
PeriodLabNumberLastFirstCustomName.apk
P8L01aTraDanFunApp.apk
Submit assignment
.apk file
Classes: MainActivity.java
Layouts: activity_main.xml
Custom ideas and demo
Color, font, images, sound
Coloring Button: convert to AppCompatButton, then set background color
<Button => androidx.appcompat.widget.AppCompatButton
android:background="#ccddaa"
Common Attributes or go to the bottom of the View reference page
text to speech?
RadioGroup and RadioButton?
more widgets??
Customize as you desire...
Submit as Lab01b
P8L01bTraDanFunApp.apk
Video demonstrating your embellishments
Thread thread = new Thread() {
@Override
public void run() {
try {
while (!thread.isInterrupted()) {
Thread.sleep(1000);
runOnUiThread(new Runnable() {
@Override
public void run() {
// update TextView here!
}
});
}
} catch (InterruptedException e) {
}
}
};
thread.start();
Activity: An activity has a single screen, which usually composes of one of more views. An activity interacts with the user to perform one task.
Service: Background processes (similar to Windows' service or Unix's daemon), e.g., playing music.
Broadcast Receiver: Receives and reacts to system messages, e.g., low battery life.
Content Provider: Android defines a content provider mechanism for applications to share data without exposing the underlying implementation. Via content provider, your application can share data with other applications, or use data from another application (e.g., from SQLite Database).