MemoryFile to create a file in memory?

by Moto » Sat, 21 Feb 2009 07:30:38 GMT


Sponsored Links
 Hello,
Could someone let me know how I could get a File path from a file
create in memory using MemoryFile class?

I was able to create one but I can't seem to know how to obtain a
"pointer" path to this file in memory so that I could give it to
MediaPlayer...

Help?

Thanks!
Moto!
--~--~---------~--~----~------------~-------~--~----~



MemoryFile to create a file in memory?

by Marco Nelissen » Sat, 21 Feb 2009 07:48:36 GMT


 If it's in memory (i.e. RAM), then it is not in the filesystem, and
therefore there is no path.
What are you trying to do? Where is the data in the MemoryFile coming
from, originally?





--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


MemoryFile to create a file in memory?

by Moto » Sat, 21 Feb 2009 07:58:10 GMT


 Thanks for your reply Marco...

I'm trying to somehow trick MediaPlayer into reading a buffer with
audio.  I'm not too sure how that would playout but at this point I'm
trying everything to get audio streaming working....

--~--~---------~--~----~------------~-------~--~----~



MemoryFile to create a file in memory?

by Marco Nelissen » Sat, 21 Feb 2009 08:04:33 GMT


 OK, but where does the data inside the buffer come from? Are you
generating it on the fly, or are you downloading/copying it from
somewhere?





--~--~---------~--~----~------------~-------~--~----~



MemoryFile to create a file in memory?

by Moto » Sun, 22 Feb 2009 01:14:01 GMT


 the data is generated on the fly you can say since it is being
retrieved from a UDP connection using an InputStream.
--~--~---------~--~----~------------~-------~--~----~



MemoryFile to create a file in memory?

by Marco Nelissen » Sun, 22 Feb 2009 02:38:58 GMT


 In that case you'll either have to wait for Cupcake, or set up a local
http proxy to stream through.





--~--~---------~--~----~------------~-------~--~----~



MemoryFile to create a file in memory?

by oliv yu » Mon, 23 Feb 2009 05:13:23 GMT


 Hi Moto,

I guess, what Marco means is that you don't really have to worry about the
buffer thing. All you need to do is to make your program found the root
where stream come from, a specific file, a URL (actually a file in the
server) or some devices etc. Then, let the program and OS mind how to
buffer.





Thanks for your reply Marco...

I'm trying to somehow trick MediaPlayer into reading a buffer with
audio.  I'm not too sure how that would playout but at this point I'm
trying everything to get audio streaming working....

--~--~---------~--~----~------------~-------~--~----~ You received this
message because you are sub...

--~--~---------~--~----~------------~-------~--~----~



MemoryFile to create a file in memory?

by Moto » Thu, 05 Mar 2009 03:32:45 GMT


 Thanks for your help!

So in respect to this topic if MediaPlayer is reading from a file on a
proxy or remote location does it ask for the length of the file? could
this length change as time goes by? I assume the server side of the
proxy would just continue sending data to the connected client
"MediaPlayer" and it won't care how much data I pass untill the
connection is terminated.

I don't understand this side of the logic...
Could someone explain....???

Thanks!
Moto!
--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Accesing an image file from its content provider

Hi there
I need to know how to get the actual name of the file from a content
provider
So, I use :

Intent intent = new Intent("android.intent.action.PICK");
intent.setType("image/*");
startActivityForResult(intent, 1);

to call the Android gallery and let me choose a picture. Then I have:

protected void onActivityResult(int requestCode, int resultCode,
Intent data) {
                if (requestCode == 1) {
                        if (resultCode == RESULT_OK) {
                           ............
                       }
                }
}

external/images/media/4) with data.getData().
What do i have to put on the dotted line that would allow me to get
the name of the file?
That is, hot do i go from the Uri (data.getData()) to the actual name
of the file so that i can work with it through the JAVA traditional
File API?
Thanx

--~--~---------~--~----~------------~-------~--~----~

2. building a picture using small, pieces of different size

Is there in class android library to picture from small, pieces of
different size.
what should be the logic it requires. if there is no built in class.

thank you.
--~--~---------~--~----~------------~-------~--~----~

3. which is class in android for clipping images

4. AutoCompleteTextView for contacts

5. Tmobile Android touch screen not working after 2 minutes broswing.

6. error in creating object of FileTransferManager manager

7. How to Add Hardware Support to Android?