aspose file tools*
The moose likes Android and the fly likes How to get Video/Audio File icon? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "How to get Video/Audio File icon?" Watch "How to get Video/Audio File icon?" New topic
Author

How to get Video/Audio File icon?

Prajkti Khadse
Ranch Hand

Joined: Apr 02, 2009
Posts: 52
Hi all,

I want to retrieve all the Video and Audio files present on the sdcard and display them in GridView along with their Name and Icon.

But m not getting how to get icon of the file???
Can Anybody Please Please help me out ...........
Pratik Goswami
Ranch Hand

Joined: Mar 02, 2009
Posts: 136

Hi Prajakti,

Prajkti Khadse wrote: I want to retrieve all the Video and Audio files present on the sdcard and display them in GridView along with their Name and Icon.

Can you please make it more clearer? I have several questions base on it.

1. Are you storing Audio/Video only or storing images also inside SDcard??
2. Do you want to display them in their default icons?? (As FileSystemView works in Java).
3. Do you want to display them like Windows file system displays in Thumbnail preview?

We can have more idea if we can come to know how android itself display those Audio/Video files on SD card.

Thanks & Regards
Pratik Goswami.


iOS * Android Developer
Prajkti Khadse
Ranch Hand

Joined: Apr 02, 2009
Posts: 52
Thanks for Quick Reply,

Actually i want to display files with their default icons only............???

Do you have any clue??
And yes i m storing Images and Audio as well as Video files in sdcard..
Pratik Goswami
Ranch Hand

Joined: Mar 02, 2009
Posts: 136

Hi,

If I am not making any misunderstanding, you want to display their default icons like FileSystemView in Java (My 2nd question).
AFAIK there is no way to display file system view/icon in android. You can display user defined icons with particular file type.
Please have a look at this URL
In this URL all files are filtered according to type, if you want to display it inside a list then you have to change your logic.


Thanks & Regards
Pratik
Prajkti Khadse
Ranch Hand

Joined: Apr 02, 2009
Posts: 52
Thanks Pratik,

I already referred the tutorial Android FileBrowser v.2.0 (Iconified-List-Based).

But i thought of displaying the actual icons....which obviously i can't..

Anyways...

Thanks again...
Pratik Goswami
Ranch Hand

Joined: Mar 02, 2009
Posts: 136

Hi Prajakti,

How android device actually stores/displays these video/audio files from SD card? If OS is displaying default icons then it can be possible to do within our code too.

Thanks & Regards
Pratik Gosawmi
Prajkti Khadse
Ranch Hand

Joined: Apr 02, 2009
Posts: 52
Actually,
Android doesn't display any icons for the files...

For Pictures, it displays Thumbnails and for Audios it Just Displays File Name and Duration
Video files, m not able to see on emulator.....
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get Video/Audio File icon?