Switch GCM Client on Development and Production

后端 未结 2 742
忘了有多久
忘了有多久 2021-01-14 07:52

Just implement the new GCM. For official document,

Copy the google-services.json file you just downloaded into the app/ or mobile/ directory of your

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-14 08:43

    Base on my test switching build type or flavor, I noted that we should differentiate them as following:

    For Debugging:
    src/flavorDebug/google-services.json
    src/flavor/debug/google-services.json
    src/debug/flavor/google-services.json
    If all flavors use only one firebase project with different app ids:
    src/debug/google-services.json
    
    For Releasing:
    src/flavorRelease/google-services.json
    src/flavor/release/google-services.json
    src/release/flavor/google-services.json
    If all flavors use only one firebase project with different app ids:
    src/release/google-services.json
    
    Without flavor should be as the following:
    src/debug/google-services.json
    src/release/google-services.json
    
    With flavor but not separate build type:
    src/flavor/google-services.json
    
    For overall flavors and build types:
    src/google-services.json
    
    Note: flavor is referred to your flavor's name.
    

提交回复
热议问题