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
How to pass mp3 file from one activity to another as an intent
-
21-07-2023 - |
Frage
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);
Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow