Pass a string path between two activities
<p>i would like to pass the string path from one activity to another...this is my code:</p>

<p>1rst activity</p>

<pre><code>protected void onListItemClick(ListView l, View v, int position, long id) {

        String a = MEDIA_PATH + songs.get(position);
        Intent newActivity = new Intent(this, mainscreen.class);

        newActivity.putExtra("VIDEO", a);
        startActivity(newActivity);

    }
</code></pre>

<p>2nd activity</p>

<pre><code>     Bundle extras = getIntent().getExtras();
String videos = extras.getString("VIDEO");
</code></pre>

<p>i m getting a runtime exception is line          </p>

<pre><code>Bundle extras = getIntent().getExtras();

07-03 16:57:03.362: ERROR/AndroidRuntime(7069): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.data/com.example.data.mainscreen}: java.lang.NullPointerException
</code></pre>

<p>EDIT(LOGCAT)</p>

<pre><code>07-03 17:21:58.806: ERROR/AndroidRuntime(8836): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.data/com.example.data.mainscreen}: java.lang.NullPointerException
07-03 17:21:58.806: ERROR/AndroidRuntime(8836):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1573)
07-03 17:21:58.806: ERROR/AndroidRuntime(8836):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
07-03 17:21:58.806: ERROR/AndroidRuntime(8836):     at android.app.ActivityThread.access$1500(ActivityThread.java:117)
07-03 17:21:58.806: ERROR/AndroidRuntime(8836):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
07-03 17:21:58.806: ERROR/AndroidRuntime(8836):     at android.os.Handler.dispatchMessage(Handler.java:99)
07-03 17:21:58.806: ERROR/AndroidRuntime(8836):     at android.os.Looper.loop(Looper.java:123)
07-03 17:21:58.806: ERROR/AndroidRuntime(8836):     at android.app.ActivityThread.main(ActivityThread.java:3687)
07-03 17:21:58.806: ERROR/AndroidRuntime(8836):     at java.lang.reflect.Method.invokeNative(Native Method)
07-03 17:21:58.806: ERROR/AndroidRuntime(8836):     at java.lang.reflect.Method.invoke(Method.java:507)
07-03 17:21:58.806: ERROR/AndroidRuntime(8836):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:842)
07-03 17:21:58.806: ERROR/AndroidRuntime(8836):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:600)
07-03 17:21:58.806: ERROR/AndroidRuntime(8836):     at dalvik.system.NativeStart.main(Native Method)
07-03 17:21:58.806: ERROR/AndroidRuntime(8836): Caused by: java.lang.NullPointerException
07-03 17:21:58.806: ERROR/AndroidRuntime(8836):     at com.example.data.mainscreen.&lt;init&gt;(mainscreen.java:12)
07-03 17:21:58.806: ERROR/AndroidRuntime(8836):     at java.lang.Class.newInstanceImpl(Native Method)
07-03 17:21:58.806: ERROR/AndroidRuntime(8836):     at java.lang.Class.newInstance(Class.java:1409)
07-03 17:21:58.806: ERROR/AndroidRuntime(8836):     at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
07-03 17:21:58.806: ERROR/AndroidRuntime(8836):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1565)
07-03 17:21:58.806: ERROR/AndroidRuntime(8836):     ... 11 more
</code></pre>
