Core button override

by djdan1...@gmail.com » Sat, 07 Mar 2009 10:53:27 GMT


Sponsored Links
 While in a call i would like to change the function of certain
buttons.  I have a service running that allows me to know when I'm in
call but i cannot get the onKeyDown function to work properly.  I have
gotten onKeyDown to work with activities and views.  Is this a
limitation of the function that it can't be used with services.  If
so, is there anyway to change what a button does such as the call
button or home button using a service?  Thanks for your help.

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



Other Threads

1. Maven Android Plugins: Masa 1.0 Released

I have moved the Maven Android plugins over to a code.google project
and have also hosted the plugins into a repo. You can read more
details here: http://www.jroller.com/random7/entry/maven_android_plugins_masa_1

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

2. stand-alone notepad content provider insert error

played around with the original notepad example. split the code into 2
apps as follows: app NotePad(com.google.android.notepad) contains
NoteEditor.java, NotesList.java and TitleEditor.java. app
NoteProvider(com.google.provider) contains NotePad.java and
NotePadProvider.java.

installed the NoteProvider using adb, then launched NotePad from
eclipse. got to the main screen(empty notes list) fine but when "Add
note" is pressed, i get an error "Unable to start activity
ComponentInfo {com.google.android.notepad/
com.google.android.notepad.NoteEditor}:
java.lang.NullPointerException."

what am i missing here, pls help. here is the logcat just in case:
I/ActivityManager(  517): Starting activity: Intent
{ action=android.intent.action.INSERT data=content://
com.google.provider.NotePad/notes comp={com.google.android.notepad/
com.google.android.notepad.NoteEditor} }
D/ActivityThread(  633): Performing launch of ActivityRecord{40047b00
[EMAIL PROTECTED] {com.google.android.notepad/
com.google.android.notepad.NoteEditor}}
D/dalvikvm(  633): Exception Ljava/lang/RuntimeException; from
ActivityThread.java:1758 not caught locally
D/dalvikvm(  633): Exception Ljava/lang/RuntimeException; from
ZygoteInit.java:1553 not caught locally
D/AndroidRuntime(  633): Shutting down VM
W/dalvikvm(  633): threadid=3: thread exiting with uncaught exception
(group=0x4000fdf8)
E/AndroidRuntime(  633): Uncaught handler: thread Main exiting due to
uncaught exception
E/AndroidRuntime(  633): java.lang.RuntimeException: Unable to start
activity ComponentInfo{com.google.android.notepad/
com.google.android.notepad.NoteEditor}: java.lang.NullPointerException
E/AndroidRuntime(  633):        at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
1758)
E/AndroidRuntime(  633):        at
android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
1770)
E/AndroidRuntime(  633):        at android.app.ActivityThread.access
$1500(ActivityThread.java:99)
E/AndroidRuntime(  633):        at android.app.ActivityThread
$H.handleMessage(ActivityThread.java:1271)
E/AndroidRuntime(  633):        at
android.os.Handler.dispatchMessage(Handler.java:80)
E/AndroidRuntime(  633):        at android.os.Looper.loop(Looper.java:
91)
E/AndroidRuntime(  633):        at
android.app.ActivityThread.main(ActivityThread.java:3052)
E/AndroidRuntime(  633):        at
java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(  633):        at
java.lang.reflect.Method.invoke(Method.java:356)
E/AndroidRuntime(  633):        at android.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:1547)
E/AndroidRuntime(  633):        at
android.os.ZygoteInit.main(ZygoteInit.java:1445)
E/AndroidRuntime(  633):        at
android.dalvik.NativeStart.main(Native Method)
E/AndroidRuntime(  633): Caused by: java.lang.NullPointerException
E/AndroidRuntime(  633):        at
android.content.ContentProviderProxy.insert(ContentProviderNative.java:
355)
E/AndroidRuntime(  633):        at
android.content.ContentResolver.insert(ContentResolver.java:287)
E/AndroidRuntime(  633):        at
com.google.android.notepad.NoteEditor.onCreate(NoteEditor.java:131)
E/AndroidRuntime(  633):        at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
847)
E/AndroidRuntime(  633):        at
android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
1728)
E/AndroidRuntime(  633):        ... 11 more
I/Process (  517): Sending signal. PID: 633 SIG: 3
I/dalvikvm(  633): threadid=7: reacting to signal 3
I/dalvikvm(  633): DALVIK THREADS:
I/dalvikvm(  633): "Main" prio=5 tid=3 NATIVE
I/dalvikvm(  633):   | group="main" sCount=1 dsCount=0 s=0
obj=0x40010450
I/dalvikvm(  633):   | sysTid=496 nice=0 sched=0/0 handle=-1090773764
I/dalvikvm(  633):   at android.os.BinderProxy.transact(Native Method)
I/dalvikvm(  633):   at
android.app.ActivityManagerProxy.handleApplicationError(ActivityManagerNative.java:
1441)
I/dalvikvm(  633):   at android.os.RuntimeInit.crash(RuntimeInit.java:
250)
I/dalvikvm(  633):   at android.os.RuntimeInit
$UncaughtHandler.uncaughtException(RuntimeInit.java:56)
I/dalvikvm(  633):   at
java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:853)
I/dalvikvm(  633):   at
java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:850)
I/dalvikvm(  633):   (break frame)
I/dalvikvm(  633):   at android.dalvik.NativeStart.main(Native Method)
I/dalvikvm(  633):   (break frame)
I/dalvikvm(  633):
I/dalvikvm(  633): "Binder Thread #2" prio=5 tid=13 NATIVE
I/dalvikvm(  633):   | group="main" sCount=1 dsCount=0 s=0
obj=0x4006e0b8
I/dalvikvm(  633):   | sysTid=647 nice=-10 sched=0/0 handle=1314440
I/dalvikvm(  633):   at android.dalvik.NativeStart.run(Native Method)
I/dalvikvm(  633):   (break frame)
I/dalvikvm(  633):
I/dalvikvm(  633): "Binder Thread #1" prio=5 tid=11 NATIVE
I/dalvikvm(  633):   | group="main" sCount=1 dsCount=0 s=0
obj=0x4005b688
I/dalvikvm(  633):   | sysTid=646 nice=-10 sched=0/0 handle=1311160
I/dalvikvm(  633):   at android.dalvik.NativeStart.run(Native Method)
I/dalvikvm(  633):   (break frame)
I/dalvikvm(  633):
I/dalvikvm(  633): "JDWP" daemon prio=5 tid=9 VMWAIT
I/dalvikvm(  633):   | group="system" sCount=1 dsCount=0 s=0
obj=0x40076990
I/dalvikvm(  633):   | sysTid=644 nice=0 sched=0/0 handle=1307712
I/dalvikvm(  633):   at android.dalvik.NativeStart.run(Native Method)
I/dalvikvm(  633):   (break frame)
I/dalvikvm(  633):
I/dalvikvm(  633): "Signal Catcher" daemon prio=5 tid=7 RUNNABLE
I/dalvikvm(  633):   | group="system" sCount=0 dsCount=0 s=0
obj=0x40024418
I/dalvikvm(  633):   | sysTid=640 nice=0 sched=0/0 handle=1296600
I/dalvikvm(  633):   at android.dalvik.NativeStart.run(Native Method)
I/dalvikvm(  633):   (break frame)
I/dalvikvm(  633):
I/dalvikvm(  633): "HeapWorker" daemon prio=5 tid=5 VMWAIT
I/dalvikvm(  633):   | group="system" sCount=1 dsCount=0 s=0
obj=0x400231b8
I/dalvikvm(  633):   | sysTid=637 nice=0 sched=0/0 handle=1294000
I/dalvikvm(  633):   at android.dalvik.NativeStart.run(Native Method)
I/dalvikvm(  633):   (break frame)
I/dalvikvm(  633):
W/ActivityManager(  517): Activity idle timeout for
HistoryRecord{401e48f0 {com.google.android.notepad/
com.google.android.notepad.NoteEditor}} ({com.google.android.notepad/
com.google.android.notepad.NoteEditor})
--~--~---------~--~----~------------~-------~--~----~

3. Android source isn't available ?????????

4. Android Developers Challenge!

5. different layout XML files in one application

6. How to connect to a server that runs on a localhost with the same eclipse program as the emulator?

7. Customize look of Menus