git ignore folder changes but still sync - android

I am working on an Android project that I sync with git. I imported Google and Facebook Sdks. I want the push to push the sdks so that they are shared, but not to track all the changes in the cache and such. Is there any way to do this?
Thanks

You need a .gitignore. You can add any number of rules to this file specifying files that git should ignore completely.
https://help.github.com/articles/ignoring-files

Related

How to transfer an android app containing firebase from one computer to another

I was creating an android app for a school project and i have integerated firebase into it. Later i realized that i should keep a seperate copy of my app on other computer.I once tried to copy and paste my app onto another computer and open it in android studio but it didnt go well.
Any ideas how to do this such that firebase database remains same.
Typically people use a source control tool such as git to store their project source code. Firebase has nothing to do with this.
Nothing changes when you copy project files to other machines. If you are using Firebase Authentication, you will also have to copy your debug signing keys, or add the SHA1 hash of your new key to the project in the console, but this has nothing to do with your project files.

how to implement one google-service.json file in to multiple android project

I working on a project that develops android .apk files using phone gap.
I use different them to manage my mobile app or when it builds the app I've changed its package id in my repo. I want to use push notification in all my generated apps. I can't manually add every time google-service.json in my repo or not wan go again and again on google console to add a new project with Package Id.
You should download each play-services.json files from each project and when you build your project you should add a script or a task to swap between the files.

How do I revert to the latest release version of my app for bug fixing?

After pushing an update in the playstore, I make lots of changes to the source code. But the problem is whenever a bug is reported through crashlytics, etc., the source code referenced is the unaltered release version which makes the line numbers in the crash report irrelevant.
So how do I check the latest release version?
I guess if you want to see exact error in exact line you can do following things.
Push to git/svn your app`s release version
Pull exact release version back to see error in exact line if you
changed that file in your current version
One of the way to solve it:
I recommend to know Git before reading the steps.
Use Git to track your source code (I hope you know Git, if you don't then I recommend to check it out)
Write your code.
Once code is done. Git Commit and Push your code.
Git tag your current code to refer later
Build APK and ship it.
Note: Keep the Git tag name and APK version same for your understanding.
Now when you face crashes in a particular version of your app. Let's say v1.1 then you can just find the Git tag named "v1.1" and see the code of that version and do what you want!

Connecting different Android project to an existing Google-Endpoints Backend

I am working on an Android project that needs three versions of the same application (for example: Admin version, User version, Custom version). I have already created a Google-App-Engine endpoints backend in the User version of the app. I have to start working on the other two versions now and I want to connect these two versions to the backend I created in the User version. I have tried finding the answer to this on the internet but I haven't been successful in doing so. I believe it is possible to connect the other versions of the app to the backend by importing the endpoint libraries from the cloud into the android projects somehow but I haven't been able to find a way to do so yet.
I did come across a way to import an existing module in the Android project but if I do that, then any time when I make changes to the backend in the "User" version, I will have to re-import the module in other versions of the app. I am so lost and confused.
Any help will be deeply appreciated.
Thank you!
After you build your cloud module there is a YOUR_CLOUD_MODULE_NAME-android-endpoints.jar under YOUR_CLOUD_MODULE_NAME/build/libs.
You can copy this jar into libs directory of all your android projects that need to interact with your back-end.
This approach makes it really easy to get out of sync though. After every change to back-end you would need to update the .jar in all dependent modules.
Are all of your Android applications in the same Android Studio project? If so I think you might be able to just add
compile project(path: ':{yourBackendModuleGoesHere}', configuration: 'android-endpoints')
to each of your Android apps build.gradle.
You could probably also make it work even if your backend is in a separate AndroidStudio project as long as they're part of the same gradle build.

Configure Firebase SDK in multivariant project

I tried to add Firebase to existing project with quite complex setup (2 variants, +2 dev) and was wondering, how google-services.json should be used? Is there manual way of adding service config? I had the same problem with GCM, it works fortunatelly but I spent quite some time digging on stackoverflow.
There's a new post on the Firebase blog about the relationships between apps and projects, and how that relates to your Android build variants. Hopefully it will demystify how things work. At the very least you should know that you can have all your Firebase apps defined in a single google-services.json that can apply to each of your variants (if they're all in the same project), or you can put a whole different google-services.json file in your project for each variant, if they are in different projects.
Do you use Android Studio?
You use Android Studio and Gradle and then
you can use google-services.josn file.
The google-services.json file is generally placed in the app/ directory (at the root of the Android Studio app module)
You can set both GCM and FCM .
The Google Services Gradle Plugin

Categories

Resources