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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T02:37:06+00:00 2026-06-11T02:37:06+00:00

I have the problem that I’m receiving all the notifications in all the environments.

  • 0

I have the problem that I’m receiving all the notifications in all the environments. All the builds have currently the same package name. So only one build can be installed on the device at the same time. But I get then notifications targeting all builds (can be the correct one or one of the others).

I looked in the registration id and it’s always the same. The problem is probably that all the apps share the same package name?

The parameters I see for registeration are:

  1. Broadcast receiver in the manifest:

    <receiver android:name="com.google.android.c2dm.C2DMBroadcastReceiver" android:permission="com.google.android.c2dm.permission.SEND">
        <intent-filter>
          <action android:name="com.google.android.c2dm.intent.RECEIVE" />
          <category android:name="com.company.product" />
        </intent-filter>
        <intent-filter>
          <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
          <category android:name="com.company.product" />
      </intent-filter>
    </receiver>
    
  2. Permissions:

    <permission android:name="com.company.product.permission.C2D_MESSAGE"
    android:protectionLevel="signature"/>
    <uses-permission android:name="com.company.product.permission.C2D_MESSAGE"/>

  3. Registration method:

    Intent registrationIntent = new Intent(REQUEST_REGISTRATION_INTENT);
    registrationIntent.setPackage(GSF_PACKAGE);
    registrationIntent.putExtra(EXTRA_APPLICATION_PENDING_INTENT,
            PendingIntent.getBroadcast(getApplicationContext(), 0, new Intent(), 0));
    registrationIntent.putExtra(EXTRA_SENDER, "app@company.com");
    context.startService(registrationIntent);
    

What exactly do I have to change in order to receive only notifications targeted to the running app (environment)?

Additionally, if the problem is the package name, I don’t understand exactly why. Let’s say I login with debug version. Register with package name x. Now I register with production, also with package name x. Will I receive the notifications from debug, because it was registered previously with the same package name? Does this mean that if I never used/registered with debug version, I will never receive notifications from debug environment using production app?

  • 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-11T02:37:07+00:00Added an answer on June 11, 2026 at 2:37 am

    Currently, I have just renamed the package for DEBUG environment.So it’s like I’m having other app, it get’s pretty messy but …
    I don’t know if there is another solution , but I’ll be glad to find out 🙂

    EDIT: maybe it can be resolved from the third server party. I mean, at registration you can sent to your server a variable with value debug/staging/prod and it will put your device id in one of the 3 databases(one with app registered for debug , one for staging, one for prod)
    Please let me know what do you think about this!

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

Sidebar

Related Questions

I have a problem that occurs only in a production environment, deployed at heroku.
I have a problem that output string must be utf8-formatted, I am writing currently
I have one problem that I can't explain. Here is the code in main
I have a problem that I want you to help me, I am currently
I have the problem that an specific step in Ant can only be executed
I close form with form.Dispose() but i have problem that all opened MessageBoxes does
In a couple of scripts that I use I have problem that is intermittent.
I have a problem that I'm working on for quite some time now. I
I have a problem that has been driving me batty. I have code that
I have a problem that is getting embarrassingly out of hand. I'm working with

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.