service starting from the main activity

I need your help please , service is started from main activity What could be the reason ?

MAİN ACTİVİTY.CS:
StartService(new Intent(this, typeof(BootCompletedNotificationReceiver)));

BootCompletedNotificationReceiver.CS:

[BroadcastReceiver]
[IntentFilter(new[] { Intent.ActionBootCompleted })]
class BootCompletedNotificationReceiver : BroadcastReceiver
{
public override void OnReceive(Context context, Intent intent)
{
if (intent.Action == Intent.ActionBootCompleted)
{
Toast.MakeText
(
context,
"Bildirim Oluşturma Hazır olucak merak etme...",
ToastLength.Long
).Show();
}
}

}

Sign In or Register to comment.