package com.sferadev.danacast;

import android.app.Application;

import com.google.android.libraries.cast.companionlibrary.cast.VideoCastManager;
import com.google.android.libraries.cast.companionlibrary.cast.player.VideoCastControllerActivity;

public class App extends Application {

    @Override
    public void onCreate() {
        super.onCreate();
        String applicationId = getString(R.string.app_id);

        VideoCastManager.
                initialize(this, applicationId, VideoCastControllerActivity.class, null)
                .enableFeatures(VideoCastManager.FEATURE_NOTIFICATION |
                        VideoCastManager.FEATURE_LOCKSCREEN |
                        VideoCastManager.FEATURE_WIFI_RECONNECT |
                        VideoCastManager.FEATURE_DEBUGGING);
    }

}

@@ -56,16 +56,48 @@
 ication;
+%0Aimport android.content.Context;
 %0A%0Aimport
@@ -311,16 +311,127 @@
 tion %7B%0A%0A
+    private static Context mContext;%0A%0A    public static Context getContext() %7B%0A        return mContext;%0A    %7D%0A%0A
     @Ove
@@ -491,16 +491,41 @@
 eate();%0A
+        mContext = this;%0A
         

Add application context