Skip to content

Instantly share code, notes, and snippets.

@lukaspili
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukaspili/51c0b0e9286879c02e4e to your computer and use it in GitHub Desktop.
Save lukaspili/51c0b0e9286879c02e4e to your computer and use it in GitHub Desktop.
public class SimpleActivity extends Activity {
@Inject
Api api;
@Inject
ApiManager apiManager;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
DemortarApp.getDemortarApp(this).getComponent().inject(this);
api.itWorks();
apiManager.useApi();
// true, same instances
boolean test = api == apiManager.getApi();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment