O'Reilly logo

Reactive Android Programming by Tadas Subonis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

StorIO adjustments

Since the messages are being persisted to the local database, the StockUpdatePutResolver file and StockUpdateGetResolver need to be updated as well.

We will start by adding a new field definition to the StockUpdateTable:

static class Columns {    ...    static final String TWITTER_STATUS = "twitter_status";}

Then we'll update the createTableQuery() method:

static String createTableQuery() {    return "CREATE TABLE " + TABLE + "("            + Columns.ID + " INTEGER PRIMARY KEY AUTOINCREMENT, "            + Columns.STOCK_SYMBOL + " TEXT NOT NULL, "            + Columns.DATE + " LONG NOT NULL, "            + Columns.PRICE + " LONG NOT NULL, "            + Columns.TWITTER_STATUS + " TEXT NULL, "            + ");";}
Since we have updated the SQLite table definition, we will need to wipe the data ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required