I am trying to get an application ID from an app.
My final goal is getting push messages to it. But I can't figure out why my package name doesn't show up. Does someone have an solution for it? Or an example app where it is working on?
This is my code I used for getting my package name:
@Override
protected void onCreate(Bundle savedInstanceState) {
ClassA instanceOfClass = new ClassA();
String packageName = instanceOfClass.getClass().getPackage().getName();
System.out.println( "Package Name : " + packageName);
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}