2017-09-08 00:31:38 +00:00
|
|
|
package cy.agorise.crystalwallet.application;
|
|
|
|
|
|
|
|
import android.app.Application;
|
2017-10-05 00:29:44 +00:00
|
|
|
import android.content.Intent;
|
2017-09-08 00:31:38 +00:00
|
|
|
|
2017-09-17 00:41:10 +00:00
|
|
|
import com.idescout.sql.SqlScoutServer;
|
|
|
|
|
2017-09-10 23:13:32 +00:00
|
|
|
import cy.agorise.crystalwallet.dao.CrystalDatabase;
|
2017-10-05 00:29:44 +00:00
|
|
|
import cy.agorise.crystalwallet.service.CrystalWalletService;
|
2017-09-08 00:31:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Created by Henry Varona on 6/9/2017.
|
|
|
|
*/
|
|
|
|
|
|
|
|
public class CrystalApplication extends Application {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void onCreate() {
|
|
|
|
super.onCreate();
|
|
|
|
|
|
|
|
//initialize the database
|
2017-09-10 23:13:32 +00:00
|
|
|
CrystalDatabase db = CrystalDatabase.getAppDatabase(this.getApplicationContext());
|
2017-09-17 00:41:10 +00:00
|
|
|
SqlScoutServer.create(this, getPackageName());
|
2017-10-05 00:29:44 +00:00
|
|
|
|
|
|
|
Intent intent = new Intent(getApplicationContext(), CrystalWalletService.class);
|
|
|
|
startService(intent);
|
2017-09-08 00:31:38 +00:00
|
|
|
}
|
|
|
|
}
|