 <p><strong>l</strong> is type of <strong>long</strong> ...</p> <p>so you need to extract long instead of String like</p> <pre><code> videoLong = extras.getLong("videoId"); </code></pre> <p>so the full implementation of second intent is </p> <pre><code>@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); final VideoView videoView; setContentView(R.layout.activity_play_video); Bundle extras; Long videoLong; if (savedInstanceState == null) { extras = getIntent().getExtras(); if (extras == null) { videoLong= null; } else { videoLong= extras.getLong("videoId"); System.out.println("video id intent 2 = " + videoLong); } } </code></pre>