Samagra-Development / odk-collect-extension

ODK Collect is an Android app for filling out forms. ODK Collect Extensions is a layer on top of ODK Collect to make it easier to integrate inside existing Android apps.
https://docs.getodk.org/collect-intro
Apache License 2.0
5 stars 18 forks source link

Made google-services.json as optional file. #48

Closed 098suraj closed 1 year ago

098suraj commented 1 year ago

Fixes #43

What has been done to verify that this works as intended?

   I have built and tested the sample app for the basic functionalities and it seems to be working for all the current features. I 
  have also manually verified that the optional Google services JSON file is handled correctly and does not cause any issues or 
  crashes.

Why is this the best possible solution? Were any other approaches considered?

     For making the Google services JSON file optional, we need to check if it exists, and based on that, we apply plugins and 
    dependencies for the same. This is the best possible solution as it provides flexibility for developers to include or exclude 
    the file as needed, without causing any issues with the app.

How does this change affect users? Describe intentional changes to behavior and behavior that could have accidentally been affected by code changes. In other words, what are the regression risks?

     This change makes the Google services JSON file optional, which means that developers can choose to include or exclude 
    it as needed. This should not affect the behavior of the app in any significant way. However, there is a risk of regression if 
   the code changes inadvertently affect the handling of the optional file or if there are issues with the dependencies that are 
   included/excluded based on the presence of the file.
chinmoy12c commented 1 year ago

Hey @098suraj, are you planning to complete this?

098suraj commented 1 year ago

Hey @chinmoy12c, I have made a few changes kindly look into it. I have used getIdentifier to get the google app id as we can't check if google services json is available at runtime. So, I check for the google app id and if it is present, we can use FirebaseStorageHandler or GenericNetworkStorageHandler as a default case.