| | |
| | | apply plugin: 'com.android.application' |
| | | apply plugin: 'org.greenrobot.greendao' |
| | | greendao { |
| | | schemaVersion 9//数据库版本号 |
| | | schemaVersion 11//数据库版本号 |
| | | daoPackage 'com.lotaai.canguiayw.sqllitedb'// 设置DaoMaster、DaoSession、Dao 包名 |
| | | targetGenDir 'src/main/java'//设置DaoMaster、DaoSession、Dao目录,请注意,这里路径用/不要用. |
| | | generateTests false //设置为true以自动生成单元测试。 |
| | |
| | | @Override |
| | | public int onStartCommand(Intent intent, int flags, int startId) { |
| | | init(); |
| | | if (!EventBus.getDefault().isRegistered(MyMQTTService.this)) { |
| | | EventBus.getDefault().register(MyMQTTService.this); |
| | | } |
| | | return super.onStartCommand(intent, flags, startId); |
| | | } |
| | | |
| | |
| | | |
| | | // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. |
| | | /** |
| | | * Master of DAO (schema version 9): knows all DAOs. |
| | | * Master of DAO (schema version 11): knows all DAOs. |
| | | */ |
| | | public class DaoMaster extends AbstractDaoMaster { |
| | | public static final int SCHEMA_VERSION = 9; |
| | | public static final int SCHEMA_VERSION = 11; |
| | | |
| | | /** Creates underlying database table using DAOs. */ |
| | | public static void createAllTables(Database db, boolean ifNotExists) { |