From ApplicationInfo we can get the name of the package of the apk running. For example I have in my code { ApplicationInfo xyz; String abc= xyz.packageName; }
This would return the name of the package of the application running. But can we find out the name of the class as well from the name of the .apk running or the one we are trying to access. I want to know how to get the name of the main class of the apk at the run time.
Thanks a lot Aviral
Log.d("DEBUG",this.getClass().toString());
给出调试输出:
D/DEBUG ( 208): class me.my.package.name.Main
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.