Advertisement
Guest User

Untitled

a guest
Jan 18th, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. case 1:
  2. i = new Intent(A.this, B.class);
  3. i.putExtra("channel","http://id=HBO");
  4. startActivity(i);
  5. break;
  6.  
  7. Bundle bundle = getIntent().getExtras();
  8. String channel = bundle.getString("channel");
  9. Uri uri = Uri.parse(channel);
  10. Intent intent = new Intent(Intent.ACTION_VIEW, uri);
  11. intent.setDataAndType(uri, "video/mp4");
  12. startActivity(intent);
  13.  
  14. @Override
  15. public void onBackPressed() {
  16. if (interstitial.isLoaded()) {
  17. interstitial.show();
  18. }
  19. super.onBackPressed();
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement