public class Menus extends Activity {
//set constants for MediaStore to query, and show videos
private final static Uri MEDIA_EXTERNAL_CONTENT_URI = MediaStore.
Try this: int data = getIntent().getExtras() .getInt("mnt/sdcard-ext");
Intent i = new Intent("com.ave.EDITOR");
i.putExtra("mnt/sdcard-ext", _ID);
startActivity(i);
and in second activity in onCreate
method:
String data = getIntent().getStringExtra("mnt/sdcard-ext");
You need to call putExtra()
on the Intent instance you are passing to startActivity()
. In the second activity, you can call getIntent()
(a member of Activity) to get the Intent that started the Activity. Do it in onCreate()
. Then, it will return you an Intent instance, which you can call get<type>Extra()
on depending on what type of extra you packed in there. If your requirements are beyond the basic types supported (things that already implement Parcelable, and the fundamental java types) then you will need to write your own class and implement the Parcelable
interface.
See the Intent doc for more info.