Skip to content

Commit

Permalink
Merge pull request #49 from jogrimst/master
Browse files Browse the repository at this point in the history
#48 Add VideoLearningEvent
  • Loading branch information
literacyapp authored May 27, 2017
2 parents 616b0e9 + 104b0a6 commit 417e91f
Show file tree
Hide file tree
Showing 15 changed files with 383 additions and 571 deletions.
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ android {
applicationId "org.literacyapp.analytics"
minSdkVersion 21
targetSdkVersion 23
versionCode 1000007
versionName "1.0.7"
versionCode 1000008
versionName "1.0.8"
}

buildTypes {
Expand Down Expand Up @@ -50,7 +50,7 @@ dependencies {

testCompile 'junit:junit:4.12'

compile 'org.literacyapp:literacyapp-model:1.1.44'
compile 'org.literacyapp:literacyapp-model:1.1.45'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'commons-io:commons-io:2.5'
compile 'org.greenrobot:greendao:3.2.0'
Expand Down
4 changes: 2 additions & 2 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@
</receiver>

<receiver
android:name=".receiver.UsageEventReceiver"
android:name=".receiver.VideoLearningEventReceiver"
android:enabled="true"
android:exported="true">

<intent-filter>
<action android:name="literacyapp.intent.action.USAGE_EVENT" />
<action android:name="literacyapp.intent.action.VIDEO_LEARNING_EVENT" />
</intent-filter>
</receiver>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,11 @@ public DevOpenHelper(Context context, String name, SQLiteDatabase.CursorFactory
public void onUpgrade(Database db, int oldVersion, int newVersion) {
Log.i(getClass().getName(), "Upgrading schema from version " + oldVersion + " to " + newVersion);

if (oldVersion < 1000003) {
if (oldVersion < 1000008) {
DbMigrationHelper.migrate(db,
UsageEventDao.class
);
}

if (oldVersion < 1000004) {
DbMigrationHelper.migrate(db,
UsageEventDao.class
LetterLearningEventDao.class,
NumberLearningEventDao.class,
VideoLearningEventDao.class
);
}
}
Expand Down
10 changes: 5 additions & 5 deletions app/src/main/java/org/literacyapp/analytics/dao/DaoMaster.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,25 @@

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.
/**
* Master of DAO (schema version 1000007): knows all DAOs.
* Master of DAO (schema version 1000008): knows all DAOs.
*/
public class DaoMaster extends AbstractDaoMaster {
public static final int SCHEMA_VERSION = 1000007;
public static final int SCHEMA_VERSION = 1000008;

/** Creates underlying database table using DAOs. */
public static void createAllTables(Database db, boolean ifNotExists) {
ApplicationOpenedEventDao.createTable(db, ifNotExists);
LetterLearningEventDao.createTable(db, ifNotExists);
NumberLearningEventDao.createTable(db, ifNotExists);
UsageEventDao.createTable(db, ifNotExists);
VideoLearningEventDao.createTable(db, ifNotExists);
}

/** Drops underlying database table using DAOs. */
public static void dropAllTables(Database db, boolean ifExists) {
ApplicationOpenedEventDao.dropTable(db, ifExists);
LetterLearningEventDao.dropTable(db, ifExists);
NumberLearningEventDao.dropTable(db, ifExists);
UsageEventDao.dropTable(db, ifExists);
VideoLearningEventDao.dropTable(db, ifExists);
}

/**
Expand All @@ -54,7 +54,7 @@ public DaoMaster(Database db) {
registerDaoClass(ApplicationOpenedEventDao.class);
registerDaoClass(LetterLearningEventDao.class);
registerDaoClass(NumberLearningEventDao.class);
registerDaoClass(UsageEventDao.class);
registerDaoClass(VideoLearningEventDao.class);
}

public DaoSession newSession() {
Expand Down
22 changes: 11 additions & 11 deletions app/src/main/java/org/literacyapp/analytics/dao/DaoSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
import org.literacyapp.analytics.model.ApplicationOpenedEvent;
import org.literacyapp.analytics.model.LetterLearningEvent;
import org.literacyapp.analytics.model.NumberLearningEvent;
import org.literacyapp.analytics.model.UsageEvent;
import org.literacyapp.analytics.model.VideoLearningEvent;

import org.literacyapp.analytics.dao.ApplicationOpenedEventDao;
import org.literacyapp.analytics.dao.LetterLearningEventDao;
import org.literacyapp.analytics.dao.NumberLearningEventDao;
import org.literacyapp.analytics.dao.UsageEventDao;
import org.literacyapp.analytics.dao.VideoLearningEventDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

Expand All @@ -30,12 +30,12 @@ public class DaoSession extends AbstractDaoSession {
private final DaoConfig applicationOpenedEventDaoConfig;
private final DaoConfig letterLearningEventDaoConfig;
private final DaoConfig numberLearningEventDaoConfig;
private final DaoConfig usageEventDaoConfig;
private final DaoConfig videoLearningEventDaoConfig;

private final ApplicationOpenedEventDao applicationOpenedEventDao;
private final LetterLearningEventDao letterLearningEventDao;
private final NumberLearningEventDao numberLearningEventDao;
private final UsageEventDao usageEventDao;
private final VideoLearningEventDao videoLearningEventDao;

public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
daoConfigMap) {
Expand All @@ -50,25 +50,25 @@ public DaoSession(Database db, IdentityScopeType type, Map<Class<? extends Abstr
numberLearningEventDaoConfig = daoConfigMap.get(NumberLearningEventDao.class).clone();
numberLearningEventDaoConfig.initIdentityScope(type);

usageEventDaoConfig = daoConfigMap.get(UsageEventDao.class).clone();
usageEventDaoConfig.initIdentityScope(type);
videoLearningEventDaoConfig = daoConfigMap.get(VideoLearningEventDao.class).clone();
videoLearningEventDaoConfig.initIdentityScope(type);

applicationOpenedEventDao = new ApplicationOpenedEventDao(applicationOpenedEventDaoConfig, this);
letterLearningEventDao = new LetterLearningEventDao(letterLearningEventDaoConfig, this);
numberLearningEventDao = new NumberLearningEventDao(numberLearningEventDaoConfig, this);
usageEventDao = new UsageEventDao(usageEventDaoConfig, this);
videoLearningEventDao = new VideoLearningEventDao(videoLearningEventDaoConfig, this);

registerDao(ApplicationOpenedEvent.class, applicationOpenedEventDao);
registerDao(LetterLearningEvent.class, letterLearningEventDao);
registerDao(NumberLearningEvent.class, numberLearningEventDao);
registerDao(UsageEvent.class, usageEventDao);
registerDao(VideoLearningEvent.class, videoLearningEventDao);
}

public void clear() {
applicationOpenedEventDaoConfig.clearIdentityScope();
letterLearningEventDaoConfig.clearIdentityScope();
numberLearningEventDaoConfig.clearIdentityScope();
usageEventDaoConfig.clearIdentityScope();
videoLearningEventDaoConfig.clearIdentityScope();
}

public ApplicationOpenedEventDao getApplicationOpenedEventDao() {
Expand All @@ -83,8 +83,8 @@ public NumberLearningEventDao getNumberLearningEventDao() {
return numberLearningEventDao;
}

public UsageEventDao getUsageEventDao() {
return usageEventDao;
public VideoLearningEventDao getVideoLearningEventDao() {
return videoLearningEventDao;
}

}
227 changes: 0 additions & 227 deletions app/src/main/java/org/literacyapp/analytics/dao/UsageEventDao.java

This file was deleted.

Loading

0 comments on commit 417e91f

Please sign in to comment.