If you use the new build system ** Gradle, then getPackageName will strangely return the application identifier, not the package name. Therefore, MasterGaurav's answer is correct, but it does not need to start c ++
If you refer to the package name by application ID ...
Read more about the differences here .
** not so new at the moment
++ I understand that his answer got great meaning in 2011
tir38 Jul 07 '16 at 21:49 2016-07-07 21:49
source share