How to add a system menu item

by Davide » Sun, 15 Mar 2009 13:12:42 GMT


Sponsored Links
 That it will be show in every application. Like the virtual keyboard
menu item ?

Thanks in advance!

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. How to start another application from my activity.

I want to know if there is any way to start another application from within
my application.
Specifically i am trying to a have a shortcut (button) to Google Maps
Application within my application.

Also is there any way to start another process from within my android
appplication?

Regards,
Aishwarya

-- 

2. Unexplained error from MediaPlayer

My code tries to play an MP3 file from res/raw.

FileDescriptor fd =
appContext.getResources().openRawResourceFd(R.raw.ringtone)
                                        .getFileDescriptor();
player = new MediaPlayer();
                        try
                        {
                                
player.setAudioStreamType(AudioManager.STREAM_RING);
                                player.setDataSource(fd);
                                player.prepare();
                        }
                        catch (IllegalArgumentException e)
                        {
                                // TODO Auto-generated catch block
                                e.printStackTrace();
                                player = null;
                                return;
                        }
                        catch (IllegalStateException e)
                        {
                                // TODO Auto-generated catch block
                                e.printStackTrace();
                                player = null;
                                return;
                        }
                        catch (IOException e)
                        {
                                // TODO Auto-generated catch block
                                e.printStackTrace();
                                player = null;
                                return;
                        }

                        player.setLooping(true);
                        player.start();

The log shows:

02-21 15:18:18.360: ERROR/PlayerDriver(51): Command
PLAYER_SET_DATA_SOURCE completed with an error or info
PVMFErrNotSupported
02-21 15:18:18.380: ERROR/MediaPlayer(693): error (1, -4)
02-21 15:18:18.390: WARN/PlayerDriver(51):
PVMFInfoErrorHandlingComplete

After player.prepare() is called.

I really don't have a hint.
I won't use MediaPlayer.create() because I need
player.setAudioStreamType(AudioManager.STREAM_RING);

Would appreciate any help on this...

-- 

3. Non-parallel construction of DatePicker and TimePicker

4. Layout resource: FWVGA vs. WVGA

5. Adb apk

6. KEYCODE from Android phone

7. KEYCODE for headset button press