Coinverse
Published in

Coinverse

Coinverse Open App — Setup

6 Easy-ish Steps

Some mountain top, Emigrant Wilderness Trail, Yosemite, CA (2018)

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.

GitHub:

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.

Google Play:

Signed in features
  1. Download Coinverse Open app from GitHub and change Build Variant to open. Note: For the purpose of this sample, the open Android Studio build variant connects to a Firestore database of content that is not actively updated.
  2. Add a project in Firebase and name it what you like. — Firebase console (console.firebase.google.com): Add project.
Add a Firebase project dialog

3. Add Coinverse Open Android app to Firebase project — Console: Settings > Add an Android app

a) Register app

  • Android package nameapp.coinverse.open
  • Debug signing certificate SHA-1 (for user sign-in authentication)— Android Studio: Gradle window > Coinverse > Coinverse > Tasks > android > signingReport > SHA1: XX:XX:XX...
Generating an SHA-1 key in Android Studio
Registering Android app in Firebase project

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

Authentication set up

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

Accessing Google Cloud console from Firebase project

I used https://github.com/AdamSHurwitz/Coinverse after adding github.com to the Authorized domains.

Adding an Application Homepage link in Google Cloud Platform

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 locationnam5 (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

See: Obtaining authorization credentials.

b) In YouTubeFragment.kt pass your YouTube API key into youTubePlayerFragment.initialize(...) as the first parameter.

Note

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:

  1. Enable a billing account for the Firebase project under console.cloud.google.com/billing.
  2. Setup a Cloud Functions project directory, then follow steps 2 – 3 of Get started: write and deploy your first functions.
  3. Install the firebase-tools library under the node_modules directory within the Cloud Functions directory — npm install firebase-tools.
  4. Create a Firebase CI token from steps 2 – 3.
  5. Edit the index.js file with the deleteUser function, slightly modified from the Delete Collections and Subcollections documentation, to meet the auth requirements of this configuration.
  6. Deploy the function to your project’s Firebase project’s Cloud Functions — firebase deploy —-only functions.

I’m Adam Hurwitz, the creator of Coinverse. Download the app on Google Play, and follow Coinverse for more on Android engineering!

--

--

--

The Hub For Discovering Crypto News.

Recommended from Medium

Interview with a PRO user: Pamela O’Shea

Cinemachine 2D

Parallel Matrix Multiplication [C][Parallel Processing]

CS371 Fall 2020: Nathan Eisenberg

Universal Compilers

Why you should help other online

Azure Kubernetes Monitoring (AKS) with Prometheus

Why I’m Joining Alvin

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Adam Hurwitz

Adam Hurwitz

Open Sourcer

More from Medium

How Android updates work: A peek behind the curtains from an insider

Publish an android library opensource with Jitpack

Some pros of Moshi over Gson when using Kotlin for Android

Play different .wav files one after another