Questions tagged [activeandroid]

ActiveAndroid is an active record style ORM (object relational mapper) for Android.

ActiveAndroid allows you to save and retrieve SQLite database records without writing SQL statements. Each database record is wrapped into an object with methods like save() and delete().

The library is open sourced under the Apache 2.0 License.

Tutorials:

slidenerd Series

231 questions
4
votes
1 answer

Active android Select query

new Select("id") .From(customer) .where("lastName=?","John") .execute(); Error E/CursorWindow: Failed to read row 0, column -1 from a CursorWindow which has 1 rows, 1 columns. Main query (select id from customer where lastName="John";)
4
votes
1 answer

ActiveAndroid TypeSerializer - list of enums

In my app I'm using ActiveAndoid. In some models I have a column List and in other List. I created a TypeSerializer for each type: public class StringsListTypeSerializer extends TypeSerializer { private static GsonBuilder…
NickF
  • 5,637
  • 12
  • 44
  • 75
4
votes
3 answers

Android RecyclerView + ActiveAndroid

What is the preffered way of populating a RecyclerView and keeping track of data changes using ActiveAndroid ORM? I've asked a question on this topic recently. But it got too verbose, and people are so lazy, that someone would scarcely read it till…
naXa stands with Ukraine
  • 35,493
  • 19
  • 190
  • 259
4
votes
1 answer

How to get only one column as the result of a query with ActiveAndroid?

How can I get an array with only the column "Name" of my Category model? I can get all my categories using List categoryList = new Select() .from(Category.class) .execute(); and then create another array with the name of the…
jul
  • 36,404
  • 64
  • 191
  • 318
4
votes
3 answers

How to add column to an active android database table?

I am using Active Android in order to perform sqllite operations in my android app. Following is a model class. @Table(name="books") public class Books extends Model { @Column(name = "bookId") public String bookId; @Column(name = "bookName") public…
Hannan Shaik
  • 1,298
  • 2
  • 14
  • 27
4
votes
8 answers

How to add ActiveAndroid ORM to Gradle?

I'm building an Android app in which I want to use the ActiveAndroid ORM. In the readme I read instructions on how to include it in Maven or ADT, but I'm using/trying to learn Android Studio with Gradle. So I guess I need to insert ActiveAndroid as…
kramer65
  • 50,427
  • 120
  • 308
  • 488
3
votes
1 answer

Why the Active Android Library reports this error = Before Android 4.1, ... would have incorrectly overridden the package-private method in Drawable

I use the Active Android Library, and every time I launch it, it will be displayed to me in the Logcat (Android Studio) , Error Type = Warning Picture of the complete program error I also want to know if this problem does not cause me a problem…
Majid Ahmadi Jebeli
  • 517
  • 1
  • 6
  • 22
3
votes
0 answers

ActiveAndroid duplicate column name

In my app I'm using `ActiveAndroid'. During the app version I'm using migration files and increasing the db version as in documentation. Assume: 1. There is a device with app version 1 (user doesn't update). 2. In app version 2 I add a new table…
NickF
  • 5,637
  • 12
  • 44
  • 75
3
votes
1 answer

Getting foreign key member "null" in ActiveAndroid

I'm implementing ActiveAndroid in my Android app, for that I'm referring this link. My problem definition is, I'm getting data list from server with help of retrofit library. After getting data list I'm inserting data into my "ActiveAndroid" DB.…
3
votes
1 answer

Using ActiveAndroid and MultiDexApplication

I'm having trouble initializing ActiveAndroid in my project. It is state that the application tag in the manifest needs to be like so: Unfortunately, I have it already as…
f3d0r
  • 541
  • 3
  • 12
  • 27
3
votes
0 answers

SQLiteCantOpenDatabaseException after upgrading to Android 6 (Marshmallow)

I have an application in the PlayStore, and some users reported that it no longer worked after they updated their phones to android 6. The stack trace associated to the reports is the following java.lang.RuntimeException: Unable to create…
3
votes
1 answer

How can i achieve Insert or Replace column values with Active Android?

I have model of ActiveAndroid like, public class Workbook extends Model { @Expose @Column(name = "WorkbookID",unique = true, onUniqueConflict = Column.ConflictAction.REPLACE) private Integer ID; @Expose @Column(name = "UserID") private Integer…
Nidhi
  • 148
  • 1
  • 1
  • 7
3
votes
2 answers

How to save List via ActiveAndroid?

I have a List of Strings in my Object : public ArrayList trailersURLs = new ArrayList<>(); If need to save String I use @Column(name = "trailer") public String trailerUrl; But how i can save(actually annotate) List via…
Sergey Shustikov
  • 15,377
  • 12
  • 67
  • 119
3
votes
2 answers

Difference between execute() and executeSIngle() methods in ActiveAndroid library?

I am new to ActiveAndroid and I am stuck with Querying the database. Please help me out with the difference between execute() and executeSingle() methods in ActiveAndroid Library? Both these methods are used to query the database but I am not…
Aayush
  • 147
  • 1
  • 12
3
votes
1 answer

Two column unique constraint ActiveAndroid

How can I add two column unique constraint in ActiveAndroid? I tried to add 2.sql and increase DB version, but it doesnt seem to be updated correctly (probably because I reinstall the app?). Anyway, is there are way to add some annotation on which I…
Thomas Vervik
  • 4,325
  • 9
  • 36
  • 64
1 2
3
15 16