giovedì, 09 ottobre 2008

Finally also LG has his own developer site where we can find documentation, emulators and SDK. Their phones were some of the most misterious devices on the market for the developers.

To see the new developer site click here

LgDeveloper


Did you like the article? Buy me a coffee!

postato da: emanuelepec alle ore 17:47 | Permalink | commenti
categoria:j2me, lg , sdk


mercoledì, 23 luglio 2008

If you want to set the volume in the MediaPlayer using the following code:

                InputStream is = getClass().getResourceAsStream( "/sound.amr" );
                Player player = Manager.createPlayer(is, soundType);
               
player.addPlayerListener( this );
               
player.realize();
                VolumeControl volumeControl =
                (VolumeControl)
player .getControl( "VolumeControl" );
                if ( volumeControl != null ) {
                    volumeControl.setLevel( volume );
                }

when you launch the player with:

                player.start();

no sound can be heard on the LG KE970 Shine without getting any error.

This device requires to get the prefetched status if you want to set the volume and play the sound correctly. The working code is then:


                InputStream is = getClass().getResourceAsStream( "/sound.amr" );
                Player player = Manager.createPlayer(is, soundType);
               
player.addPlayerListener( this );
               
player.realize();
               
player.prefetch( );
                VolumeControl volumeControl =
                (VolumeControl)
player .getControl( "VolumeControl" );
                if ( volumeControl != null ) {
                    volumeControl.setLevel( volume );
                }


Maybe other phones are affected as well (especially LG). Post comment if you other phones with the same problem.


Did you like the article? Buy me a coffee!

postato da: emanuelepec alle ore 20:44 | Permalink | commenti
categoria:bug , tipsandtricks, j2me, lg , mmapi


venerdì, 29 febbraio 2008

The platformRequest method is a very useful method to start an external application from within a J2ME application. Typical use of that is call it (the method belongs to the Midlet class) passing an url to open the device default browser or to place a phone call. Examples:

platformRequest( "http://j2mesoccer.splinder.com") ;

platformRequest( "tel:3351111111");

The LG phones (at least those three I've tried) have a bug and the platformRequest doesn't work (in both the previous cases). A connectionNotFoundException is raised when the call is placed.

The three tested phones are:

- LG P7200
- LG KG320
- LG KG800 Chocolate

If anyone knows other devices with the same behaviour or a workaround for the problem, post a comment.




Did you like the article? Buy me a coffee!

postato da: emanuelepec alle ore 19:28 | Permalink | commenti
categoria:bug , j2me, lg


Blogs Directory