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
2
votes
1 answer

Retrofit 2.0.0-beta4: Unable to create converter for class

Here are my files: build.gradle: dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.google.code.gson:gson:2.6.1' compile 'com.android.support:appcompat-v7:23.2.1' compile…
2
votes
0 answers

Table Migration crashes with store update but works locally

I'm using Activeandroid 3.1.0 to store some of my data in databases. Some days ago I needed to update a table to add another column. Workflow: Increment the DB Version from 1 to 2:
Matthias
  • 158
  • 1
  • 11
2
votes
1 answer

ActiveAndroid adding column with check if exists or not

Hi I am developing Android application in which I am using active android. I tried to add one column to my table by using migration. I tried with following code: ALTER TABLE TAGS ADD COLUMN TAG_DATE INTEGER; Its working fine on current version. But…
nilkash
  • 7,408
  • 32
  • 99
  • 176
2
votes
1 answer

Robolectric with ActiveAndroid setup nullpointerexception on ActiveAndroid$ReflectionUtils

I am trying to implement robolectric testing in an existing app. I can run simple static tests but when I add testing with ActiveAndroid I get NullPointerExceptions, I think ActiveAndroid can not be found when the unit test is being run. Im not sure…
frey
  • 431
  • 1
  • 5
  • 21
2
votes
2 answers

ActiveAndroid using exist database

I am using ActiveAndroid as a third party library in order to working with sqlite database in android, i don't have any problem with creating and using new databases with this library, but i don't know how can i use my own exist database with this…
Ali Hasanzade
  • 299
  • 1
  • 3
  • 15
2
votes
1 answer

How to drop and recreate all tables on DB version update in ActiveAndroid?

I'm using ActiveAndroid in my application as the Database system. At current stage I don't want to write the migration files for migrating current tables to altered ones for when I update DB version. Instead what I want to do is to drop all tables…
Emil Adz
  • 40,709
  • 36
  • 140
  • 187
2
votes
0 answers

Synchronize local database with remote database using ActiveAndroid

I'm trying to synchronize my local database with remote data using ActiveAndroid. I have local data stored in entity User that will be replaced with new data retrieved from JSON. This is my User class This is the complete entity @Table(name =…
ikhsanudinhakim
  • 1,554
  • 16
  • 23
2
votes
3 answers

How to know the moment when Data in database changed (ActiveAndroid ORM)?

I have a HTTP Server and Android app. All data -> JSON format. For mapping used Gson. ORM - ActiveAndroid. The problem : I need something like an observer/notifier object, which can told me, that a row in database updated just now. Something like…
Sergey Shustikov
  • 15,377
  • 12
  • 67
  • 119
2
votes
1 answer

Cursor issue with ActiveAndroid

I'm using ActiveAndroid and everything was working fine until I addded another ForeignKey to one model. I have a model called Song which is like: @Column(name = "author_id") private String mAuthorId; @Column(name = "created") private long…
FVod
  • 2,245
  • 5
  • 25
  • 52
2
votes
0 answers

ActiveAndroid get data from two tables with CursorLoader (custom ContentProvider?)

In active android there is option to get data from database using CursorLoader, but in example there is only option with 1 table: MyActivity.this.getSupportLoaderManager().initLoader(0, null, new LoaderCallbacks() { @Override public…
2
votes
2 answers

Cannot save null column value in ActiveAndroid

To make it simple, I have this model: @Table(name = "Items") class TItem extends Model { @Column(name = "title") private String mTitle; public String getTitle() { return mTitle; } public void setTitle(String title) { mTitle =…
Corbella
  • 1,791
  • 14
  • 24
2
votes
1 answer

Unit Testing ActiveAndroid Models Using Robolectric

I am using ActiveAndroid for some of my models, and I wanted to start unit testing my work. Unfortunately, I am getting a load of errors, namely in being unable to initialize ActiveAndroid using the proper context. ActiveAndroid is iniatilized:…
2
votes
1 answer

Are ActiveAndroid .save() operations executed on the main thread or asynchronously?

Im using the ActiveAndroid library and I have read the entire information (very minimalist and insufficient unfortunately) There is no mention whether the .save() operation is executed syncrhonously. If it is asynchronous, how do I "listen" for it…
Kaloyan Roussev
  • 14,515
  • 21
  • 98
  • 180
2
votes
1 answer

how to save all nested classes using ActiveAndroid?

I am use AciveAndroid library in my project. And i have a quation: I have some classes @Table(name = "Users") public class User extends Model { @Expose @Column(name = "uuid") @SerializedName("uuid") private String uuid; …
Pavel Petrashov
  • 257
  • 1
  • 4
  • 13
2
votes
1 answer

How to populate ExpandableListView with data from ArrayList?

I managed to retrive data from the database and store it in ArrayList: ArrayList selectCategory = select.all().from(Category.class).execute(); for (Category category: selectCategory) { …
mirta
  • 644
  • 10
  • 25