have to develop an one android application.
i have to play the video using youtubeplayerfragment.
Here the video is playing well on fullscreen mode. The Same video is playing well on normal mode also.Here am facing one problem.
The problem is,
More number of video is available in Gallery view.
Here if i have to click one video from gallery view means that video is playing well.Now i have to stop that video and click next video means the next video audio is hearing .but the last playing video(at stopping place) thumbnail image is displaying.but its working fullscreen mode correctly.
How can i clear my cache memory here ??? is there any specific algorithm for this?please give me solution ???
[HIGH]FragmentManager fragmentManager = getChildFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager
.beginTransaction();
YouTubePlayerSupportFragment fragment = new YouTubePlayerSupportFragment();
fragmentTransaction.add(R.id.youtube_fragment, fragment);
fragmentTransaction.commit();
fragment.initialize(DeveloperKey.DEVELOPER_KEY, new OnInitializedListener() {
@Override
public void onInitializationSuccess(Provider arg0,
YouTubePlayer arg1, boolean arg2) {
if (!arg2) {
arg1.loadVideo(_Video);
}
}
@Override
public void onInitializationFailure(Provider provider,
YouTubeInitializationResult errorReason) {
Toast.makeText(getActivity(), "Please install the Youtube app on your device ", Toast.LENGTH_LONG).show();
}
});
[/HIGH]
I have using following xml:
[HIGH]
<fragment
android:name="com.google.android.youtube.player.YouTubePlayerSupportFragment"
android:id="@+id/youtube_fragment"
android:layout_width="match_parent"
android:layout_below="@+id/title"
android:layout_height="wrap_content"/>
[/HIGH]How can i clear cache in my android application.please give me some suggestions ..
i have to play the video using youtubeplayerfragment.
Here the video is playing well on fullscreen mode. The Same video is playing well on normal mode also.Here am facing one problem.
The problem is,
More number of video is available in Gallery view.
Here if i have to click one video from gallery view means that video is playing well.Now i have to stop that video and click next video means the next video audio is hearing .but the last playing video(at stopping place) thumbnail image is displaying.but its working fullscreen mode correctly.
How can i clear my cache memory here ??? is there any specific algorithm for this?please give me solution ???
[HIGH]FragmentManager fragmentManager = getChildFragmentManager();
FragmentTransaction fragmentTransaction = fragmentManager
.beginTransaction();
YouTubePlayerSupportFragment fragment = new YouTubePlayerSupportFragment();
fragmentTransaction.add(R.id.youtube_fragment, fragment);
fragmentTransaction.commit();
fragment.initialize(DeveloperKey.DEVELOPER_KEY, new OnInitializedListener() {
@Override
public void onInitializationSuccess(Provider arg0,
YouTubePlayer arg1, boolean arg2) {
if (!arg2) {
arg1.loadVideo(_Video);
}
}
@Override
public void onInitializationFailure(Provider provider,
YouTubeInitializationResult errorReason) {
Toast.makeText(getActivity(), "Please install the Youtube app on your device ", Toast.LENGTH_LONG).show();
}
});
[/HIGH]
I have using following xml:
[HIGH]
<fragment
android:name="com.google.android.youtube.player.YouTubePlayerSupportFragment"
android:id="@+id/youtube_fragment"
android:layout_width="match_parent"
android:layout_below="@+id/title"
android:layout_height="wrap_content"/>
[/HIGH]How can i clear cache in my android application.please give me some suggestions ..