Editor presents legacy Android push settings as active Firebase configuration
- Dominant language
- C++
- Stars
- 6.3k
- Forks
- 455
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 129
Description
**Describe the bug (REQUIRED)**
`extension-push` reads `android.gcm_sender_id` and `android.fcm_application_id`, passes them to Java, and checks whether they are empty. However, their values are not used to configure Firebase; `getToken()` uses `google-services.xml`. The empty checks also incorrectly use `== ""` instead of `.isEmpty()`.
It is therefore unclear whether these settings are required or obsolete.
Relevant code:
- https://github.com/defold/extension-push/blob/master/extension-push/src/push_android.cpp#L511-L517
- https://github.com/defold/extension-push/blob/master/extension-push/src/java/com/defold/push/Push.java#L417-L427
**To Reproduce (REQUIRED)**
1. Configure Firebase using `google-services.xml`.
2. Leave both project settings empty.
3. Call `push.register()`.
**Expected behavior (REQUIRED)**
Since current extension-push uses google-services.xml, remove these reads and checks from the extension and remove the corresponding Defold project settings.
**Defold version (REQUIRED):**
- 1.13.2
**Platforms (REQUIRED):**
- Platforms: Android
- OS: Android
- Device: Any
**Workaround (OPTIONAL):**
Set both fields while also providing `google-services.xml`.
Contributor guide
Research direction
Start with extension-push/src/push_android.cpp around lines 511-517 and extension-push/src/java/com/defold/push/Push.java around lines 417-427, then locate the corresponding Defold project settings. Reproduce registration with google-services.xml and both settings empty; done means the legacy reads and checks and their project settings are removed without affecting Firebase configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, cpp, firebase, java
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100