Discussion Board

Results 1 to 11 of 11
  1. #1
    Registered User papelboner's Avatar
    Join Date
    Dec 2008
    Posts
    4
    I'm trying to display an image from a j2me application. Unfortunately the image is larger than can be handled by the j2me heap - so I was hoping to just call some native application to show it (e.g. what happens when I select an image from File Manager). Is there any way to do this from a j2me environment?

  2. #2
    Super Contributor grahamhughes's Avatar
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,394
    Where is the image? (JAR, file system, website, etc.)?

    How big is it (file size, pixel dimensions, format, etc.)?

  3. #3
    Registered User papelboner's Avatar
    Join Date
    Dec 2008
    Posts
    4
    Image is on the file system and is say ~1MB (large enough that using the FileConnection API's and creating an Image throws OutOfMemoryException)

  4. #4
    Super Contributor grahamhughes's Avatar
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,394
    Strictly, there is no provision for doing this.

    You could try MIDlet.platformRequest(), using a "file:" url. platformRequest() is the main way to hand control from a MIDlet to the underlying platform. There is no guarantee that "file:" urls will be supported.

  5. #5
    Super Contributor grahamhughes's Avatar
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,394
    (I should add that platformRequest() is available only on MIDP-2.0 devices, and that it does not work properly on early firmware Nokia 6600s.)

  6. #6
    Registered User papelboner's Avatar
    Join Date
    Dec 2008
    Posts
    4
    That worked! Thanks for the help

  7. #7
    Super Contributor grahamhughes's Avatar
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,394
    Really?? Wow!! What a guess!

  8. #8
    Nokia Developer Champion Tiger79's Avatar
    Join Date
    Apr 2007
    Posts
    2,697
    lol...
    this is very handy to know though, so graham, try some other guesses and place them here, maybe after all we can get a nokia to make us some coffee

    MIDlet.platformRequest("Coffee");

  9. #9
    Super Contributor grahamhughes's Avatar
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,394


    I've tried:

    Code:
    "coffee:espresso"
    
    "coffee:capuccino"
    even:

    Code:
    "tea:earlgrey/hot"
    But no luck yet...

  10. #10
    Registered User papelboner's Avatar
    Join Date
    Dec 2008
    Posts
    4
    Hi Graham,

    One last hiccup. So like I said this works great. Only problem is every time I do it I get a "allow application ... to use network to send or receive data?" My app is signed and has permissions to always allow http, file i/o, etc. Do you want to take another guess as to what permission I could apply to get this message to go away?

    thanks!

  11. #11
    Super Contributor grahamhughes's Avatar
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,394
    I can't find any documentation that shows Nokia devices as supporting this, but I think if anything it should be:

    Code:
    MIDlet-Permissions: javax.microedition.midlet.PlatformRequest.url
    You should keep the other permissions (like http, etc), as some Series 60 devices are not happy about platformRequest() in a signed application without these permissions set.

Similar Threads

  1. Image attribute in Bluetooth ServiceRecord
    By lampz in forum Mobile Java Networking & Messaging & Security
    Replies: 7
    Last Post: 2008-02-18, 20:30
  2. Launch MIDlet from native (C++) on S60 3rd Ed.?
    By ubrehmer in forum Mobile Java General
    Replies: 2
    Last Post: 2006-10-19, 06:39
  3. How to launch native function from my function?
    By danie78 in forum Symbian C++
    Replies: 4
    Last Post: 2005-12-01, 03:45
  4. Launch a script from another native app
    By bercobeute in forum Python
    Replies: 0
    Last Post: 2005-03-02, 10:12
  5. image viewer..and displaying image
    By bluetooth45 in forum Symbian C++
    Replies: 2
    Last Post: 2003-10-24, 08:52

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved