×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Registered User
    Join Date
    Aug 2008
    Posts
    5

    Unhappy is it possible to play external audio/image file?

    Hi,

    I have to develop an application in j2me where i have to show a desired image from around 1000 images
    and also play one of sound file from amongst 1000 sound files. I am new to j2me.


    -some device specifications says that maximum jar file size if 512 kb and my data size of these 1000 images + 1000 sounds
    as a resource in a single jar file will increase jar file size so i doubt it will not support.

    -is it possible to access external image/audio file outside jar file? this way my jar file size will decrease to only program code.

    Please help me. what is the way to achieve this?
    -Thanking you.
    B M

  2. #2
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: is it possible to play external audio/image file?

    1000? That's a lot of images.

    What devices are you targeting? Some devices have a JAR limit much lower than 512k. Some have a limit much higher.

    Accessing an external file is possible, but not without complication. One complication is: how will you install 2000 other files?

    You can access files from a web server, using HTTP.

    What is the total size of the image and audio files?

    Graham.

  3. #3
    Registered User
    Join Date
    Aug 2004
    Location
    Hyderabad,India
    Posts
    808

    Re: is it possible to play external audio/image file?

    hi,

    we need to first chk whether device can save these many files or not.

    Alternatively u can develop some portal or within application u can display only descriptive text of image or soundfile and fetch selected file from server as suggested by Graham.

    Regards,
    sudhakar
    Regards,
    Sudhakar

  4. #4
    Registered User
    Join Date
    Aug 2008
    Posts
    5

    Re: is it possible to play external audio/image file?

    Hi,

    Graham & sudhakar thanks for your valuable reply.
    Well, it is not possible to get data from server.

    User will manually copy images and sound files to memory card so installing those files is not a problem.
    As graham mentioned some devices have jar limit to 512 k.
    So, i want to know that should i have to merge/include
    all image & sound files in to jar itself or is it possible to access files from memory card.

    If i have to merge all files into a .jar file than size would be around 2 gb so it is not supported.

    The data size of images and sound files would be around 2 gb.

    Waiting for the reply.

    Thanking you

    BM

  5. #5
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: is it possible to play external audio/image file?


    User will manually copy images and sound files to memory card so installing those files is not a problem.
    Actually that might be a problem, as an user I wouldn't be bothered to select 1000 images and 1000 sounds !!! to copy them to my memory card... Apart from the monstrous job to do that it also might take like 20 minutes to copy 2 gigabytes like you are mentioning ! I hope your targeted audience is mostly composed of saints very very patient saints :P

    As graham mentioned some devices have jar limit to 512 k.
    So, i want to know that should i have to merge/include
    all image & sound files in to jar itself or is it possible to access files from memory card.

    If i have to merge all files into a .jar file than size would be around 2 gb so it is not supported.
    Well that one is easy, you simply cannot make a 2 gigabyte JAR file
    Apart from the fact of the 512KB limit of some devices (which all won't be able to install your application) the questions arises what is the limit of those devices that have a "much higer" JAR limit ? I sincerily doubt that that limit is more than the actual RAM of the device... I'm not sure about this so if someone can shed some light on this ?

    Just a question : how do you hope to distribute your application ? OTA is not an option obviously for a 2 gigabyte application... So I guess DVD's or memory cards with the app on it ?

  6. #6
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: is it possible to play external audio/image file?

    Yes, I think a 2Gb JAR is out of the question. Aside from the obvious practicalities, 2Gb is a common file size limit for many file systems (those that use 32 bits for file sizes). I think it's the largest size that Apple's app store will let you distribute (you'd have to download it by wifi).

    OK then, you're stuck with using FileConnection to access external files. This is not fun... access to the file system is subject to all kinds of security restrictions. Search for FileConnection in the Forum and the Wiki (and Google), and you'll find lots of examples.

    You should consider Tiger79's questions over how to distribute the app...

    Graham.

  7. #7
    Registered User
    Join Date
    Aug 2008
    Posts
    5

    Re: is it possible to play external audio/image file?

    hi
    Actually distribution is not a problem as this is a personal project of my customer. His personnel will handle distribution of sound n images with memory or cd.
    As graham told accessing external files out of jar file will arise security question.

    I dont think i can access outside file .
    Is it possible?
    -BM

  8. #8
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: is it possible to play external audio/image file?

    sure you can access files on the memory card.. what Graham refers to (I think) are the security permissions which will be shown... If you use particular API's (like the PIM API for accessing file's) the user will get an irritating popup asking if the software may read whatever it's trying to read.. Or write.. Or whatever... You will be keeping getting those pop-ups..
    To resolve that you can sign your application and set the permission levels for specific api's to "always allowed" so that those permission acknowledgments don't keep showing up... This means acquiring (read buying) a certificate from some certification company (like Thwate or Verisign)...

Similar Threads

  1. To play raw audio data file
    By pawans in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2008-12-11, 11:38
  2. Error with makesis.exe and creating the .pkg file
    By gramya87 in forum Symbian Tools & SDKs
    Replies: 7
    Last Post: 2007-10-10, 13:53
  3. Help needed with a 3gp file...
    By joedoe_1981 in forum Streaming and Video
    Replies: 0
    Last Post: 2007-07-18, 18:58
  4. cannot able to play a video file.
    By shalini.mishra in forum Mobile Java Media (Graphics & Sounds)
    Replies: 3
    Last Post: 2006-11-13, 16:54

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×