I need to call for a startActivity() from one of my static method, is that possible somehow?
You'll need a context to be able to do that. Can you pass in a context into your static method as an argument?
public static void doSomething(Context ctx) {
// do some stuff here
ctx.startActivity(new Intent(ctx, OtherActivity.class));
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With