Pergunta

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);
Foi útil?

Solução

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top