Hello All, Please see the code
public void onCompletion(MediaPlayer mp) { CompleteFlag = true; video.pause(); /* */ /*if(checkNetworkConnection()){ try { new PostUsesData().execute("T"); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } }*/ // set the message to display try { EncryptVideo(IDValue); } catch (Exception e1) { // TODO Auto-generated catch block e1.printStackTrace(); } alertbox.setTitle("Message"); alertbox.setMessage("Do you want to delete this video ?"); // set a positive/yes button and create a listener alertbox.setPositiveButton("Yes", new DialogInterface.OnClickListener() { // do something when the button is clicked public void onClick(DialogInterface arg0, int arg1) { try { new File(path).delete(); /* Toast.makeText(getApplicationContext(), "Thanks,Inprogress..", Toast.LENGTH_SHORT).show();*/ } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } try { Intent myIntent = new Intent(VideoPlayer.this, WatchActivity.class); // here myIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); startActivity(myIntent); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } }); alertbox.setNegativeButton("No", new DialogInterface.OnClickListener() { // do something when the button is clicked public void onClick(DialogInterface arg0, int arg1) { showDialog(0); } }); // display box alertbox.show(); // IntroFaceBookScreen.mFacebook.dialog(this, "stream.publish", parameters, this); } Here i am playing a video when video completed then back button or navigating on activity gives crash, before finish the video when back press no error . Please help me what mistake by me here -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en