I'm trying to send data from Activity A to B. This is the code in A (Working fine):
public void sendToFavorites(Context context){
String vID,vThumbnail,vTitle;
vID = sendResult.getId().getVideoId();
vThumbnail = sendResult.getSnippet().getThumbnails().getMedium().getUrl();
vTitle = sendResult.getSnippet().getTitle();
fav = new Intent(context,Favorites.class);
fav.putExtra("title",vTitle);
fav.putExtra("thumbnail",vThumbnail);
fav.putExtra("id",vID);
}
But the extras in Activity B says null:
Bundle extras = getIntent().getExtras(); //extras: null
How can I fix it?
Aucun commentaire:
Enregistrer un commentaire