Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8022553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:17:42+00:00 2026-06-04T22:17:42+00:00

I`m having problems when trying to start a service on android start up, as

  • 0

I`m having problems when trying to start a service on android start up, as soon as the phone starts my app gives an error and has to stop it. Here it is:

part of my manifest:

<service
    android:name=".EventsNotificationService"
    android:label="EventsNotificationService">
    <intent-filter>
        <action
            android:name="it.bloomp.service.EventsNotificationService" />
    </intent-filter>
/service>

<receiver
    android:name=".receiver.StartEventsNotificationService"
    android:enabled="true"
    android:exported="true"
    android:label="StartEventsNotificationService">
    <intent-filter>
        <action
            android:name="android.intent.action.BOOT_COMPLETED" />
    </intent-filter>
</receiver>

my service:

package it.bloomp.service;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.widget.Toast;

public class EventsNotificationService extends Service {

    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        Toast.makeText(this,"Service created", Toast.LENGTH_LONG).show();
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        Toast.makeText(this,"Service destroyed", Toast.LENGTH_LONG).show();
    }

    @Override
    public void onStart(Intent intent, int startId) {
        super.onCreate();
        Toast.makeText(this,"Service started", Toast.LENGTH_LONG).show();
    }
}

my service starter:

package it.bloomp.service;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class StartEventsNotificationService extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        if ("android.intent.action.BOOT_COMPLETED".equals(intent.getAction())) {
            Intent serviceIntent = new Intent("it.bloomp.service.EventsNotificationService");
            context.startService(serviceIntent);
        }
    }
}

Also, this make the service start on start up, but how can I make it run all time?

EDIT:

The exceptions:

06-01 16:58:55.716: E/AndroidRuntime(483): FATAL EXCEPTION: main 06-01
16:58:55.716: E/AndroidRuntime(483): java.lang.RuntimeException:
Unable to instantiate receiver
it.bloomp.activity.receiver.StartEventsNotificationService:
java.lang.ClassNotFoundException:
it.bloomp.activity.receiver.StartEventsNotificationService 06-01
16:58:55.716: E/AndroidRuntime(483): at
android.app.ActivityThread.handleReceiver(ActivityThread.java:2100)
06-01 16:58:55.716: E/AndroidRuntime(483): at
android.app.ActivityThread.access$1500(ActivityThread.java:123) 06-01
16:58:55.716: E/AndroidRuntime(483): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1197)
06-01 16:58:55.716: E/AndroidRuntime(483): at
android.os.Handler.dispatchMessage(Handler.java:99) 06-01
16:58:55.716: E/AndroidRuntime(483): at
android.os.Looper.loop(Looper.java:137) 06-01 16:58:55.716:
E/AndroidRuntime(483): at
android.app.ActivityThread.main(ActivityThread.java:4424) 06-01
16:58:55.716: E/AndroidRuntime(483): at
java.lang.reflect.Method.invokeNative(Native Method) 06-01
16:58:55.716: E/AndroidRuntime(483): at
java.lang.reflect.Method.invoke(Method.java:511) 06-01 16:58:55.716:
E/AndroidRuntime(483): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
06-01 16:58:55.716: E/AndroidRuntime(483): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 06-01
16:58:55.716: E/AndroidRuntime(483): at
dalvik.system.NativeStart.main(Native Method) 06-01 16:58:55.716:
E/AndroidRuntime(483): Caused by: java.lang.ClassNotFoundException:
it.bloomp.activity.receiver.StartEventsNotificationService 06-01
16:58:55.716: E/AndroidRuntime(483): at
dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
06-01 16:58:55.716: E/AndroidRuntime(483): at
java.lang.ClassLoader.loadClass(ClassLoader.java:501) 06-01
16:58:55.716: E/AndroidRuntime(483): at
java.lang.ClassLoader.loadClass(ClassLoader.java:461) 06-01
16:58:55.716: E/AndroidRuntime(483): at
android.app.ActivityThread.handleReceiver(ActivityThread.java:2095)
06-01 16:58:55.716: E/AndroidRuntime(483): … 10 more

EDIT2:

My manifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="it.bloomp.activity"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />    
    <uses-permission android:name="android.permission.INTERNET" />

    <uses-sdk
        android:minSdkVersion="4"
        android:targetSdkVersion="15" />

    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@android:style/Theme.NoTitleBar" >
        <activity
            android:name=".EventsListActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity
            android:name=".EventActivity"/>

        <service android:name=".EventsNotificationService" android:label="EventsNotificationService">
            <intent-filter>
                <action android:name="it.bloomp.service.EventsNotificationService" />
            </intent-filter>
        </service>

        <receiver
            android:name=".StartEventsNotificationService"
            android:enabled="true"
            android:exported="true"
            android:label="StartEventsNotificationService">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
        </receiver>

    </application>

</manifest>

My service:

package it.bloomp.service;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.widget.Toast;

public class EventsNotificationService extends Service {

    @Override
    public IBinder onBind(Intent intent) {
        return null;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        System.out.println("Service created.");
    }

    @Override
    public void onDestroy() {
        super.onDestroy();
        System.out.println("Service destroyed.");
    }

    @Override
    public void onStart(Intent intent, int startId) {
        super.onCreate();
        System.out.println("Service started.");
    }
}

My service starter:

package it.bloomp.service;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

public class StartEventsNotificationService extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        if ("android.intent.action.BOOT_COMPLETED".equals(intent.getAction())) {
            Intent serviceIntent = new Intent("it.bloomp.service.EventsNotificationService");
            context.startService(serviceIntent);
        }
    }
}

My exceptions:

06-03 15:37:36.142: E/AndroidRuntime(479): FATAL EXCEPTION: main 06-03
15:37:36.142: E/AndroidRuntime(479): java.lang.RuntimeException:
Unable to instantiate receiver
it.bloomp.activity.StartEventsNotificationService:
java.lang.ClassNotFoundException:
it.bloomp.activity.StartEventsNotificationService 06-03 15:37:36.142:
E/AndroidRuntime(479): at
android.app.ActivityThread.handleReceiver(ActivityThread.java:2100)
06-03 15:37:36.142: E/AndroidRuntime(479): at
android.app.ActivityThread.access$1500(ActivityThread.java:123) 06-03
15:37:36.142: E/AndroidRuntime(479): at
android.app.ActivityThread$H.handleMessage(ActivityThread.java:1197)
06-03 15:37:36.142: E/AndroidRuntime(479): at
android.os.Handler.dispatchMessage(Handler.java:99) 06-03
15:37:36.142: E/AndroidRuntime(479): at
android.os.Looper.loop(Looper.java:137) 06-03 15:37:36.142:
E/AndroidRuntime(479): at
android.app.ActivityThread.main(ActivityThread.java:4424) 06-03
15:37:36.142: E/AndroidRuntime(479): at
java.lang.reflect.Method.invokeNative(Native Method) 06-03
15:37:36.142: E/AndroidRuntime(479): at
java.lang.reflect.Method.invoke(Method.java:511) 06-03 15:37:36.142:
E/AndroidRuntime(479): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
06-03 15:37:36.142: E/AndroidRuntime(479): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) 06-03
15:37:36.142: E/AndroidRuntime(479): at
dalvik.system.NativeStart.main(Native Method) 06-03 15:37:36.142:
E/AndroidRuntime(479): Caused by: java.lang.ClassNotFoundException:
it.bloomp.activity.StartEventsNotificationService 06-03 15:37:36.142:
E/AndroidRuntime(479): at
dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
06-03 15:37:36.142: E/AndroidRuntime(479): at
java.lang.ClassLoader.loadClass(ClassLoader.java:501) 06-03
15:37:36.142: E/AndroidRuntime(479): at
java.lang.ClassLoader.loadClass(ClassLoader.java:461) 06-03
15:37:36.142: E/AndroidRuntime(479): at
android.app.ActivityThread.handleReceiver(ActivityThread.java:2095)
06-03 15:37:36.142: E/AndroidRuntime(479): … 10 more

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T22:17:43+00:00Added an answer on June 4, 2026 at 10:17 pm

    android:name=”.receiver.StartEventsNotificationService”

    probably should be

    android:name=”.StartEventsNotificationService”

    EDIT

    try this as your intent:

    Intent i = new Intent(context, EventNotificationService.class);

    also, you should update the error you received. It can’t be the same as what you have, given what you’ve shown from your manifest and service starter code. Try to read the errors yourself and follow where they point to, learning how to do that efficiently will save you tons of time on StackOverflow and will teach you a lot better than just asking others.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to use HTTPWebRequest to access a REST service, and am having problems
I am having problems trying to get a very simple ASP.Net application to start
I'm having problems trying to adjust the width of a column of a datagrid.
Hello I am new at Haskell and i'm having problems trying to get this
I'm having some problems trying to get the code below to output the data
I'm having some problems trying to perform a query. I have two tables, one
I've been having real problems trying to get a ruby script to run through
I am having real problems trying debug my code to malfunctioning print statements. I
Having problems with a small awk script, Im trying to choose the newest of
Just trying out Hibernate (with Annotations) and I'm having problems with my mappings. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.