My main activity starts with the following:
package com.example.alexander.bootintervals;
import android.content.Intent;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.design.widget.Snackbar;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.view.Menu;
import android.view.MenuItem;
import com.example.alexander.libraryproject.MyLogger;
public class MainActivity extends AppCompatActivity {
...
Now I am using some code from in other package, for example in package com.example.alexander.libraryproject
. How can I get the name of the main app/package of where the main activity is defined? Is there a way to extract the string com.example.alexander.bootintervals
from a code called which resides in com.example.alexander.libraryproject
?