I have an app that plays mp3’s. I want to make it so when you long click/press on the button it will save the mp3 file to there ringtones directory. Also want a toast notification if possible. Could someone shoot me into the right direction?
Thanks
EDIT:
This is what I have so far
@Override
public boolean onLongClick(View arg0) {
Toast toast = Toast.makeText(AkaliMain.this, "Saved",5000);
toast.setGravity(Gravity.CENTER, 0, 0);
toast.show();
return false;
}
});
EDIT 2:
This is what I have now. Cant even get it to compile.
Google around some, there is TONS of information out there :). See this question for saving mp3s as ringtones. See this question for a good example of an onItemLongClickListener (using a listview).
And this is how to make a toast message:
So your onItemLongClickListener would look something like this:
});
While I could just give you teh complete codez, you wouldn’t learn anything in the process 🙂
EDIT: See this question for more help on saving your mp3 to the ringtones directory. Here is another good one, which links to this great post.