×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Apr 2009
    Posts
    40

    Observer handle for portrait/landscape mode???

    Hello,

    I have 2 Questions:

    1.) Is it possible to open local (f.e. on a memory card) html-files from J2ME in the browser (if I open directly from filemanager, it opens the html-file in browser)?

    2.) Is there any way something like an observer which constantly observes if phone is in portrait or landscape mode, and then handles?

    EXAMPLE:

    I open the J2ME app.

    If phone is in portrait mode, app should open file1.html in browser
    if phone switches to landscape mode file2.html should be opened automatically
    if phone switches again in portrait mode file1.html should be opened.
    ...

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

    Re: Observer handle for portrait/landscape mode???

    You may be able to use MIDlet.platformRequest(), with a file:/// URL pointing to the file you want, to open the browser for that file. This is device-dependent.

    You can detect the orientation of the screen, only if your MIDlet is the foreground application, and only if you are displaying a Canvas in full-screen mode (it will receive a sizeChanged() event when the orientation changes). Once the browser is displayed, the Java application will no longer be in the foreground, and will no longer receive events.

    Note that many devices cannot run a Java app and the browser at the same time.

    Graham.

  3. #3
    Registered User
    Join Date
    Apr 2009
    Posts
    40

    Re: Observer handle for portrait/landscape mode???

    You may be able to use MIDlet.platformRequest(), with a file:/// URL pointing to the file you want, to open the browser for that file. This is device-dependent.
    OK that is the same solution which I would have tried.

    You can detect the orientation of the screen, only if your MIDlet is the foreground application, and only if you are displaying a Canvas in full-screen mode (it will receive a sizeChanged() event when the orientation changes). Once the browser is displayed, the Java application will no longer be in the foreground, and will no longer receive events.
    OK thanks for the helpfull information. Is there another way to solve it?

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

    Re: Observer handle for portrait/landscape mode???

    Quote Originally Posted by grahamhughes View Post
    You can detect the orientation of the screen, only if your MIDlet is the foreground application, and only if you are displaying a Canvas in full-screen mode
    Quote Originally Posted by carsamba55 View Post
    OK thanks for the helpfull information. Is there another way to solve it?
    No other way, sorry.

    Graham.

  5. #5
    Registered User
    Join Date
    Apr 2009
    Posts
    40

    Re: Observer handle for portrait/landscape mode???

    OK BIG THANKS for the fast and helpfull information, this board rocks

  6. #6
    Registered User
    Join Date
    Apr 2009
    Posts
    40

    Re: Observer handle for portrait/landscape mode???


Similar Threads

  1. How to handle more than one observer
    By 182guide in forum Symbian
    Replies: 1
    Last Post: 2010-01-15, 21:23
  2. Nokia 5800 XpressMusic accerated video decoders
    By Gingah in forum General Development Questions
    Replies: 4
    Last Post: 2009-07-06, 17:44
  3. http observer and handle
    By gulabppatil in forum Symbian
    Replies: 4
    Last Post: 2008-03-13, 11:01
  4. which class can handle input mode
    By yql in forum Symbian
    Replies: 15
    Last Post: 2007-08-20, 11:15
  5. Handle switching to standby mode
    By SamoylovBoris in forum Symbian User Interface
    Replies: 3
    Last Post: 2007-08-20, 10:16

Posting Permissions

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