Monthly Archives: April 2022

Build a Google Firebase Web Application (Coursera)

I want to improve my Firebase skills, so I’ve started the Build a Google Firebase Web Application course on Coursera.

I’ve had to fix a problem halfway through – the instructor’s video shows one link in Firebase to “Database”, but the current version of Firebase splits the options into two – “Firestore Database” and “Realtime Database”.

Worse yet, the firebaseConfig object automatically created when setting up the project does not include a databaseURL property needed by firebase.initializeApp(firebaseConfig), causing the script to throw an error when run:

[2022-04-30T17:23:35.218Z]  @firebase/database: FIREBASE FATAL ERROR: Can't determine Firebase Database URL.  Be sure to include databaseURL option when calling firebase.initializeApp().

I was able to figure out the problem – copy the URL from the Realtime Database page in the Firebase console:
https://<PROJECT_NAME>-default-rtdb.firebaseio.com/

I then added it to the firebaseConfig object:

const firebaseConfig = {
  apiKey: "AIza...",
  authDomain: "<PROJECT_NAME>.firebaseapp.com",
  projectId: "<PROJECT_NAME>",
  storageBucket: "<PROJECT_NAME>.appspot.com",
  messagingSenderId: "12########06",
  appId: "1:12########06:web:84******************db",
  measurementId: "G-*********H",
  databaseURL: "https://<PROJECT_NAME>-default-rtdb.firebaseio.com/"
};

I then re-ran the script, and the database populated with the first test records. Woo-hoo!

Android development Guided Projects on Coursera

I’ve been working for Google for 3 1/2 years, but I’ve never done any Android development.

One of my work development goals this year is to build a mobile app using the Maps SDK for Android. I’m not challenging myself to build an app from scratch, because I’m not that interested in mobile app development. I just intend to build an app and extend it a little bit.

Happily, Coursera.org has a series of short Guided Projects on Android app building. These look like they’ll be just what I need to get some understanding of Android app development:

Projects in Series 1:

  1. Build a Simple App in Android Studio with Java
  2. Build a Persistent Storage App in Android Studio
  3. Build a Linear Layout App in Android Studio
  4. Build a Relative Layout App in Android Studio
  5. Build a Table Layout App in Android Studio

Projects in Series 2:

  1. Build an App in Android Studio using Resources
  2. Build an App in Android Studio using Static Files
  3. Build an App in Android Studio using Read – Write
  4. Build an App in Android Studio using onTouch
  5. Build an App in Android Studio using Activities

Projects in Series 3:

  1. Access CSV in an Android Studio Project
  2. Access SQLite in an Android Studio Project
  3. Access WebView in an Android Studio Project
  4. Access NFC in an Android Studio Project
  5. Access Maps in an Android Studio Project

There are a couple more Guided Projects outside this sequence that also look interesting: