If you‘d like to explore the Android code for Coinverse’s open app check out the GitHub page. Without the set up below, you can browse, listen on-the-go, and watch the newsfeed of audiocast and video content.
Coinverse Open App is the first audiocast app for cryptocurrency news.
For access to features requiring authentication such as saving and dismissing content, you’ll need to implement the 6 steps to set up a Firebase project outlined below. If that’s too much work you can download the latest release on Google Play.
Coinverse - cryptocurrency news, bitcoin, ethereum
Not on Android? - Subscribe for expansion updates @ bit.ly/coinverse-beta1.
- Download Coinverse Open app from GitHub and change Build Variant to
open. Note: For the purpose of this sample, the
openAndroid Studio build variant connects to a Firestore database of content that is not actively updated.
- Add a project in Firebase and name it what you like. — Firebase console (console.firebase.google.com): Add project.
3. Add Coinverse Open Android app to Firebase project — Console: Settings > Add an Android app
a) Register app
- Android package name —
- Debug signing certificate SHA-1 (for user sign-in authentication)— Android Studio: Gradle window > Coinverse > Coinverse > Tasks > android > signingReport >
b) Download configuration file for the Firebase project and add to the Android project — Android Studio: Switch to Project menu view > coinverse > app > src > open > google-services.json
c) Rebuild the Android app in order for Android Studio to build the default instance of the Firebase project from the google-services.json values. — Android Studio > Build > Rebuild Project
4. Enable authentication — Console: Authentication > Set up sign-in method > enable Google Sign-in providers:
a) Toggle Enable button.
b) Project public-facing name — Anything you want
c) Project support email — Your email associated to Firebase
d) Add Application Homepage link (Otherwise you’ll receive a Google Sign In error 12500) — Console: Settings > Service accounts > Click on link under Other service accounts to open Google Cloud console > Apis & Services > Credentials > OAuth consent screen
I used https://github.com/AdamSHurwitz/Coinverse after adding github.com to the Authorized domains.
5. Enable Firestore Database in Firebase console
a) Rules — Start in test mode if only for your personal usage to test with.
b) Cloud Firestore location — nam5 (us-central) to keep consistent with shared Firebase project.
6. Enable YouTube API
a) Create your own YouTube API key. — Google Cloud console > APIs & Services > Library > YouTube Data API v3
b) In YouTubeFragment.kt pass your YouTube API key into
youTubePlayerFragment.initialize(...) as the first parameter.
Analytics based events involving content from the shared Firebase project will not work since the Firestore Security Rules will not accept authenticated users from a separate Firebase project.
Bonus — Enable Delete User Feature
In order to clear user data and start from scratch, simply delete your user’s Firestore Collection in the Firebase console under your project created.
If you want to be fancy, enable the delete user app functionality with the steps below:
- Enable a billing account for the Firebase project under console.cloud.google.com/billing.
- Setup a Cloud Functions project directory, then follow steps 2 – 3 of Get started: write and deploy your first functions.
- Install the firebase-tools library under the node_modules directory within the Cloud Functions directory —
npm install firebase-tools.
- Create a Firebase CI token from steps 2 – 3.
- Edit the index.js file with the
deleteUserfunction, slightly modified from the Delete Collections and Subcollections documentation, to meet the auth requirements of this configuration.
- Deploy the function to your project’s Firebase project’s Cloud Functions —
firebase deploy —-only functions.