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 7435777
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T10:07:55+00:00 2026-05-29T10:07:55+00:00

I wanted to start a service from a Broadcast reciever which takes android.intent.action.BOOT_COMPLETED. When

  • 0

I wanted to start a service from a Broadcast reciever which takes “android.intent.action.BOOT_COMPLETED”. When I write click on the Application in eclipse and launch it It runs well. But when I launch it from emulator on which it has already been installed, the application crashes. The following are the source codes.

AndroidManifest

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.android.newsreader"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
    android:minSdkVersion="13"
    android:targetSdkVersion="15" />
<supports-screens
    android:largeScreens="true"
    android:normalScreens="true"
    android:smallScreens="true"
    android:xlargeScreens="true" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<application
    android:icon="@drawable/icon"
    android:label="@string/app_name"
    android:logo="@drawable/logo"
    android:theme="@style/NewsReaderStyle" >

    <receiver
        android:name=".StartupIntentReceiver"
        android:enabled="true"
        android:permission="android.permission.RECEIVE_BOOT_COMPLETED" >
        <intent-filter>
            <action android:name="android.intent.action.BOOT_COMPLETED" />
            <category android:name="android.intent.category.DEFAULT" />
        </intent-filter>
    </receiver>
    <service android:name=".LoadFeedsService" ></service>

    <activity
        android:name=".NewsReaderActivity"
        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=".ArticleActivity"
        android:theme="@style/NewsReaderStyle_NoActionBar" />
</application>
<uses-permission android:name="android.permission.INTERNET" />
</manifest>*

and my BroadCast reciever is

*package com.example.android.newsreader;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
public class StartupIntentReceiver extends BroadcastReceiver{
@Override
public void onReceive(Context context, Intent intent) {
    Log.i("reciever", "recieved intent"+ intent);
    Intent serviceIntent = new Intent(context, LoadFeedsService.class);

    context.startService(serviceIntent);
}
 }*

Thanks in Advance.

  • 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-05-29T10:07:56+00:00Added an answer on May 29, 2026 at 10:07 am

    Modify your receiver code as below and try.

        <receiver
            android:name=".StartupIntentReceiver"
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
                <category android:name="android.intent.category.HOME" />
            </intent-filter>
        </receiver>
    

    If the above modification is not working modify service also as below and try.

    <service 
        android:name=".LoadFeedsService">
        <intent-filter >
            <action android:name="testapp.BACKGROUND_SERVICE" />                
        </intent-filter>            
    </service>
    

    In java code of receiver modify as below.

    Intent serviceIntent = new Intent("testapp.BACKGROUND_SERVICE");
    

    I hope it may help you.

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

Sidebar

Related Questions

I wanted to develop Location Based Service in J2me which has to start automatically
If you wanted to start a 'website' that could be accessible from multiple 'endpoints'.
I got the Wrox.Beginning.JavaScript.3rd.Edition and wanted to start learning it from scratch, then my
I am trying to use Swing Timer and I wanted to start from a
I wanted to start using the Amazon Simple Notification Service ( http://aws.amazon.com/sns/ ), but
My problem is multi-layered. I wanted to write a windows service that executes a
I understand you can create a service in Android and start it up on
Can anyone tell me which all Intent Actions are there in Android. I couldn't
I have an IIS7 web application which primarily serves web service requests. As part
For quite a long time I've wanted to start a pet project that will

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.