Needs ADB to be installed
open terminal / cmd
connect your phone and check with adb devices
run - adb shell
open the app of which you want to know the mainActivity of
while the app is open , run - dumpsys window windows | grep -E mCurrentFocus
appPackage starts with com. and ends before backshash (/). appActivity starts after the backslash (/) and goes till the end.
source - http://www.automationtestinghub.com/apppackage-and-appactivity-name/