use of roboguice.inject.RoboInjector in project roboguice by roboguice.
the class RoboMapActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
final RoboInjector injector = RoboGuice.getInjector(this);
eventManager = injector.getInstance(EventManager.class);
injector.injectMembersWithoutViews(this);
super.onCreate(savedInstanceState);
eventManager.fire(new OnCreateEvent<Activity>(this, savedInstanceState));
}
use of roboguice.inject.RoboInjector in project PocketHub by pockethub.
the class RoboAccountAuthenticatorAppCompatActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
final RoboInjector injector = RoboGuice.getInjector(this);
eventManager = injector.getInstance(EventManager.class);
injector.injectMembersWithoutViews(this);
super.onCreate(savedInstanceState);
eventManager.fire(new OnCreateEvent(savedInstanceState));
}
use of roboguice.inject.RoboInjector in project edx-app-android by edx.
the class RoboAppCompatActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
final RoboInjector injector = RoboGuice.getInjector(this);
eventManager = injector.getInstance(EventManager.class);
injector.injectMembersWithoutViews(this);
super.onCreate(savedInstanceState);
eventManager.fire(new OnCreateEvent<Activity>(this, savedInstanceState));
}
use of roboguice.inject.RoboInjector in project edx-app-android by edx.
the class CacheManager method convert.
/**
* Convert the response URL from the new formats used in the Retrofit implementation, to the
* previous formats used in the original Apache HTTP client implementation, which was what
* populated this cache.
*
* @param url The URL to convert.
* @return The converted URL.
*/
@NonNull
private String convert(@NonNull final String url) {
/* The course structure URL was stripped of it's non-definitive query parameters before
* being stored in the cache, to prevent it not becoming non-accessible after internal API
* changes on the query parameters. The course ID parameter was retained, but not URL-
* escaped.
*/
if (courseStructureGetUrlConversionPattern == null) {
final RoboInjector injector = RoboGuice.getInjector(context);
final Config config = injector.getInstance(Config.class);
String baseUrl = config.getApiHostURL();
if (!baseUrl.endsWith("/")) {
baseUrl += '/';
}
courseStructureGetUrlConversionPattern = Pattern.compile("^(" + baseUrl + "api/courses/v1/blocks/\\?)(?:[^=&;]+?=[^=&;]+?[&;])*?(course_id=)([^=&;]+)");
}
final Matcher urlMatcher = courseStructureGetUrlConversionPattern.matcher(url);
if (urlMatcher.matches()) {
final StringBuffer urlConversionBuffer = new StringBuffer(url.length());
urlMatcher.appendReplacement(urlConversionBuffer, "$1$2" + Uri.decode(urlMatcher.group(3)));
return urlConversionBuffer.toString();
}
return url;
}
use of roboguice.inject.RoboInjector in project hubroid by EddieRingle.
the class RoboSherlockFragmentActivity method onCreate.
@Override
protected void onCreate(Bundle savedInstanceState) {
final RoboInjector injector = RoboGuice.getInjector(this);
eventManager = injector.getInstance(EventManager.class);
injector.injectMembersWithoutViews(this);
super.onCreate(savedInstanceState);
eventManager.fire(new OnCreateEvent(savedInstanceState));
}
Aggregations