Unchecked assignment: 'java.util.ArrayList' to 'java.util.ArrayList<java.io.File>' less... (Ctrl+F1)

1.4k Views Asked by At

I am retrieving file info from the another activity into my main activity.But I facing the Unchecked assignment problem.My code is as follows.Would anyone can tell me what to do to solve this problem.

    Intent i = getIntent();
    Bundle b = i.getExtras();
    mysongs = (ArrayList) b.getParcelableArrayList("songlist");// This line shows this problem.
    int position = b.getInt("pos",0);
    Uri uri = Uri.parse(mysongs.get(position).toString());
    mediaPlayer = MediaPlayer.create(getApplicationContext(),uri);
    mediaPlayer.start();

I tried this line by declaring it into globally.but the problem is I cann't set the bundel b into this(when i declare it globally).

0

There are 0 best solutions below