This line always returns null. In this particular case the context is an activity. Any ideas are very much appreciated!
Edit
context.getApplicationContext().getApplicationInfo().name
Still returns null
This line always returns null. In this particular case the context is an activity. Any ideas are very much appreciated!
Edit
context.getApplicationContext().getApplicationInfo().name
Still returns null
Look at get application name from package name for the answer. The highest rated entry there worked for me.
In order to read android:name
attribute in tag, you have to access ApplicationInfo.className
field instead. Thus,
context.getApplicationContext().getApplicationInfo().className
will return what you expect.