Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User schumi1331's Avatar
    Join Date
    Nov 2009
    Posts
    52
    Hello

    I'm developing some java apps for Symbian ^3, and also for Symbian Belle.
    In Belle there's this new notification bar at the top of the display and it is displayed in every native app.

    Now I'm using setFullScreenMode(true); to use the full screen, but I'd like to use the full screen without the bar at the top. That means, I don't want to use or display the bottom UI bar with back buttons, etc, as I'm doing this myself because of the lack of supported icons for it.

    So is there a way to display the notification bar in Symbian Belle with J2ME apps, but NOT the bottom command bar?

    Best Regards,
    schumi1331

  2. #2
    Nokia Developer Champion im2amit's Avatar
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    2,903
    You may require to render your notification bar in that case, using custom item or draw it with every repaint on your full canvas.
    thanks,
    ~Amitabh
    (Poster of the Month -Dec'12)
    Follow me on my blog for Innovative Mobile Apps

  3. #3
    Registered User schumi1331's Avatar
    Join Date
    Nov 2009
    Posts
    52
    But then it will not work like the native one, which means that you can't use the dropdown-bar then...

    Also I think, I'm not able to get battery status with J2ME, for example.

    Is there no other solution?

  4. #4
    Nokia Developer Expert skalogir's Avatar
    Join Date
    Aug 2011
    Posts
    547
    So is there a way to display the notification bar in Symbian Belle with J2ME apps, but NOT the bottom command bar?
    If by bottom command bar, you refer to the On Screen Keypad (OSK), yes you can disable it. Please read this information. Full-screen mode gives you control over the entire screen. The Canvas covers also the area where the status bar resides in full screen mode. Displaying the status bar in full screen mode is currently supported only in Series 40.

    Also I think, I'm not able to get battery status with J2ME, for example.
    You can actually get the battery charge level and charger status by using the following sample code:

    Code:
    import java.io.IOException;
    import javax.microedition.io.Connector;
    import javax.microedition.lcdui.Display;
    import javax.microedition.lcdui.Form;
    import javax.microedition.lcdui.StringItem;
    import javax.microedition.midlet.*;
    import javax.microedition.sensor.ChannelInfo;
    import javax.microedition.sensor.Data;
    import javax.microedition.sensor.DataListener;
    import javax.microedition.sensor.SensorConnection;
    import javax.microedition.sensor.SensorInfo;
    import javax.microedition.sensor.SensorManager;
    
    public class SensorBatteryMIDlet extends MIDlet implements DataListener {
        
        private SensorConnection sensor;
        private int dataType;
     
        Form mainForm;
        Display display;
    
        StringItem intoInfo;
        
        public void startApp() {
            mainForm = new Form("Sensor MIDlet");
    
            intoInfo = new StringItem("Battery Level", "");
            
            display = Display.getDisplay(this);
            display.setCurrent(mainForm);
    
            mainForm.append(intoInfo);
    
            SensorInfo infos[] = SensorManager.findSensors("battery_charge", null);
            if (infos.length > 0) {
                dataType = infos[0].getChannelInfos()[0].getDataType();
                try {
                    sensor = (SensorConnection) Connector.open(infos[0].getUrl());
                    sensor.setDataListener(this, 1);
                }
                catch (Exception e) {
                    //Do something
                }
            }
            else {
                System.out.println("no sensor found");
            }        
        }
        
        public void pauseApp() {
        }
        
        public void destroyApp(boolean unconditional) {
        }
    
        public void dataReceived(SensorConnection sc, Data[] data, boolean isDataLost) {
    
            switch (dataType) {
                case ChannelInfo.TYPE_INT:
                    int[] xIntValues = data[0].getIntValues();
                    int reaX = xIntValues[xIntValues.length - 1];
                    intoInfo.setText(reaX + "%");
                    break;
                default:
                    break;
            }
        }
    
        public void close() {
            sensor.removeDataListener();
            try {
                sensor.close();
                sensor = null;
            }
            catch (IOException ioe) {
            }
        }
    }
    Please replace "battery_charge" wtih "charger_state" in the above code to switch between battery charge level (0-100) and charger status (1 = connected to power, 0 = disconnected)
    Last edited by skalogir; 2012-07-08 at 14:19.

  5. #5
    Nokia Developer Champion Tiger79's Avatar
    Join Date
    Apr 2007
    Posts
    2,697
    That means, I don't want to use or display the bottom UI bar with back buttons, etc, as I'm doing this myself because of the lack of supported icons for it.
    maybe adding the Nokia-MIDlet-On-Screen-Keypad parameter to your JAD file ?
    have a look here :
    http://www.developer.nokia.com/Resou...ttributes.html
    Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them.

Similar Threads

  1. J2ME Push Notification
    By vishal.vpb in forum Mobile Java General
    Replies: 5
    Last Post: 2012-08-07, 11:32
  2. Adding a new notification to Nokia Belle
    By madhavnarain in forum Symbian User Interface
    Replies: 1
    Last Post: 2012-02-27, 07:35
  3. run j2me code on symbian belle SDK?
    By JoSmith in forum Mobile Java Tools & SDKs
    Replies: 1
    Last Post: 2011-11-08, 12:18
  4. Displaying large images S40 J2ME
    By markizik in forum Mobile Java Media (Graphics & Sounds)
    Replies: 4
    Last Post: 2010-08-01, 10:10
  5. displaying arabic using j2me
    By raghda in forum Mobile Java General
    Replies: 16
    Last Post: 2009-06-18, 13:03

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