Usually if I want to switch screens, I do something like this:
Intent myIntent = new Intent(CurrActivity.this, NextActivity.class);
CurrActivity.this.startActivity(myIntent);
but I am in a situation where I would like to do this from a regular class. Actually it is an abstract class. It is named PurchaseObserver and its part of the Android billing setup.
Is it possible to do a change of screens from this class? Something similar to the intent code I posted above?
Thanks!
When you instantiate the class, pass a
Contextin the constructor and use that to start an Activity usingstartActivity(Intent)