×

Discussion Board

Results 1 to 10 of 10
  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    64

    mobile application

    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
    Super Contributor
    Join Date
    Mar 2003
    Location
    Finland
    Posts
    9,561

    Re: mobile application

    There is no possibility whatsover to modify/replace/override a system indicator (like the headphone connected symbol) from J2ME (Java).

  3. #3
    Registered User
    Join Date
    Feb 2011
    Posts
    64

    Re: mobile application

    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
    Join Date
    Feb 2011
    Posts
    64

    j2me mobile application

    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
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: j2me mobile application

    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
    Join Date
    Aug 2012
    Posts
    3

    Re: mobile application

    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
    Join Date
    May 2012
    Location
    Espoo
    Posts
    224

    Re: mobile application

    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
    Join Date
    Aug 2011
    Posts
    555

    Re: mobile application

    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
    Join Date
    Aug 2012
    Posts
    3

    Re: mobile application

    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
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,087

    Re: mobile application

    Read and try this on your target device - http://www.developer.nokia.com/Resou...mentation.html
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

Similar Threads

  1. Replies: 34
    Last Post: 2009-04-14, 13:47
  2. Nokia Mobile Application - Block Mobile Number
    By DhavalParikh in forum Mobile Java General
    Replies: 3
    Last Post: 2003-06-12, 02:22
  3. 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
  •  
×