Java Code Examples for com.eveningoutpost.dexdrip.UtilityModels.BgSendQueue#emptyQueue()
The following examples show how to use
com.eveningoutpost.dexdrip.UtilityModels.BgSendQueue#emptyQueue() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BgReading.java From xDrip with GNU General Public License v3.0 | 6 votes |
public synchronized static void updateDB() { final String[] updates = new String[]{"ALTER TABLE BgReadings ADD COLUMN dg_mgdl REAL;", "ALTER TABLE BgReadings ADD COLUMN dg_slope REAL;", "ALTER TABLE BgReadings ADD COLUMN dg_delta_name TEXT;", "ALTER TABLE BgReadings ADD COLUMN source_info TEXT;"}; for (String patch : updates) { try { SQLiteUtils.execSql(patch); } catch (Exception e) { } } // needs different handling on wear if (JoH.areWeRunningOnAndroidWear()) { BgSendQueue.emptyQueue(); SqliteRejigger.rejigSchema("BgReadings", "uuid TEXT UNIQUE ON CONFLICT FAIL", "uuid TEXT UNIQUE ON CONFLICT REPLACE"); SqliteRejigger.rejigSchema("BgReadings", "uuid TEXT UNIQUE ON CONFLICT IGNORE", "uuid TEXT UNIQUE ON CONFLICT REPLACE"); SqliteRejigger.rejigSchema("BgSendQueue", "BgReadings_temp", "BgReadings"); } }
Example 2
Source File: BgReading.java From xDrip with GNU General Public License v3.0 | 6 votes |
public synchronized static void updateDB() { final String[] updates = new String[]{"ALTER TABLE BgReadings ADD COLUMN dg_mgdl REAL;", "ALTER TABLE BgReadings ADD COLUMN dg_slope REAL;", "ALTER TABLE BgReadings ADD COLUMN dg_delta_name TEXT;", "ALTER TABLE BgReadings ADD COLUMN source_info TEXT;"}; for (String patch : updates) { try { SQLiteUtils.execSql(patch); } catch (Exception e) { } } // needs different handling on wear if (JoH.areWeRunningOnAndroidWear()) { BgSendQueue.emptyQueue(); SqliteRejigger.rejigSchema("BgReadings", "uuid TEXT UNIQUE ON CONFLICT FAIL", "uuid TEXT UNIQUE ON CONFLICT REPLACE"); SqliteRejigger.rejigSchema("BgReadings", "uuid TEXT UNIQUE ON CONFLICT IGNORE", "uuid TEXT UNIQUE ON CONFLICT REPLACE"); SqliteRejigger.rejigSchema("BgSendQueue", "BgReadings_temp", "BgReadings"); } }
Example 3
Source File: BgReading.java From xDrip-plus with GNU General Public License v3.0 | 6 votes |
public synchronized static void updateDB() { final String[] updates = new String[]{"ALTER TABLE BgReadings ADD COLUMN dg_mgdl REAL;", "ALTER TABLE BgReadings ADD COLUMN dg_slope REAL;", "ALTER TABLE BgReadings ADD COLUMN dg_delta_name TEXT;", "ALTER TABLE BgReadings ADD COLUMN source_info TEXT;"}; for (String patch : updates) { try { SQLiteUtils.execSql(patch); } catch (Exception e) { } } // needs different handling on wear if (JoH.areWeRunningOnAndroidWear()) { BgSendQueue.emptyQueue(); SqliteRejigger.rejigSchema("BgReadings", "uuid TEXT UNIQUE ON CONFLICT FAIL", "uuid TEXT UNIQUE ON CONFLICT REPLACE"); SqliteRejigger.rejigSchema("BgReadings", "uuid TEXT UNIQUE ON CONFLICT IGNORE", "uuid TEXT UNIQUE ON CONFLICT REPLACE"); SqliteRejigger.rejigSchema("BgSendQueue", "BgReadings_temp", "BgReadings"); } }
Example 4
Source File: BgReading.java From xDrip-plus with GNU General Public License v3.0 | 6 votes |
public synchronized static void updateDB() { final String[] updates = new String[]{"ALTER TABLE BgReadings ADD COLUMN dg_mgdl REAL;", "ALTER TABLE BgReadings ADD COLUMN dg_slope REAL;", "ALTER TABLE BgReadings ADD COLUMN dg_delta_name TEXT;", "ALTER TABLE BgReadings ADD COLUMN source_info TEXT;"}; for (String patch : updates) { try { SQLiteUtils.execSql(patch); } catch (Exception e) { } } // needs different handling on wear if (JoH.areWeRunningOnAndroidWear()) { BgSendQueue.emptyQueue(); SqliteRejigger.rejigSchema("BgReadings", "uuid TEXT UNIQUE ON CONFLICT FAIL", "uuid TEXT UNIQUE ON CONFLICT REPLACE"); SqliteRejigger.rejigSchema("BgReadings", "uuid TEXT UNIQUE ON CONFLICT IGNORE", "uuid TEXT UNIQUE ON CONFLICT REPLACE"); SqliteRejigger.rejigSchema("BgSendQueue", "BgReadings_temp", "BgReadings"); } }