Android: Making save to SD card and Context Menu functions dynamic, or relative to button pressed?

Ok so I think you can got sol by using following changes.

Ok so I think you can got sol by using following changes: 1:take two arrays . One for storing your ringbuttons ids which you are adding to menu to play and another array respectively wtih corresponding sound array id for tht buttons sound; for exa. `int btnid=new intcount;//count is no of buttons for playing ring int rawid=ne intcount; ` than:you can catch the id of button of clicked menuitem and from tht you have to compare in function1 with your btnid array and get the index of array of btnid matched 2:than after with same index you can find rawsource in rawid array.

Your 1st prob is sloved now for tht second prob of filename you just try this: String filename="sound"+id+". Ogg";//id is index of array.

Thank you very much. I will be honest, I am not quite sure how to implement all of your suggestions as I constructed my sound array using a suggestion I read and it is done differently. Also I am not quite sure how to pass the id of the array index to the savering function but this is definately helpful.

I really appreciate your taking the time to offer some assistance. Thanks again! – Aaron Jan 23 at 2:15 Ok, so I made the arrays using the shortcut syntax int anArray = {R.raw.

Sound1, R.raw. Sound2, etc. }; R.id. Sound1, etc. For the buttons.

I don't know how to use them, to catch the index number and pass it to the functions in the activity. All the tutorials I have found end at making the index, they don't include using it. – Aaron Jan 24 at 5:13 aron you can get menuitemid from menu click.ok.

So according to it you have to figure out frm which id your ring button menu items start and acoording it you can figure out index. Its now you have to implement logic. – chirag shah Jan 24 at 5:17 Thanks.

I can appreciate the concept but don't know how to excecute it. Could you by chance show me an example of how I would do this? – Aaron Jan 24 at 21:18.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions