Mobile Programming Assignment2
Mobile Programming Assignment2
Mobile programming
Assignment 2
Question
1. Describe the role of the Dalvik virtual machine and how it relates to Android Debugging.
Additionally show your understanding on how the 3 different methods of debugging in Android
Studio, including LogCat, Toast, and breakpoints work. Discuss the advantages and
disadvantages of each method. (10 Marks)
Answers
The Dalvik Virtual Machine was the original runtime environment for Android applications. Here is how
it relates to android debugging:
Execution Environment:
DVM executes Android app bytecode (compiled from Java or Kotlin) and manages memory,
threads, and resources.
Debugging DVM involves understanding its behavior during app execution.
Debugging DVM:
Regarding android debugging, there are three primary methods commonly used in Android Studio:
LogCat:
Role: Displays real-time logs from your device during app execution.
Advantages:
Disadvantages:
Toast:
Advantages:
Disadvantages:
Breakpoints:
Role: Pauses the app execution at specific lines of code during debugging.
Advantages:
Disadvantages: