Skip to content

Instantly share code, notes, and snippets.

@maydin
Created September 14, 2016 06:59
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 maydin/1bd961e2c257c7e6e1994f37b267e3b3 to your computer and use it in GitHub Desktop.
Save maydin/1bd961e2c257c7e6e1994f37b267e3b3 to your computer and use it in GitHub Desktop.
@Module
public class DiscoveryModule {
private final Context context;
public DiscoveryModule(Context context) {
this.context = context;
}
@Provides
@Singleton
public Context providesContext() {
return context;
}
@Provides @Singleton
public RxDiscoveryManager providesDiscoveryManager(Context context) {
return new RxDiscoveryManager((NsdManager) context.getSystemService(Context.NSD_SERVICE),"AR_RxDiscoveryManager");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment