jailbreak - iOS touch event notifications (private API) -


This is possible, and you can get detailed system-wide notifications in the background using CTTelephonyCenterAddObserver and CFNotificationCenterAddObserver, eg: Although I do not find a way to get touch notifications in the background, do any "touch events" in the background? < Which can be used with a separate notification center, CFNentification Center ad observer, which Can be used, or approach completely different?

I am happy with low level contact information (such as X, Y coordinate and touch type), but high level information (like key pressed, back button pressed etc.) will be even better!

In the IOHID stuff to get x, y coordinates IOKit Can be used.

  #include & lt; IOHIDEventSystem.h & gt;   

Create IOHIDEventSystemClient:

  Zero * ioHideventSystem = IOHideventSystemClientCreate (KCFLocator default);   

Register the callback:

  IOHideventSystemClientScheduleWithRunLoop (ioHideventSystem, CFRunLoopGetCurrent (), KCFran Loop default mode); IOHIDEventSystemClientRegisterEventCallback (IOHideventSystem, handle_event, NULL, NULL);   

Unregister callback:

  IOHIDEventSystemClientUnregisterEventCallback (ioHideventSystem, handle_event, NULL, NULL); IOHIDEventSystemClientUsecheduleWithRunLoop (ioHideventSystem, CFRunLoopGetCurrent (), KCFran Loop Default Mode);   

callback:

  zero hand_events (zero * target, zero * refraction, IoHIDS service rif service, IOHID and RF event) {if (IOHIDIT and type type (event) = = Kihoedent Type Digitizer) {IOHIDFloat x = IOHIDEventGetFloatValue (Event, (IOHIDEventField) kIOHideventFieldDigitizerX); IOHIDFloat y = IOHIDEventGetFloatValue (event, (IOHIDEventField) kIOHideventFieldDigitizerY); Int width = [[USScreen main screen] limitations]. Shape. Width; Int height = [[UIScreen main screen] borders] .ize.height; NSLog (@ "Click:% F,% F", X * width, Y * height); }}   

In addition, you can check it out :. Hope this will be helpful.

Edit: See results from logs. Tested on iPhone 4 and 5.

  Zero Hendel_Avent (Zero * Target, Zero * Refraction, IOHIDSIRR Service, IOHIDITFF Event) {NSLog (@ "Handel_Event:% d", IOHIDIdentet (incident)); If (IOHIDEventGetType (event) == KIOHideventTypeDigitizer) {IOHIDFloat x = IOHIDEventGetFloatValue (event, (IOHIDEventField) kIOHideventFieldDigitizerX); IOHIDFloat y = IOHIDEventGetFloatValue (event, (IOHIDEventField) kIOHideventFieldDigitizerY); NSLog (@ "x% f: y% f", x, y); // 2013-03-28 10: 02: 52.169 MyOKIT [143: 907] Handl_Avent: 11 / 2013-03-28 10: 02: 52.182 MyOct [143: 907] x 0.766754: y 0.555023}}  < / Pre>  

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -