Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User murugacse4's Avatar
    Join Date
    Feb 2011
    Posts
    64
    Hello,

    I am working in j2me for nokia c1-02 device .. I have one doubt .. can we change the symbol of headphone(i.e )means we inserting the headphone in mobile after insert the headphone jack it shows in the mobile headphone symbol.. that one we can change or while insert another any input device like as square up device .. i want show in mobile square up device symbol...please anyone help me its very urgent...


    Thanks in advance,
    Murugan.G

  2. #2
    Nokia Developer Moderator petrib's Avatar
    Join Date
    Mar 2003
    Posts
    9,414
    There is no possibility whatsover to modify/replace/override a system indicator (like the headphone connected symbol) from J2ME (Java).

  3. #3
    Registered User murugacse4's Avatar
    Join Date
    Feb 2011
    Posts
    64
    Hello sir,
    Otherwise can we add the new symbol .If their is way to add new symbol means please help me how to do that one....

    Thanks in advance,
    Murugan.G

  4. #4
    Registered User murugacse4's Avatar
    Join Date
    Feb 2011
    Posts
    64
    Hello sir,

    In j2me how we detect the new device like square up device ....If we insert the square up device in mobile means it will display the square up symbol in mobile ..how i can solve this problem..Am working for nokia C1-02 model........






    Thanks in advance,
    Murugan.G
    Last edited by murugacse4; 2011-03-26 at 09:46.

  5. #5
    Registered User grahamhughes's Avatar
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,394
    I've merged your two threads together, as they are the same topic.

    A Java ME application cannot add new items to the notification bar.

    Graham.

  6. #6
    Registered User sshhhhhh's Avatar
    Join Date
    Aug 2012
    Posts
    3
    hi
    can someone tell we about how to read that "headphone is inserted in 3.5mm jack" in j2me application for nokia s40??.
    it is possible to read system generated event ???... like some external hardware is attached with 3.5mm jack.

    please reply soon its urgent.

  7. #7
    Nokia Developer Expert bandarap's Avatar
    Join Date
    May 2012
    Posts
    222
    HI sshhhhhh,

    I don't think there is a system property in S40 Java ME to read "headphone is inserted in 3.5mm jack".

    All system properties available in S40 Java ME offerings are available in developer library. http://www.developer.nokia.com/Resou...roperties.html

  8. #8
    Nokia Developer Expert skalogir's Avatar
    Join Date
    Aug 2011
    Posts
    547
    Hi,

    I am afraid what you are asking for is not available, not even in the latest Series 40 full touch devices. This is only possible on Symbian devices with the following sample code:

    Code:
    import java.io.IOException;
    import javax.microedition.lcdui.Command;
    import javax.microedition.lcdui.CommandListener;
    import javax.microedition.lcdui.Display;
    import javax.microedition.lcdui.Displayable;
    import javax.microedition.lcdui.Form;
    import javax.microedition.media.Manager;
    import javax.microedition.media.MediaException;
    import javax.microedition.media.Player;
    import javax.microedition.media.PlayerListener;
    import javax.microedition.midlet.MIDlet;
    import javax.microedition.midlet.MIDletStateChangeException;
    
    import com.nokia.mid.media.AudioOutput;
    
    
    public class Mp3overHTTP 
        extends MIDlet
        implements CommandListener, Runnable, PlayerListener {
    
        Form mainForm;
        Command playCommand = new Command("Play", Command.OK, 0);
        Command exitCommand = new Command("Exit", Command.EXIT, 0); 
        Command stopCommand = new Command("Stop", Command.STOP, 0);
        
        Player player;
        Thread thread;
        boolean firstTime = true;
        boolean isStopped = false;
        protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
            // TODO Auto-generated method stub
        }
    
        protected void pauseApp() {
            // TODO Auto-generated method stub
        }
    
        protected void startApp() throws MIDletStateChangeException {
            mainForm = new Form("Mp3 over HTTP");
            Display.getDisplay(this).setCurrent(mainForm);
            mainForm.addCommand(playCommand);
            mainForm.addCommand(stopCommand);
            mainForm.addCommand(exitCommand);
            mainForm.setCommandListener(this);        
        }
    
        public void commandAction(Command c, Displayable arg1) {
            if( c == playCommand) {
                isStopped = false;
                thread = new Thread(this);
                thread.start();
            }       
            if(c == exitCommand) {
                notifyDestroyed();
            }
            
            if(c == stopCommand) {
                isStopped = true;
                thread = new Thread(this);
                thread.start();
            }
        }
    
        public void run() {        
            try {
                    if(firstTime) {
                        player = Manager.createPlayer("http://tonycuffe.com/mp3/cairnomount_lo.mp3");
                        player.realize();
                        player.addPlayerListener(this);
                        firstTime = false;
                    }   
                    if(isStopped) {
                        player.stop();
                    }
                    else {
                        player.start();
                    }
            } catch (IOException e) {
                e.printStackTrace();
            } catch (MediaException e) {
                e.printStackTrace();
            }
        }
    
        public void playerUpdate(Player player, String event, Object eventData) {
            if (event.equals("com.nokia.audiooutputchange.event")){
                int mode = ((AudioOutput) eventData).getActiveOutputMode();
                mainForm.append("mode is " + mode + "\n");
            }
        }
    }

  9. #9
    Registered User sshhhhhh's Avatar
    Join Date
    Aug 2012
    Posts
    3
    Hi skalogir,
    Thankyou for reply......
    It is possible to alert user that headphone is inserted or not in j2me application for Nokia s40 phones??. I like to notify user that your headphone is inserted or attached with your phone.I am making application for Nokia s40 phones.
    It's urgent,please reply as soon as possible.
    Thanks in advance..

  10. #10
    Nokia Developer Champion im2amit's Avatar
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    2,903
    Read and try this on your target device - http://www.developer.nokia.com/Resou...mentation.html
    thanks,
    ~Amitabh
    (Poster of the Month -Dec'12)
    Follow me on my blog for Innovative Mobile Apps

Similar Threads

  1. How to use an Asp.Net Mobile application in Mobile Phones
    By austin007 in forum Mobile Web Site Development
    Replies: 2
    Last Post: 2009-11-25, 17:52
  2. Replies: 34
    Last Post: 2009-04-14, 13:47
  3. Nokia Mobile Application - Block Mobile Number
    By DhavalParikh in forum Mobile Java General
    Replies: 3
    Last Post: 2003-06-12, 02:22
  4. Nokia Mobile Application - Block Mobile Number
    By DhavalParikh in forum Mobile Web Site Development
    Replies: 0
    Last Post: 2003-06-07, 06:18
  5. Can we convert a JAVA PC application to Mobile application ??
    By rehans_2k in forum Mobile Java General
    Replies: 1
    Last Post: 2002-07-01, 11:33

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