Forum Xamarin.Forms

How to access the Android Activity onUserInteraction() method from Xamarin.Forms

BogdanDuta.0082BogdanDuta.0082 ROMember
edited February 2015 in Xamarin.Forms

I'm using XF especialy for Android development and I need to launch a login page if the user doesn't interact with the app for more than X minutes.
For that I need to track the user interaction across the app. I searched and I found that that I need to override a method onUserInteraction in Activity class of the Android API. But I don't know how to get access to that method from XF.
I tried a custom renderer PageRenderer for class Page but I still don't know how to access the Activity class. Does anyone have any ideea?


  • MihaMarkicMihaMarkic SI ✭✭✭✭

    You should go the other way round. From MainActivity call into your Forms. And perhaps glue the two together using messages.

Sign In or Register to comment.