Remapping Key Functions

by Raghu D K » Tue, 06 Jan 2009 01:14:00 GMT


Sponsored Links
 Hello All,

How do I map the keys to perform specific functions depending on the
application ?
For example:

Key 108 DPOD_UP      // For scrolling up in a Browser application
Key 108 VOLUME_UP // For Volume increase in the a Multimetia application


Warm Regards,
Raghu

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



Remapping Key Functions

by Mark Murphy » Tue, 06 Jan 2009 01:28:21 GMT


 


Implement onKeyDown() or similar methods in your activities.

-- 
Mark Murphy (a Commons Guy)
 http://commonsware.com 
_The Busy Coder's Guide to Android Development_ Version 1.9 Published!

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


Sponsored Links


Other Threads

1. intents getting incrementing each time received?

Hi all,

I have started using custom intents in my application and I have come
across a bit of a problem.

When I send a custom intent I register a Broadcast Receiver and I
catch the intent no problem.

However problems seem to appear when I send the intent again, the
Broadcast Reciever seems to register two events of the intent and so
on so if the intent is sent a third time I recieve it 3 times.

This is causing major problems in my application and was wondering is
it normal and there is some way I have to deal with it?

Here is my code:

To Send the Intent:

Intent i = new Intent();
i.setAction(SIP_INCOMING_CALL_CANCEL_INTENT);
sendBroadcast(i);

To receive the Intent:

sipIncomingListener = new BroadcastReceiver(){

@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();

if(CallDialogActivity.SIP_INCOMING_CALL_ANSWER_INTENT.equals(action)){

Log.d("SIPENGINE", "CALL CONNECTED SENT FROM INITINCOMINGLISTENER()");

      }
};
IntentFilter filter = new
IntentFilter(CallDialogActivity.SIP_INCOMING_CALL_CANCEL_INTENT);
registerReceiver(sipIncomingListener, filter);

Is there anyway to make sure the Intent is only fired once??

-- 

2. data cepet abis di jakart

Kebiasaan di Bali yang 3Gnya ga stabil jadi saya cuman pake Edge aja,
speednya sesabarnya. Begitu landing di jakarta wiken kemaren, langsung set
3G idup terus dan memang kuenceng banget. Tapi ya konsekuensinya paket data
internet prabayar IM3 yang mingguan abis dalam 2 hari doang.

Nanya dong, sama Jakartans, berarti pada pake yang bulanan 2 gitu yah?

http://www.indosat.com/IM3

-- 
I design kickass websites - http://priapurnama.me/

-- 
"Indonesian Android Community [id-android]" 

3. Segmentation fault while running a sample application which is dynamically linked to Android OpenGL libraries

4. Why is English the only Locale my Phone has in Settings

5. after referring the group锛宼ouch screen can only respond at top bar

6. Koprol apps for Android

7. Kalo Goole Earth Di HTC Magic Jalan ga yah? saya make Eclair 2.1...