Intent intent=new Intent(getApplicationContext(),SecondActivity.class) įinish() I want to load it from scratch, but it's showing me the state where it was paused. Toast.makeText(getApplicationContext(),"third",Toast.LENGTH_SHORT).show() ![]() Intent intent=new Intent(getApplicationContext(),ThirdActivity.class) SecondActivity startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(link))) Intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK) MainActivity Intent intent = new Intent(MainActivity.this,ThirdActivity.class) But currently, I am getting the previously opened YouTube app which was in the background. Main Activity -> Second Activity -> YouTube -> Third Activity -> YouTubeīut I want the YouTube app to load again from scratch. To open file: File myFile new File(your any type of file url). It should however open the YouTube app from scratch and not show the previous YouTube Activity in background. Here i providing you code for open any type of file using default intent in Android. How to open a YouTube link, and then when it opens in the app, it should close the YouTube app and again call my Main Activity which opens the YouTube app.
0 Comments
Leave a Reply. |