I am working with JSON. I want to display the video link and its image and its description from Json file in custom listview and when this Video link is clicked it should play a video. [the videos are stored in Server and its link are given in JSON file].
I am able to get the image and description from JSON file but got stuck in Getting Video link. Can you please help me out in this. I searched a lot on this on Google but failed to get information on videos to get from JSON file. but there are lot of examples on getting video's from YouTube.
Should we write any extra code to get video from jSON As we write image loader to get images! If so Can anybody share what i can do and how to display and play.
Thanks a lot in advance.
My SingleItem view:
public class SingleItemView extends Activity{
// Declare Variables
ImageLoader imageLoader = new ImageLoader(this);
@Override
public void onCreate(Bundle savedInstanceState) {
// Capture position and set results to the ImageView
// Passes images URL into ImageLoader.class
imageLoader.DisplayImage(imageLocation, imgflag);
}
}
My Base adapter:
// Capture ListView item click
itemView.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
// Get the position
resultp = data.get(position);
Intent intent = new Intent(context, SingleItemView.class);
// Start SingleItemView Class
context.startActivity(intent);
}
});
return itemView;