VIDEO ACTIVITY
with the code that you gave me to be included in videoactivity me an error on the url at the line private String VIDEO = url; tells me that url can not be resolved to a variable
public class VideoActivity extends YouTubeBaseActivity implements
YouTubePlayer.OnInitializedListener {
static private final String DEVELOPER_KEY = "AIzaSyBR-QH8hCO8U_WE_sIPGhEQIGmBEYCi7pQ";
private String VIDEO = url;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.videoactivity);
YouTubePlayerView youTubeView = (YouTubePlayerView)
findViewById(R.id.youtube_video);
youTubeView.initialize(DEVELOPER_KEY, this);
Bundle bundle = getIntent().getExtras();
final String url = bundle.getString("url1");
}
public void onInitializationFailure(Provider provider,
YouTubeInitializationResult error) {
Toast.makeText(this, "Oh no! Errore di Connessione, provi a rientrare"+error.toString(),
Toast.LENGTH_LONG).show();
}
@Override
public void onInitializationSuccess(Provider provider, YouTubePlayer player,
boolean wasRestored) {
player.loadVideo(VIDEO);
}
}