Incoming Calls and extending the keycharactermap

by callingshotgun » Wed, 16 Apr 2008 22:54:52 GMT

Sponsored Links
 Hey all-  I've just now started ripping into building Android apps,
and it's a lot of fun-  But as extensive as the API documentation is,
there are a couple things that I can't quite tell if they're possible
or not, and I'd really like to utilize them for a some personal

1-  Is there a way to programmatically retrieve the number of an
incoming call?  I saw information on how to react to the event, but
there was nothing in there that gave the actual phone number.  This
may have been thought of before, but I was thinking about using the
incoming phone number to cross-ref with an online db of telemarketer
phone numbers, and maybe have the phone blink the background red or
something as a way of warning.  Really simple idea, could probably rig
it up via jabber (to a bot on a webserver that could handle the more
complex interactions with the database and just fire bac a result)-
But I'm missing that one critical component-  The actual phone number.

2-  I've been fooling around with an alternate keyboard layout-  Sort
of a mobile DVORAK for traditional 12-key keypads.  The idea on this
one would be to do away with the "abc,def,ghi" system and come up with
a mapping that minimizes the ungodly wait between letters when you
have to type, for instance, "fed", and the cursor has to blink a
couple times before moving to the next position.  Android seems like
an ideal match for this, if I could just somehow swap out the system
keymapping with my own-  But the documentation on keycharactermap
doesn't really give any pointers on how to create my own.  Is this
possible/undocumented?  Or is it something that Android hasn't/won't
open up to developers via the SDK?

Much appreciated:)


Incoming Calls and extending the keycharactermap

by Megha Joshi » Thu, 17 Apr 2008 18:57:21 GMT

 On Wed, Apr 16, 2008 at 3:54 PM, callingshotgun <[EMAIL PROTECTED]>

You cannot retrieve the incoming call number.

You may want to use an input method.  This is the thing that gets the '2'
keypress and tries to figure out if it's an A, B or C.  The one for the
qwerty key is very simple -- it uses the key character map.  We have basic
support for that now, via the InputMethod interface <> ;,
but we don't have support -- yet -- for supplying them system wide.  Right
now it has to be built into each app.


Sponsored Links

Incoming Calls and extending the keycharactermap

by callingshotgun » Fri, 18 Apr 2008 16:21:20 GMT

 Thanks for the info!  Do you know if there are any plans to support
pulling the incoming number in the future?


Other Threads

1. how do I extract an AttributeSet from an xml file

I would like to extend ViewFlipper, so that I can override some of the
functions.  I borrowed some code from the Flipper Demo in Murphy's
Busy Coders book.

I made my own class that extends it, but I have to pass in an
AttributeSet, when I instantiate it.  How do I get that from my xml?

Here is the original code:


Here is my new code:

AttributeSet myAttributeSet  = ??;
myExtendedViewFlipper flipper = new myExtendedViewFlipper ( this,


2. force orientation change?

Hi Jeffrey,

        Try       android:screenOrientation="portrait"      in the manifest.  
Is your groovy logo a three dimension barcode?


  ----- Original Message ----- 
  From: Jeffrey Blattman 
  Sent: Wednesday, September 02, 2009 2:30 PM
  Subject: [android-beginners] force orientation change?

  wondering if there is a way to force the screen orientation one way or the 
other ... regardless of the phone's actual orientation.




3. Want to graduate from android-beginners to android-developers

4. BitmapDrawable gravity ignored in ImageView???

5. Communicating with the gtalk app?

6. How to find out the width of a string when rendered using a certain text appearance?

7. Newbie questions (game framework + android market)