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
0
votes
0 answers

Performing stop of activity that is not resumed: {com.example.stopcall.app/com.example.stopcall.app.activities.MainActivity

I try to intercept outgoing calls and open a pop up (Receiver --> FragmentActivity --> PopUpFragment) Im using roboguice for android however my code crashes with this error: 01-01 10:32:41.396 13265-13265/com.example.stopcall.app E/﹕ mali:…
Elad Benda2
  • 13,852
  • 29
  • 82
  • 157
0
votes
0 answers

why roboguice doesn't init my field?

I saw this tutorial and i'm not sure why roboguice doesn't init my PhoneDal? public class OutgoingCallReceiver extends BroadcastReceiver { @Inject private CommentDal commentDal; @Inject private PhoneDal phoneDal; @Override public…
Elad Benda2
  • 13,852
  • 29
  • 82
  • 157
0
votes
1 answer

How to dismiss Android's progress bar when failed to load a ListView's contents?

I have a class extending RoboListFragment that uses a manager class to fetch some class' information (a Guest in my model). The problem I'm facing is when this manager fails to retrieve the data, I would like to dismiss the progress bar that is…
0
votes
1 answer

Xml based bean creation possible wiht RoboGuice?

I want to define beans into xml file and want to inject it using RoboGuice in android app, is it possible with RoboGuice?
0
votes
1 answer

Guice in Android without Use Roboguice, good choice?

I have been using Roboguice for a while but as I see the source code in github, it has a lot of unnecessary stuff that I am not typically use it or need it, so I decided to start working only with Guice. The only drawback with this is that I need to…
Nicolas Jafelle
  • 2,661
  • 2
  • 24
  • 30
0
votes
1 answer

Roboguice example astroboy can't work with NullPointerException

I'm newbie of the RoboGuice, After cloning the git repository, I did the following: mvn install which show success. Then I cd to the astroboy and executing: mvn package mvn android:deploy which show me that the android-support related class could…
James Liu
  • 269
  • 1
  • 11
0
votes
1 answer

Proguard - removing logs roboguice.util.Ln

In my app we are using logs from roboguice.util.Ln. I read how to remove logging by using proguard, but it seems to not working on roboguice logging. The last thing i tried was to add in my proguard configuration file something like…
Seblis
  • 339
  • 4
  • 17
0
votes
0 answers

RoboContext in LoaderTestCase

I have issue with Roboguice 2.0 and testing. All injections in my app works fine, but in my LoaderTestCases I got an error java.lang.IllegalArgumentException: android.app.ContextImpl@42678aa0 does not appear to be a RoboGuice context (instanceof…
Taras Sheremeta
  • 117
  • 1
  • 1
  • 8
0
votes
1 answer

java.lang.UnsupportedOperationException trying inject fragment

When trying to inject a fragment into a field, I get the following exception: Reason: java.lang.UnsupportedOperationException: You may only use @InjectFragment on fields descended from type Fragment I also tried deriving my fragment from…
xvdiff
  • 2,179
  • 2
  • 24
  • 47
0
votes
1 answer

How to inject resource and use it in the constructor

I would like to inject resource and use it in the constructor of singleton class with roboguice injection. Below is an example that shows what I need but injected field is null in the constructor. I was reading something about providers and…
Tr0k
  • 91
  • 1
  • 8
0
votes
1 answer

RoboGuice injected view is null

I'm trying to figure out what could be wrong with my view injection. It works for fragments in my application, but I can't seem to get it working for activity. Here is my code: @ContentView(R.layout.schedule) public class ScheduleActivity extends…
somerandomusername
  • 1,993
  • 4
  • 23
  • 55
0
votes
1 answer

RoboGuice: inject class by hand in normal class

I have some interfaces and some concreted classes implement those interfaces. I have config in AbstractModule class. But my problem is: @Inject just works inside a RoboGuice class such as RoboFragment, RoboActivity ... For example: public class…
hqt
  • 29,632
  • 51
  • 171
  • 250
0
votes
1 answer

Problems with injecting an object using Roboguice in an Android Application

I am having problems in Injecting a module into my class using roboguice. I added roboguice_modules.xml to src/main/res/values
anonymous123
  • 1,271
  • 6
  • 19
  • 43
0
votes
0 answers

Roboguice without android compat lib?

New Java and android developer here, so please be patient... I've cloned roboguice from github and I was wondering if anyone can give me some pointers on how to recompile it so that it works with android 4.4. It's my understanding that Roboguice is…
Luis Abreu
  • 4,008
  • 9
  • 34
  • 63
0
votes
1 answer

How to inject into a BitmapDescriptor

I am using Roboguice. How do I inject into a BitmapDescriptor? usually without Roboguice I do: BitmapDescriptor file; BitmapDescriptor resource; file = BitmapDescriptorFactory.fromFile(new File...) resource =…
Lena Bru
  • 13,521
  • 11
  • 61
  • 126