Forum Xamarin.Android

'RegisterReceiver' does not exist in the current context

blearibleari Member ✭✭
edited July 2018 in Xamarin.Android

I am trying to register a receiver in App.xaml.cs and continuously get errors.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Xamarin.Forms;

namespace WhaleWatch
    public partial class App : Application

        public App()

            MainPage = new WhaleWatch.MainPage();

        protected override void OnStart()
            // Handle when your app starts
            RegisterReceiver(bluetoothDeviceReceiver, new IntentFilter(BluetoothDevice.ActionFound));

Does anyone know why this is occurring?

Best Answer


  • blearibleari Member ✭✭

    Doesn't matter, I was in the wrong file.

Sign In or Register to comment.