Skip to content
This repository has been archived by the owner on Dec 1, 2022. It is now read-only.

Ability to pick up the GCM sender ID from the Android app's config #1

Closed
GoogleCodeExporter opened this issue Mar 17, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

Hi,

This feature request follows the discussion on the android-gcm mailing list 
here: https://groups.google.com/forum/?fromgroups#!topic/android-gcm/T0FFavXQcmA

------------------------------------------------------------
We have different Google API projects for different environments that we have - 
dev, test, prod. These were created for OAuth2 integration earlier and we are 
looking at enabling Google Cloud Messaging for all these projects and use them 
in respective environments (we want to use the environment specific project IDs 
to keep GCM statistics for these isolated).

So, we would like to have the ability to pick-up the sender ID (based on the 
env the APK is built for) from our Android client's config file instead of 
hard-coding it in the code.

The issue we are facing is that GCMBaseIntentService expects sender ID to be 
passed in its constructor, where the app context is not available, else I could 
have fetched the config using it.
------------------------------------------------------------

The above mentioned mailing-list suggests a code change that will help such 
use-cases.

Thanks for your support.

Original issue reported on code.google.com by roshanda...@gmail.com on 12 Jul 2012 at 4:29

@GoogleCodeExporter
Copy link
Author

Submitting a patch here - slightly improved version of the solution that was 
suggested on the mailing list.

Original comment by roshanda...@gmail.com on 13 Jul 2012 at 6:23

Attachments:

@GoogleCodeExporter
Copy link
Author

Fixed on 
http://code.google.com/p/gcm/source/detail?r=2f8f3795e6e7ae45be1f8856fcd5047fe04
1ada4

Will be available in the next released version.

Original comment by felip...@android.com on 13 Jul 2012 at 6:19

@GoogleCodeExporter
Copy link
Author

Fixed and released to SDK.

Original comment by felip...@android.com on 18 Jul 2012 at 11:21

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

Thank you!

Original comment by roshanda...@gmail.com on 19 Jul 2012 at 3:42

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant