This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.os.Bundle; | |
import android.support.design.widget.FloatingActionButton; | |
import android.support.design.widget.Snackbar; | |
import android.support.v4.app.FragmentTransaction; | |
import android.support.v4.content.ContextCompat; | |
import android.support.v4.view.MarginLayoutParamsCompat; | |
import android.view.View; | |
import android.support.design.widget.NavigationView; | |
import android.support.v4.view.GravityCompat; | |
import android.support.v4.widget.DrawerLayout; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final static String BASE_URL = "https://developer.android.com/guide/components/intents-common.html"; | |
final static String PARAM_SOURCE = "utm_source"; | |
final static String PARAM_MEDIUM = "utm-medium"; | |
final static String PARAM_CAMPAIGN = "utm-campaign"; | |
final static String SEGMENT_PHONE = "Phone"; | |
public static URL buildUrl() { | |
/*I've made some assumptions. In an ideal scenario, all the query params can be passed in the function iteself. | |
* But for the sake of brevity, it is avoided. | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private VideoPlayerEvents.OnErrorListenerV2 mJWErrorListener = new VideoPlayerEvents.OnErrorListenerV2() { | |
@Override | |
public void onError(ErrorEvent errorEvent) { | |
removeJWAd(); | |
loadFirst(); | |
} | |
}; | |
private VideoPlayerEvents.OnCompleteListener mJWCompleteListener = new VideoPlayerEvents.OnCompleteListener() { | |
@Override | |
public void onComplete() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.selecttvapp.ui.activities.jw; | |
import android.content.Context; | |
import android.support.v7.app.AppCompatActivity; | |
import com.longtailvideo.jwplayer.JWPlayerSupportFragment; | |
import com.longtailvideo.jwplayer.JWPlayerView; | |
import com.selecttvapp.ui.helper.MyApplication; | |
/** |