The second approach to know the package and activity details is to use the Appium GUI app. When we use Appium to install the app on the emulator/device, it also loads the Package details and the Launch Activity. So, the steps to be followed are as listed:
- Launch the Emulator/Device.
- Launch the Appium GUI app.
- Select the App path parameter and browse to the APK package.
- Click on Launch.
- This will start the Appium server; now click on the Inspector icon.
- Click on Stop (to stop the Appium server).
- Click on the Android icon in the Appium GUI app.
- Select the Package checkbox and click on the dropdown; it will show the value from the last APK file installed.
- Select the Launch Activity checkbox and click on the dropdown; it will show all the values from the last APK file installed.
Refer to the following screenshot: