문제

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