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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:15:29+00:00 2026-06-06T09:15:29+00:00

I have two relatively simple codes. One main activity and one intent service. Main

  • 0

I have two relatively simple codes. One main activity and one intent service.

Main activity

public class IntentServiceTest1Activity extends Activity {
/** Called when the activity is first created. */

public class ResponseReceiver extends BroadcastReceiver {

public static final String ACTION_RESP =      
"com.mamlambo.intent.action.MESSAGE_PROCESSED";
@Override
public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub
TextView result = (TextView) findViewById(R.id.txt_result);       
String text = intent.getStringExtra(SimpleIntentService.PARAM_OUT_MSG);       
result.setText(text);
}
}
private ResponseReceiver receiver;

@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

IntentFilter filter = new IntentFilter(ResponseReceiver.ACTION_RESP);
filter.addCategory(Intent.CATEGORY_DEFAULT);
receiver = new ResponseReceiver();
registerReceiver(receiver, filter);

Button button = (Button) findViewById(R.id.button);
button.setOnClickListener(new OnClickListener(){
public void onClick(View v){
EditText input = (EditText) findViewById(R.id.txt_input);
String strInputMsg = input.getText().toString();
Intent msgIntent = new Intent(IntentServiceTest1Activity.this, SimpleIntentService.class);
msgIntent.putExtra(SimpleIntentService.PARAM_IN_MSG, strInputMsg);
startService(msgIntent);
}
});
}
}

Intent Service

public class SimpleIntentService extends IntentService {

public static final String PARAM_IN_MSG = "imsg";    
public static final String PARAM_OUT_MSG = "omsg";     
public SimpleIntentService() {        
super("SimpleIntentService");    
}
@Override
protected void onHandleIntent(Intent intent) {
// TODO Auto-generated method stub
String msg = intent.getStringExtra(PARAM_IN_MSG);        
SystemClock.sleep(30000); // 30 seconds        
String resultTxt = msg + " "            
+ DateFormat.format("MM/dd/yy h:mmaa", System.currentTimeMillis());

Intent broadcastIntent = new Intent();
broadcastIntent.setAction(ResponseReceiver.ACTION_RESP);
broadcastIntent.addCategory(Intent.CATEGORY_DEFAULT);
broadcastIntent.putExtra(PARAM_OUT_MSG, resultTxt);
sendBroadcast(broadcastIntent);
}
}

Logcat says the

    06-26 04:16:00.545: W/ActivityManager(67): Unable to start service Intent { 
cmp=com.intentservicetest1/.SimpleIntentService (has extras) }: not found

What can I do to correct this?

  • 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-06T09:15:30+00:00Added an answer on June 6, 2026 at 9:15 am

    Make sure you have Register IntentService in AndroidManifest.xml as:

    <service android:name=".SimpleIntentService" />
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a relatively simple query joining two tables. The Where criteria can be
I have a relatively simple algorithm that walks an std::vector looking for two neighbouring
I have a relatively simple web app, that allows the user to enter two
I have two relatively complex queries that I am trying to join together into
Have two actionsheet buttons and one modalviewcontroller on mainviewcontroller in application. Now for two
I have two tables. One is Employee_Mstr and other is EmployeeLeaveRequest_mstr . My data:
I have a relatively simple problem. I have a model named Item which I've
I have a number of relatively simple (auto-generated) graphs in graphviz dot format. These
I have two .csv files containing correlation matrices exported from R. One file contains
I have converted a relatively simple algorithm that performs a large number of calculations

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.