Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

I want to use "ConsumerIrService" in Xamarin.Forms

$
0
0

mCIR = (ConsumerIrManager)GetSystemService(Context.ConsumerIrService);

I have been using this in Xamarin.Android but recently I needed to use this in Xamarin.Forms but it is throwing this error "Error CS0103 The name 'GetSystemService' does not exist in the current context"

Just found out that if "GetSystemService" is called in MainActivity then it works but if it is called in any other class then it throws error as mentioned above.

Can someone please guide me what am I missing here?

Thanks in advance.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>