I am currently using an application project in android which includes a library.
This library was an application by itself, because I want to make it integrated into the main application I added it as an external library.
Everything works fine and I use this code to start up the library application.
Intent i = new Intent(this, Launcher.class);
startActivity(i);
The problem is that I need to control this application which was added as a library. I need to disable and enable features which can only be done if I have a reference to the activity which I started.
One more thing, I want to create a menu in the primary application to control the library one. So I do not want to pass information as soon as I create it, rather do changes as the user clicks on different options.
Basically I have application A and application B which is integrated on A as a library. I want to control application B from the menu of application A after I start it normally. From let us say a menu in A with different options about B. That is why I want a reference.
My first question would be, is it possible to get a reference for the activity that I did start with the intent ?
If it is not possible, with your experience what would be the best way to achieve that, keep in mind that I cannot start implementing methods on the onCreate. The application has a clear flow, class to class and it is pretty large.