We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Xamarin accessibility service: Handle Numeric KeyPress

Thread ID:

Created:

Updated:

Platform:

Replies:

148074 Oct 4,2019 06:15 AM UTC Oct 7,2019 11:41 AM UTC Xamarin.Android 1
loading
Tags: General
Nitin Sawant
Asked On October 4, 2019 06:17 AM UTC

How do I Handle Physical Keyboard Numeric KeyPress in my accessiblity service, it seems I am missing something, the OnAccessibilityEvent method is not hitting when I press numeric keys on keyboard Here's my accesiblity serivice:
        public override void OnAccessibilityEvent(AccessibilityEvent e)
        {
            try
            {
                //if (e.PackageName == "livetvstream")
                //{
                    //final int eventType = event.getEventType();
                    //switch(eventType) {
                    //    case AccessibilityEvent.TYPE_VIEW_CLICKED:
                    //        do somthing
                    //        break;
                    //    case AccessibilityEvent.TYPE_VIEW_FOCUSED:
                    //        do somthing
                    //        break;
                    //}

                    Console.WriteLine("event type : " + e.EventType);

                    Console.WriteLine("content decription : " + e.ContentDescription);
                    Console.WriteLine("package name : " + e.PackageName);
                    Console.WriteLine("source : " + e.Source);
                    Console.WriteLine("window id : " + e.WindowId);
                    Console.WriteLine("event time : " + e.EventTime);

                    var strBuilderTxt = new StringBuilder();
                    foreach (var txt in e.Text)
                    {
                        strBuilderTxt.Append(txt);
                    }

                    Console.WriteLine("actual text : " + strBuilderTxt);
                //}
            }
            catch (Exception e2)
            {
                Console.WriteLine(e2.Message);
            }
        }

here's my git repo https://github.com/nitinjs/XamarinNumericPadAccessilbiity

Rachel A [Syncfusion]
Replied On October 7, 2019 11:41 AM UTC

Hi Nitin, 
 
Greetings from Syncfusion. 
 
We have analysed in your sample and found that you have used Button. Are you checking the key press events by replacing with numeric text box please confirm us on that? So, we can proceed further on this. 
 
Also, please find some of the helpful link below to know more information on accessibility service for key press events. 
 
 
Thanks, 
Rachel. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon