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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:21:43+00:00 2026-06-03T12:21:43+00:00

My goal is to make 3 apks (for a very specific solution, not for

  • 0

My goal is to make 3 apks (for a very specific solution, not for normal consumption):

  1. First contains the service, which starts at boot
  2. A client that uses this service
  3. Another client that uses this service

According to this site:
http://www.androidcompetencycenter.com/2009/06/start-service-at-boot/

I can to start a service just by knowing its name. However, this does not work:

// works
context.startService(new Intent(context, MyServiceMessenger.class));

// does not work
Intent serviceIntent = new Intent();
serviceIntent.setAction(MyService.SERVICE_CLASS_NAME);
context.startService(serviceIntent);

Needles to say the MyService.SERVICE_CLASS_NAME== mypackage.MyServiceMessenger.

My problem is on binding – where I need to bind to a service outside of my class.

// does not work
Intent intent = new Intent(context, MyService.SERVICE_CLASS_NAME);

// works
Intent intent = new Intent(context, MyServiceMessenger.class);

intent.putExtra("MESSENGER", messenger);        
context.bindService(intent, serviceConnection, Context.BIND_AUTO_CREATE);

When binding to the service by name, my serviceConnection is not been used at all, and I cannot send information to the service.

What am I missing?

Edit1:

I was missing an export in the manifest. You need to “export” it, and give it a name. I also gave permission to it. I am using the same string in my intent as the one in @@ .

<permission android:name="MyPermission"
    android:permissionGroup="android.permission-group.SYSTEM_TOOLS"
    android:protectionLevel="dangerous" />    
<uses-permission android:name="MyPermission" />    
<application ... >  
    <service
        android:name="service.MyServiceMessenger"
        android:exported="true"
        android:permission="MyPermission" >
        <intent-filter>
            <action android:name="**platinum8.service.P2PServiceMessenger**"></action>
        </intent-filter>
    </service>

</application>

EDIT 2:

I added an intent-filter with the same of the service name, and now my code seems to work.

  • 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-03T12:21:45+00:00Added an answer on June 3, 2026 at 12:21 pm

    Possibly you are missing an <intent-filter> on your <service> element, where you declare the <action> you are trying to have the service respond to, such as:

    <service android:name=".BshService">
      <intent-filter>
        <action android:name="com.commonsware.android.advservice.IScript" />
      </intent-filter>
    </service>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Goal: Make a decorator which can modify the scope that it is used in.
So... First, I should make my goal clear. My goal is to have an
Long time lurker, first time poster! Goal My ultimate goal is to make a
I'm very new to programming, so be gentle. My goal is to make a
The goal is to make the frequency not so dominating. Suppose A has an
My goal is to make a simple GUI which almost look like this attached
My goal is to make a layout that is 200% width and height, with
My goal here is to make a button. I want the text to sit
I'm re-writing alibrary with a mandate to make it totally allocation free. The goal
goal: I have the string 1234432144 I want to only replace the first 2

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.