in my app i'm using a download DB sql lite and i have set this code to return a message for terminated download
protected String doInBackground(String... params) {
if(first) {
File dbPath = getDatabasePath(DatabaseHelper.DB_NAME);
if (dbPath.exists()) {
DBProvider provider = new DBProvider(MainActivity.this);
database_comune_dao commune_dao = new database_comune_dao(provider.getDb());
FirstProjectApplication.allComunes.clear();
FirstProjectApplication.allComunes = commune_dao.getAllComune();
}
return "SUCCESS";
}
i would like to change the return message with the new Snackbar of Material Design and this is the code
Snackbar.with(getApplicationContext()) // context
.text("SUCCESS") // text to display
.show(this);
i have try to change return whit this code but i have error. Any idea how to set this snackbar for this?
Thanks