mouse pointer position

by Neel » Thu, 21 Jan 2010 21:57:17 GMT


Sponsored Links
 Hi,

I am trying to get the mouse pointer position from a native
application.
I found out that WindowManagerService maintains the mouse cursor
surface object.

Problem is, I am not able to find any interface or way to extract the
object or the relevant information anyhow.

Please Help. :(

Regards,
Neel.



mouse pointer position

by Yi Sun » Fri, 22 Jan 2010 01:48:18 GMT


 I don't know which mouse implementation you are using, the one made by
me simulate the touch event for mouse. So you only need to catch the
touch events as other apps do. And you will also need to catch the up
key and down key events for the mouse wheel.






-- 
Android-x86
 http://www.android-x86.org 


Sponsored Links


Other Threads

1. device doesnt start up and goes into a loop

Hi,
My HTC magic is running android 1.5.

It is not starting up and throwing the following exception and a
message saying every process is dead.

E/LockPatternKeyguardView( 6914): Failed to bind to GLS while checking
for accou
nt
D/dalvikvm( 6914): GC freed 777 objects / 62848 bytes in 145ms
D/PowerManagerService( 6914): system ready!
W/ResourceType( 6914): No package identifier when getting value for
resource num
ber 0x7f030003
W/ResourceType( 6914): No package identifier when getting value for
resource num
ber 0x7f030000
W/ResourceType( 6914): No package identifier when getting value for
resource num
ber 0x7f03000b
W/ResourceType( 6914): No package identifier when getting value for
resource num
ber 0x7f030000
W/ResourceType( 6914): No package identifier when getting value for
resource num
ber 0x7f030008
W/ResourceType( 6914): No package identifier when getting value for
resource num
ber 0x7f030003
D/ActivityManager( 6914): Start running!
I/Zygote  ( 6914): Process: zygote socket opened
I/ActivityManager( 6914): Start proc com.android.phone for added
application com
.android.phone: pid=6955 uid=1001 gids={3002, 3001, 3003}
D/AKMD    (   40): Compass OPEN
D/Sensors ( 6914): sensors=00000001, real=00000001
W/dalvikvm( 6914): threadid=37: thread exiting with uncaught exception
(group=0x
4000fe70)
E/AndroidRuntime( 6914): Uncaught handler: thread WindowManagerPolicy
exiting du
e to uncaught exception
E/AndroidRuntime( 6914): *** EXCEPTION IN SYSTEM PROCESS.  System will
crash.
E/AndroidRuntime( 6914): java.lang.NumberFormatException: Thu 7:00 AM
E/AndroidRuntime( 6914):        at java.lang.Long.parse(Long.java:368)
E/AndroidRuntime( 6914):        at java.lang.Long.parseLong(Long.java:
358)
E/AndroidRuntime( 6914):        at java.lang.Long.parseLong(Long.java:
323)
E/AndroidRuntime( 6914):        at java.lang.Long.valueOf(Long.java:
570)
E/AndroidRuntime( 6914):        at
com.android.internal.policy.impl.LockScreen.r
efreshAlarmDisplay(LockScreen.java:374)
E/AndroidRuntime( 6914):        at
com.android.internal.policy.impl.LockScreen.<
init>(LockScreen.java:205)
E/AndroidRuntime( 6914):        at
com.android.internal.policy.impl.LockPatternK
eyguardView.createLockScreen(LockPatternKeyguardView.java:474)
E/AndroidRuntime( 6914):        at
com.android.internal.policy.impl.LockPatternK
eyguardView.<init>(LockPatternKeyguardView.java:287)
E/AndroidRuntime( 6914):        at
com.android.internal.policy.impl.LockPatternK
eyguardViewProperties.createKeyguardView
(LockPatternKeyguardViewProperties.java:
48)
E/AndroidRuntime( 6914):        at
com.android.internal.policy.impl.KeyguardView
Manager.show(KeyguardViewManager.java:123)
E/AndroidRuntime( 6914):        at
com.android.internal.policy.impl.KeyguardView
Mediator.handleShow(KeyguardViewMediator.java:967)
E/AndroidRuntime( 6914):        at
com.android.internal.policy.impl.KeyguardView
Mediator.access$500(KeyguardViewMediator.java:86)
E/AndroidRuntime( 6914):        at
com.android.internal.policy.impl.KeyguardView
Mediator$2.handleMessage(KeyguardViewMediator.java:877)
E/AndroidRuntime( 6914):        at android.os.Handler.dispatchMessage
(Handler.ja
va:99)
E/AndroidRuntime( 6914):        at android.os.Looper.loop(Looper.java:
123)
E/AndroidRuntime( 6914):        at
com.android.server.WindowManagerService$Polic
yThread.run(WindowManagerService.java:474)
E/AndroidRuntime( 6914): Crash logging skipped, no checkin service
I/Process ( 6914): Sending signal. PID: 6914 SIG: 9
I/dalvikvm( 6955): De{*filter*} thread not active, ignoring DDM send
(t=0x41504e4d l
=38)
I/ServiceManager(   31): service 'usagestats' died
I/ServiceManager(   31): service 'batteryinfo' died
I/ServiceManager(   31): service 'activity' died
I/ServiceManager(   31): service 'activity.senders' died
I/ServiceManager(   31): service 'meminfo' died
I/ServiceManager(   31): service 'package' died
I/ServiceManager(   31): service 'activity.broadcasts' died
I/ServiceManager(   31): service 'SurfaceFlinger' died
I/ServiceManager(   31): service 'power' died
I/ServiceManager(   31): service 'content' died
I/ServiceManager(   31): service 'telephony.registry' died
I/ServiceManager(   31): service 'activity.services' died
I/ServiceManager(   31): service 'permission' died
I/AudioHardwareMSM72XX(   36): AudioHardware pcm playback is going to
standby.
I/ServiceManager(   31): service 'activity.providers' died
I/ServiceManager(   31): service 'hardware' died
I/ServiceManager(   31): service 'battery' died
I/ServiceManager(   31): service 'cpuinfo' died
I/ServiceManager(   31): service 'sensor' died
E/installd(   38): eof
E/installd(   38): failed to read size
I/installd(   38): closing connection
I/ServiceManager(   31): service 'alarm' died
I/ServiceManager(   31): service 'window' died
I/ServiceManager(   31): service 'bluetooth' died
I/ServiceManager(   31): service 'bluetooth_a2dp' died
I/ServiceManager(   31): service 'clipboard' died
I/ServiceManager(   31): service 'input_method' died
I/ServiceManager(   31): service 'netstat' died
I/ServiceManager(   31): service 'statusbar' died
I/ServiceManager(   31): service 'wifi' died
I/ServiceManager(   31): service 'connectivity' died
I/ServiceManager(   31): service 'notification' died
I/ServiceManager(   31): service 'mount' died
I/ServiceManager(   31): service 'devicestoragemonitor' died
I/ServiceManager(   31): service 'search' died
I/ServiceManager(   31): service 'wallpaper' died
I/ServiceManager(   31): service 'location' died
I/ServiceManager(   31): service 'audio' died
I/ServiceManager(   31): service 'appwidget' died
D/AndroidRuntime( 6955): Shutting down VM
W/dalvikvm( 6955): threadid=3: thread exiting with uncaught exception
(group=0x4
000fe70)
E/AndroidRuntime( 6955): Uncaught handler: thread main exiting due to
uncaught e
xception
E/AndroidRuntime( 6955): java.lang.NullPointerException
E/AndroidRuntime( 6955):        at android.app.ActivityThread.attach
(ActivityThr
ead.java:3899)
E/AndroidRuntime( 6955):        at android.app.ActivityThread.main
(ActivityThrea
d.java:3946)
E/AndroidRuntime( 6955):        at
java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime( 6955):        at java.lang.reflect.Method.invoke
(Method.java:5
21)
E/AndroidRuntime( 6955):        at com.android.internal.os.ZygoteInit
$MethodAndA
rgsCaller.run(ZygoteInit.java:782)
E/AndroidRuntime( 6955):        at
com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:540)
E/AndroidRuntime( 6955):        at dalvik.system.NativeStart.main
(Native Method)

E/AndroidRuntime( 6955): Error reporting crash:
java.lang.NullPointerException
E/AndroidRuntime( 6955):        at
com.android.internal.os.RuntimeInit.crash(Run
timeInit.java:302)
E/AndroidRuntime( 6955):        at com.android.internal.os.RuntimeInit
$UncaughtH
andler.uncaughtException(RuntimeInit.java:75)
E/AndroidRuntime( 6955):        at
java.lang.ThreadGroup.uncaughtException(Threa
dGroup.java:887)
E/AndroidRuntime( 6955):        at
java.lang.ThreadGroup.uncaughtException(Threa
dGroup.java:884)
E/AndroidRuntime( 6955):        at dalvik.system.NativeStart.main
(Native Method)

I/Process ( 6955): Sending signal. PID: 6955 SIG: 9
I/Zygote  ( 6913): Exit zygote because system server (6914) has
terminated


Any help is greatly aprreciated.

Regards.

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

2. 2.0 applicationCache in a WebView

I have a test html page with a manifest file declared like so:

<html manifest="test.manifest">

when I am in the browser (on Android 2.0) it retrieves the manifest
fine and responds appropriately.
when I am in a WebView inside a native app it does not even bother
retrieving the manifest.

is there a way to turn on applicationCache inside a WebView?

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

3. VideoView freezes, or VideoView directly calls OnCompletionListener

4. OpenGL and pause/resume

5. How to Replace of existing default Application by the Application created by me without user intervention

6. Behavior of Activity with FLAG_ACTIVITY_SINGLE_TOP

7. WebKit application cache