// Path: app/src/main/java/org/indywidualni/centrumfm/MyApplication.java
// public class MyApplication extends Application {
// 
//     private static Context mContext;
//     private Tracker mTracker;
// 
//     public static Context getContextOfApplication() {
//         return mContext;
//     }
// 
//     @Override
//     public void onCreate() {
//         mContext = getApplicationContext();
//         super.onCreate();
//     }
// 
//     /**
//      * Gets the default {@link Tracker} for this {@link Application}.
//      *
//      * @return tracker
//      */
//     synchronized public Tracker getDefaultTracker() {
//         if (mTracker == null) {
//             // To enable debug logging use: adb shell setprop log.tag.GAv4 DEBUG
//             GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
//             analytics.setDryRun(BuildConfig.DEBUG);
// 
//             mTracker = analytics.newTracker(R.xml.global_tracker);
//             mTracker.enableAutoActivityTracking(true);
//             mTracker.enableExceptionReporting(true);
//         }
//         return mTracker;
//     }
// 
// }


import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;
import org.indywidualni.centrumfm.MyApplication;
package org.indywidualni.centrumfm.util.database;



public class MySQLiteHelper extends SQLiteOpenHelper {
  
    private static final String DATABASE_NAME = "centrum.db";
    private static final int DATABASE_VERSION = 2;
    
    public static final String TABLE_NEWS = "News";
    public static final String COLUMN_NEWS_GUID = "guid";
    public static final String COLUMN_NEWS_LINK = "link";
    public static final String COLUMN_NEWS_TITLE = "title";
    public static final String COLUMN_NEWS_DATE = "pubDate";
    public static final String COLUMN_NEWS_DESCRIPTION = "description";
    public static final String COLUMN_NEWS_CATEGORY = "category";
    public static final String COLUMN_NEWS_ENCLOSURE = "enclosure";
    
    public static final String TABLE_SCHEDULE = "Schedule";
    public static final String TABLE_FAVOURITE = "Favourite";
    public static final String COLUMN_SCHEDULE_ID = "id";
    public static final String COLUMN_SCHEDULE_NAME = "name";
    public static final String COLUMN_SCHEDULE_BAND = "band";
    public static final String COLUMN_SCHEDULE_DAYS = "weekdays";
    public static final String COLUMN_SCHEDULE_DATE = "start";
    public static final String COLUMN_SCHEDULE_LENGTH = "length";
    
    public static final String TABLE_FAVOURITE_SONGS = "FavouriteSongs";
    public static final String COLUMN_SONGS_ID = "id";
    public static final String COLUMN_SONGS_TITLE = "title";
    public static final String COLUMN_SONGS_ARTIST = "artist";
    public static final String COLUMN_SONGS_DURATION = "duration";

    public MySQLiteHelper() {
// Path: app/src/main/java/org/indywidualni/centrumfm/MyApplication.java
// public class MyApplication extends Application {
// 
//     private static Context mContext;
//     private Tracker mTracker;
// 
//     public static Context getContextOfApplication() {
//         return mContext;
//     }
// 
//     @Override
//     public void onCreate() {
//         mContext = getApplicationContext();
//         super.onCreate();
//     }
// 
//     /**
//      * Gets the default {@link Tracker} for this {@link Application}.
//      *
//      * @return tracker
//      */
//     synchronized public Tracker getDefaultTracker() {
//         if (mTracker == null) {
//             // To enable debug logging use: adb shell setprop log.tag.GAv4 DEBUG
//             GoogleAnalytics analytics = GoogleAnalytics.getInstance(this);
//             analytics.setDryRun(BuildConfig.DEBUG);
// 
//             mTracker = analytics.newTracker(R.xml.global_tracker);
//             mTracker.enableAutoActivityTracking(true);
//             mTracker.enableExceptionReporting(true);
//         }
//         return mTracker;
//     }
// 
// }


// Path: app/src/main/java/org/indywidualni/centrumfm/util/database/MySQLiteHelper.java
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;
import android.util.Log;
import org.indywidualni.centrumfm.MyApplication;

package org.indywidualni.centrumfm.util.database;



public class MySQLiteHelper extends SQLiteOpenHelper {
  
    private static final String DATABASE_NAME = "centrum.db";
    private static final int DATABASE_VERSION = 2;
    
    public static final String TABLE_NEWS = "News";
    public static final String COLUMN_NEWS_GUID = "guid";
    public static final String COLUMN_NEWS_LINK = "link";
    public static final String COLUMN_NEWS_TITLE = "title";
    public static final String COLUMN_NEWS_DATE = "pubDate";
    public static final String COLUMN_NEWS_DESCRIPTION = "description";
    public static final String COLUMN_NEWS_CATEGORY = "category";
    public static final String COLUMN_NEWS_ENCLOSURE = "enclosure";
    
    public static final String TABLE_SCHEDULE = "Schedule";
    public static final String TABLE_FAVOURITE = "Favourite";
    public static final String COLUMN_SCHEDULE_ID = "id";
    public static final String COLUMN_SCHEDULE_NAME = "name";
    public static final String COLUMN_SCHEDULE_BAND = "band";
    public static final String COLUMN_SCHEDULE_DAYS = "weekdays";
    public static final String COLUMN_SCHEDULE_DATE = "start";
    public static final String COLUMN_SCHEDULE_LENGTH = "length";
    
    public static final String TABLE_FAVOURITE_SONGS = "FavouriteSongs";
    public static final String COLUMN_SONGS_ID = "id";
    public static final String COLUMN_SONGS_TITLE = "title";
    public static final String COLUMN_SONGS_ARTIST = "artist";
    public static final String COLUMN_SONGS_DURATION = "duration";

    public MySQLiteHelper() {
        super(MyApplication.getContextOfApplication(), DATABASE_NAME, null, DATABASE_VERSION);