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

  • Home
  • SEARCH
  • 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 6894363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:46:24+00:00 2026-05-27T06:46:24+00:00

I have the same problem others have had, but I can’t get my code

  • 0

I have the same problem others have had, but I can’t get my code to work.

I have to java classes, Test.java and TestService.java and when I try to start Service or bind Service, I always get error listed above. I have tried the recommended standard solutions in here, but it didn’t work. I will try to rename the java files and start a new project to see if that works as noted in here.

Then I saw this link by Vogella that I have to have a google user registered on the device. Is that what my problem is or am I confusing the errors (maybe ‘intent.REGISTER’ refers to something else).

Any suggestions on this will be greatly appreciated.

4.3. Register your application

Run your application, maintain your registered user and press the
button. Check LogCat for the registration ID.

If you see the following message:

” Unable to start service Intent
{act=com.google.android.c2dm.intent.REGISTER … }: not found”

I’ve tried this, both on my phone and on the simulator.

Permissions:

<application android:icon="@drawable/gyroscopic" android:label="@string/app_name">
...
<activity android:name="Test"></activity>

<service android:name="TestService"></service>  
....
</application>
  • 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-27T06:46:24+00:00Added an answer on May 27, 2026 at 6:46 am

    Try using the entire package code for your service, that’s what I always do and it has always worked so far.

    <service
        android:enabled="true"
        android:name="com.mobowski.appfrag.service.MusicService" >
    </service>
    

    Edit for starting / binding to the service.

    I usually do this:

    Starting the service

    // This is in the onCreate of my main screen, but this would work in a button
    startService(
                new Intent(this, Service.class));
    

    In the service itself

    You will use this when binding to the service

    // Field of service
    private final IBinder mBinder = new MyBinder(); 
    
    // We return the binder class upon a call of bindService
        @Override
        public IBinder onBind(Intent arg0) {
            return mBinder;
        }
    
        public class MyBinder extends Binder {
            public MusicService getService() {
                return MusicService.this;
            }
        }
    

    Binding to the service

    For this I use several pieces of code that I took from an example once but they never failed me so far.

    private ServiceConnection mConnection = new ServiceConnection() {
    
            public void onServiceConnected(ComponentName className, IBinder binder) {
                s = ((MusicService.MyBinder) binder).getService();
                Toast.makeText(this, "Connected", Toast.LENGTH_SHORT)
                        .show();
                // Little Toast to make sure we connected
    
            }
    
            public void onServiceDisconnected(ComponentName className) {
                s = null;
            }
        };
    
        void doBindService() {
            bindService(
                new Intent(this,
                        MusicService.class), mConnection,
                Context.BIND_AUTO_CREATE);
    
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I actually have two questions regarding the same problem but I think it is
This is pretty much the same problem i have, except with very different code:
I'm sure someone's had this problem before but I can't figure it out because
I think my problem is a classic one, but I can't get the right
I have the same problem as described in the posts listed below. That is,
I have the same problem as described in ( Last record of Join table
I have the same problem as in the following post . So I am
Solution: if you have the same problem, addElement() instead of addChild() is what did
Does anyone have the same problem as I do? ... I've upgraded to the
I have essentially the same problem discussed here: http://khason.net/blog/dependency-property-getters-and-setters-in-multithreaded-environment/ public static readonly DependencyProperty MyPropertyProperty

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.