Questions tagged [android-annotations]

AndroidAnnotations is a compile time framework that helps writing simple and clean Android code that is easy to maintain.

AndroidAnnotations is a compile time framework that helps writing simple and clean Android code.

  • This tag should contain questions related to the AndroidAnnotations framework
  • This tag should not contain general java annotation related questions, or annotation processing questions
  • This tag should not contain questions related to the Android Support Annotations library

Please start by reading the wiki and the mailing list

496 questions
3
votes
2 answers

Rest API - how add custom headers?

I want to make POST request with custom header. I can't find information how to do this using AA Rest API - https://github.com/excilys/androidannotations/wiki/Rest%20API . Should I use ClientHttpRequestInterceptor, which is used for authenticated…
Piotr
  • 1,743
  • 1
  • 26
  • 40
3
votes
2 answers

Not getting annotation processed (generated) sources compiled into apk, using maven

I try to use Maven and androidannotations to build my apk, but independently of any IDE (I'm actually using IntelliJ IDEA and not Eclipse, but I would like to have it entirely IDE-independent, so that it would also work perfectly on any build…
3
votes
1 answer

AndroidAnnotations and Unit Testing

I am using AndroidAnnotations(2.5) in a sample project I am currently working on. Since you can annotate your classes with for example @EActivity,@ViewById,@Click which will all lead to generated compile-time code, I was wondering how one would go…
2
votes
3 answers

Android using AndroidAnnotations in Library Project Eclipse

I'm making a paid/free version of my app so have a 'Library Project' that the two apps use. I'm trying to use Android Annotations to clean up my code: http://code.google.com/p/androidannotations/ Unfortunately when I use this in my shared library…
2
votes
1 answer

getOr, put() and edit() can not resolve in org.androidannotations:androidannotations

In one of my existing projects I already added the following libraries for use annotation shared preference def AAVersion = "4.6.0" dependencies { annotationProcessor "org.androidannotations:androidannotations:$AAVersion" implementation…
Komal
  • 79
  • 1
  • 10
2
votes
0 answers

How to implement firebase analytics in android application efficiently?

Good day, I have been working on an android project for last 3 months. As time passes project grows big, but now I need to implement Firebase Analytics into the project, to track every app screen and event as well. But I found out that, using the…
A S M Sayem
  • 2,010
  • 2
  • 21
  • 28
2
votes
1 answer

Android local notification sometime won't show

I want to make local notifications that appears only 1st, 2nd and 3rd day of the month at for example 11am. I set up my notifications for 3 days in row at 12:30, 14:30 and 18:30 but it shown only once, at 14:30. When I checked android monitor for…
Gorthez
  • 391
  • 3
  • 12
2
votes
2 answers

Mocking chained method calls in AndroidAnnotations SharedPreferences

In a project I am using AndroidAnnotations to generate SharedPreferences: import org.androidannotations.annotations.sharedpreferences.DefaultBoolean; import org.androidannotations.annotations.sharedpreferences.SharedPref; @SharedPref(value =…
JJD
  • 50,076
  • 60
  • 203
  • 339
2
votes
2 answers

Difference between the two Android Annotations

I am failing to understand the difference between the usage of these two different imports for UiThread annotations: org.androidannotations.annotations.UiThread android.support.annotation.UiThread Any help will be appreciated.
Aditya Vardhan
  • 531
  • 1
  • 4
  • 7
2
votes
1 answer

AndroidAnnotations library fails to use classes generated by requery

I want to extract some part of my app to a library but AndroidAnnotations won't let me ;-) If I have: App - uses AndroidAnnotations - uses requery Everything works OK.. but when I do something like this: MyLibrary - uses requery App …
Mateusz Jablonski
  • 1,039
  • 9
  • 11
2
votes
1 answer

Is there @minApi annotation, analogous to @TargetApi annotation in Android?

int API_VERSION = 21; @TargetApi(API_VERSION) is used in Android to specify that the method/class is supported for API_VERSION and below. Can we mirror something similar which specifies that a method or class is supported for API_VERSION and above…
ARK
  • 3,734
  • 3
  • 26
  • 29
2
votes
1 answer

How to access android annotation sharedPreference?

I am using Android annotation to create SharedPreferences in Android project. AppPreferences public interface CommonPref { @DefaultString("") String deviceId(); @DefaultString("NA") String clientId(); @DefaultString("NA") String…
2
votes
2 answers

Android upload file exception Invalid token character ' ' in token "json charset=UTF-8"

I am trying to send a POST request on web server with Android Annotations REST Api, and I am trying to send an image as a Base64 String and video as a file. The operation also needs a Bearer Auth but I have managed that without an error. My…
kaplanfat
  • 81
  • 8
2
votes
1 answer

Compile Library project with AndroidAnnotations and Fragments

I am currently working on an Android library which is developed with AndroidAnnotations, and uses some Fragments. When it is compiled as an Android application, the code is fine and everything works. When it is compiled as an Android library, it…
2
votes
0 answers

Using ByteBuddy with AndroidAnnotations

I'm trying to use ByteBuddy in my AndroidAnnotations-based project. I have a class MyService that is an EBean (AA) with some injected dependencies: @EBean public class MyService { @Bean SomeRepository repo; @Log public void…
Héctor
  • 24,444
  • 35
  • 132
  • 243