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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:21:31+00:00 2026-06-06T13:21:31+00:00

I wrote some code that activity starts a service to get some text from

  • 0

I wrote some code that activity starts a service to get some text from URL, after the service done I want to get this parameters to activity back.

My code looks like this:

public class splash extends AsyncTask<String, Void, String> {

  private Context context; 
  private ProgressDialog Dialog; 
  protected config app;

  public splash(Context context){
      this.context=context;
      Dialog = new ProgressDialog(context);
  }

  protected String doInBackground(String... params) {
      //starts service number activite
      Intent serviceIntent = new Intent();
      serviceIntent.setAction("services.conServise");
      context.startService(serviceIntent);

I dont want to use global parameters and not a singleton

  • 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-06T13:21:33+00:00Added an answer on June 6, 2026 at 1:21 pm

    If you want to call the Service from your Activity, what you want is a bound service. It will bind your service to a variable, and you will be able to use that in the Activity.

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

Sidebar

Related Questions

I wrote some code that take a picture and I want to find the
I wrote some code in VHDL that is expected to look at a rotory
I've got some code that lies in a browser, and wrote C++ plugins for
I wrote some naive code(in the sense that it's synchronous calls) for a tableview
I have some python code that I wrote to convert a python list into
I am trying to write some code that will generate accurate .proto files from
I have some shared preferences (latitude, longitude) that I want to access from a
I wrote some code to ensure that my database will be updated properly when
I want to write some values from editText of activity in the file string.xml.
I wrote some code that should add database response to the List. it works

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.