Questions tagged [roboguice]

Roboguice brings the power and testability of using the Google Guice dependency injection framework to Android application development.

RoboGuice is a framework that brings the simplicity and ease of Dependency Injection to Android, using Google's own Guice library.

Useful links

329 questions
2
votes
1 answer

Proguard RoboGuice Obfuscate Error on ViewListener

I have proguard and roboguice working together as long as I don't turn on the obfuscate option. Once I remove dontobfuscate from my progaurd-project.txt file, I receive the following…
YoungDinosaur
  • 1,550
  • 17
  • 22
2
votes
1 answer

How to bind ProgressDialog to RoboAsyncTask

I'm following the example from here on how to work with background tasks in RoboAsyncTask: https://code.google.com/p/roboguice/wiki/RoboAsyncTask However, in my code when I try to @Inject ProgressDialog dialog I get a runtime error: Process:…
Anthony
  • 33,838
  • 42
  • 169
  • 278
2
votes
0 answers

Error during injecting Context in AsyncTask using Guice Assisted Inject Factory

I'm creating Android project using RoboGuice 2.0 with help from Guice Extension - Assisted Inject. Right now I'm facing problem with injecting Context via factory on non UI thread. Sample Project with show my issue: Person interface: public…
pawelbial
  • 997
  • 1
  • 10
  • 15
2
votes
1 answer

Robolectric 2.0 & RoboGuice 2.0 Integration

I'm searching the Web and still, not found nothing on how to integrate Robolectric 2.0 with RoboGuice 2.0, I also use Mockito as Mocking Framework, and there's no problem with it. Just don't know how to integrate Robolectric with RoboGuice. Is there…
NemesisDoom
  • 596
  • 6
  • 21
2
votes
0 answers

Using Roboguice in Tests in Android Studio

So after spending a day or so trying to get robolectric to work with gradle using the android-gradle-plpugin I read that the creator thinks it's too much hassle and doesn't use it himself So thats a big enough reason for me not to use it either.…
jiduvah
  • 5,108
  • 6
  • 39
  • 55
2
votes
0 answers

Error in custom provider, java Util.EmptyStackException while locating Context

I'm developing an android project v15 with RoboGuice 2.0 and ormlite. I've implemented data access by using a Business Layer and a Dao Layer. Each Activity / Service call business layer that handle also transactions between Daos. In my first attempt…
gipinani
  • 14,038
  • 12
  • 56
  • 85
2
votes
1 answer

how to install retrofit extension in robospice

I have searched the wiki but could not find the procedure to use the various extensions for robospice. I have downloaded the various jars for robospice. It is not clear how the extensions (esp. retrofit) must be imported into eclipse. Any…
K K
  • 101
  • 1
  • 8
2
votes
0 answers

Injecting parcelables with Roboguice and Robotium

I'm having problems while doing tests with Robotium, passing parcelables and injecting them with Roboguice. As I've read on other places, I'd have to do this to pass intent extras @Override protected void setUp() throws Exception { …
Javier Manzano
  • 4,761
  • 16
  • 56
  • 86
2
votes
1 answer

RoboGuice custom module application context

How do I get the application context in my custom module? Here is the code for my module: public class MyModule extends AbstractModule { @Override @SuppressWarnings("unchecked") protected void configure() { // Package Info …
Mandar Limaye
  • 1,900
  • 16
  • 24
2
votes
2 answers

@ContentView in Sliding Menu activity

I'm trying to inject the contentview after extending SlidingFragmentActivity from sliding menu library. But I'm getting error like java.lang.IllegalStateException: Both setBehindContentView must be called in onCreate in addition to…
Nemo
  • 1,059
  • 3
  • 14
  • 31
2
votes
0 answers

Roboguice 2.0 testing tutorial

I'm using RoboGuice 2.0 but I have a hard time testing the code. The only documentation I found, used RoboUnitTestCase which does not seem to exist in RoboGuice 2.0 anymore. I searched a lot for a tutorial on this topic but didn't find anything.…
Marc_Bob
  • 119
  • 7
2
votes
0 answers

First activity being re-created after returning to the app

Background I have a very weird situation that i've never seen on any app i've created . The app has multiple activities , while the first one is used for some initializations and for the splash screen . The problem Suppose the app has the…
android developer
  • 114,585
  • 152
  • 739
  • 1,270
2
votes
2 answers

Where should i put classes only used for development?

I started using dependency injection with roboguice and created an interface like DataProvider. I have an implementation which retrieves the data from some WebServer located in the WebServerDataProvider class. In Order to eliminate the waiting for…
Absurd-Mind
  • 7,884
  • 5
  • 35
  • 47
2
votes
1 answer

RoboGuice and static variable Injections

I'm using RoboGuice for the first time in a project and am trying to inject a static variable but the variable is remaining null. Here is a quick mockup of something I'm testing: public class MyActivity extends RoboFragmentActivity { @Override…
jjNford
  • 5,170
  • 7
  • 40
  • 64
2
votes
1 answer

Is it possible to inject dimensions with Roboguice?

Is something like this possible with Roboguice on Android? 10dip and then @InjectResource(R.dimen.radius) private int radius; // in px Thanks!
Thomas Keller
  • 5,933
  • 6
  • 48
  • 80