Skip to content

Instantly share code, notes, and snippets.

@matzuk
Created February 5, 2019 14:34
Show Gist options
  • Save matzuk/63bdc1fc2d28dc8348f57c401dbab4be to your computer and use it in GitHub Desktop.
Save matzuk/63bdc1fc2d28dc8348f57c401dbab4be to your computer and use it in GitHub Desktop.
public interface ScannerStarter {
void start(Context context);
}
@PerFeature
public class ScannerStarterImpl implements ScannerStarter {
@Inject
public ScannerStarterImpl() {
}
@Override
public void start(Context context) {
Class<?> cls = ScannerActivity.class;
Intent intent = new Intent(context, cls);
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(intent);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment