質問

I have created thid intent for my mp3 file but its not working .. can anyone solve my doubt ..

    public boolean onItemLongClick(AdapterView<?> parent, View view, int position,
        long id) {
    // TODO Auto-generated method stub
    int songIndex=position;
    String songTitle = songsList.get(songIndex).get("songTitle");
    Bundle basket=new Bundle();
    basket.putString("key", songTitle);
    Intent i=new Intent(getApplicationContext(),Tabs.class);
    i.putExtras(basket);
    startActivity(i);
    return false;
}}

and this is my Tabs activity that is accepting the intent;

Bundle gotBasket=getIntent().getExtras();
       getTitle=gotBasket.getString("key");
        filename.setText(getTitle);
役に立ちましたか?

解決

why you wanna pass mp3 file? save it after you receive the file in your app and just pass file path then use it now you happy

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top