Skip to content

Commit

Permalink
Updated READMEs (firebase#95)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonsongirang authored and samtstern committed Jul 27, 2016
1 parent 92979b9 commit 2370d9c
Show file tree
Hide file tree
Showing 11 changed files with 96 additions and 72 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@

A collection of quickstart samples demonstrating the Firebase APIs on Android. For more information, see https://firebase.google.com.

Samples available:

- [Admob](admob)
- [Analytics](analytics)
- [App-Indexing](app-indexing)
- [Auth](auth)
- [Configuration](config)
- [Crash](crash)
- [Database](database)
- [Dynamic Links](dynamiclinks)
- [Invites](invites)
- [Messaging](messaging)
- [Storage](storage)

## How to make contributions?
Please read and follow the steps in the [CONTRIBUTING.md](CONTRIBUTING.md)

Expand Down
4 changes: 2 additions & 2 deletions admob/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ AdMob by Google Quickstart
=======================

The AdMob by Google Android quickstart demonstrates how to display an interstitial ad and
a simple banner ad. AdRequest and AdView are used to display a banner ad
a banner ad. AdRequest and AdView are used to display a banner ad
and InterstitialAd is used to display the interstitial ad.

Introduction
Expand All @@ -17,7 +17,7 @@ Getting Started
- Run the sample on your Android device or emulator.
- The running sample displays a test banner ad and a test interstitial add.

Screenshots
Result
-----------
<img src="app/src/screen.png" height="534" width="300"/>

Expand Down
5 changes: 3 additions & 2 deletions analytics/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,15 @@ Getting Started
- [Add Firebase to your Android Project](https://firebase.google.com/docs/android/setup).
- Run the sample on Android device or emulator.

Screenshots
Result
-----------
<img src="app/src/screen.png" height="534" width="300"/>

Support
-------

https://firebase.google.com/support/
- [Stack Overflow](https://stackoverflow.com/questions/tagged/firebase-analytics)
- [Firebase Support](https://firebase.google.com/support/)

License
-------
Expand Down
14 changes: 6 additions & 8 deletions app-indexing/README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Firebase App Indexing Quickstart
==============================

The Firebase App Indexing Android quickstart demonstrates how to help get your app
found in Google Search. `AppIndex.AppIndexApi.view` is used to index view events.
The Firebase App Indexing Android quickstart demonstrates how to get your app to be found in Google Search.

Introduction
------------
Expand All @@ -14,19 +13,18 @@ Getting Started

- [Add Firebase to your Android Project](https://firebase.google.com/docs/android/setup).
- Open the App Indexing project in Android Studio.
- Run the sample on your Android device or emulator by issuing the following intent
with the command line `adb` tool:
adb shell am start -a android.intent.action.VIEW -d "http://www.example.com/articles/test" com.google.samples.quickstart.app_indexing
- Run the sample on your Android device or emulator by issuing the following command using **adb** tool:
`adb shell am start -a android.intent.action.VIEW -d "http://www.example.com/articles/test" com.google.samples.quickstart.app_indexing`

Screenshots
Result
-----------
<img src="app/src/screen.png" height="534" width="300"/>

Support
-------

- [Stack Overflow](http://stackoverflow.com/questions/tagged/android-app-indexing)
- [Firebase Support](http://firebase.google.com/support/)
- [Stack Overflow](https://stackoverflow.com/questions/tagged/android-app-indexing)
- [Firebase Support](https://firebase.google.com/support/)

License
-------
Expand Down
52 changes: 28 additions & 24 deletions auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,27 +17,29 @@ Getting Started
- Go to the [Firebase Console](https://console.firebase.google.com) and navigate to your project:
- Select the **Auth** panel and then click the **Sign In Method** tab.
- Click **Google** and turn on the **Enable** switch, then click **Save**.
- Run the app on your device or emulator.
- Select `GoogleSignInActivity` from the main screen.
- Run the sample app on your device or emulator.
- Select **GoogleSignInActivity** from the main screen.
- Click the **Sign In** button to begin.


### Facebook Login Setup

- Go to the [Facebook Developers Site](https://developers.facebook.com) and follow all
instructions to set up a new Android app. When asked for a package name, use
`com.google.firebase.quickstart.usermanagement` and when asked for a main class name,
instructions to set up a new Android app.
- When asked for a package name, use
`com.google.firebase.quickstart.usermanagement`.
- When asked for a main class name,
use `com.google.firebase.quickstart.usermanagement.FacebookLoginActivity`.
- Go to the [Firebase Console](https://console.firebase.google.com) and navigate to your project:
- Select the **Auth** panel and then click the **Sign In Method** tab.
- Click **Facebook** and turn on the **Enable** switch, then click **Save**.
- Enter your Facebook **App Id** and **App Secret** and click **Save**.
- Open the file `app/src/main/res/values/ids.xml` and replace the value of the `facebook_app_id` with the ID of the Facebook app you just created.
- Run the app on your device or emulator.
- Select `FacebookLoginActivity` from the main screen.
- Select the **FacebookLoginActivity** from the main screen.
- Click the **Sign In** button to begin.
- If you see text that says Facebook is disabled, make sure you are running
either the `facebookDebug` or `facebookRelease` variants of this sample.
either the **facebookDebug** or **facebookRelease** variants of this sample.


### Twitter Login Setup
Expand All @@ -48,15 +50,16 @@ Getting Started
- Go to the [Firebase Console](https://console.firebase.google.com) and navigate to your project:
- Select the **Auth** panel and then click the **Sign In Method** tab.
- Click **Twitter** and turn on the **Enable** switch, then click **Save**.
- Enter your Twitter **API Key** and **API Secret** and click **Save**.
- Copy the callback URL from the bottom of the panel (it should look like
- Enter your Twitter **Consumer Key** and **Consumer Secret** and click **Save**.
- Copy the callback URL from the bottom of the panel (Ex.
`https://<your-app-id>.firebaseapp.com/__/auth/handler`).
- Navigate back to your Twitter app settings on [apps.twitter.com](apps.twitter.com). Click the **Settings** tab and
- Navigate back to your Twitter app settings on [Twitter Developers Site](https://apps.twitter.com).
- Click the **Settings** tab and
paste in the callback URL from the Firebase console.
- Open the file `app/src/main/res/values/ids.xml` and replace the value of the `twitter_consumer_key`
and `twitter_consumer_secret` with the key and secret you just put into the Firebase console.
- Open the file `app/src/main/res/values/ids.xml` and replace the value of the **twitter_consumer_key**
and **witter_consumer_secret** with the key and secret you just put into the Firebase console.
- Run the app on your device or emulator.
- Select `TwitterLoginActivity` from the main screen.
- Select **TwitterLoginActivity** from the main screen.
- Click the **Log In with Twitter** button to begin.

### Email/Password Setup
Expand All @@ -65,38 +68,39 @@ Getting Started
- Select the **Auth** panel and then click the **Sign In Method** tab.
- Click **Email/Password** and turn on the **Enable** switch, then click **Save**.
- Run the app on your device or emulator.
- Select `EmailPasswordActivity` from the main screen.
- Select **EmailPasswordActivity** from the main screen.
- Fill in your desired email and password and click **Create Account** to begin.


### Custom Authentication Setup

- Go to the [Google Developers Console](https://console.developers.google.com/project) and navigate to your project:
- From the left "hamburger" menu navigate to the **API Manager** tab.
- Click on the **Credentials** item in the left column.
- Click **New credentials** and select **Service account key**. Select **New service account**,
pick any name, and select **JSON** as the key type. Then click **Create**.
- Click on the **Service accounts** tab in the left.
- Click on the **Create Service Account** on the top.
- Enter desired service account name and click on the **Create** button.
- Once the serivce account is created, click on the **Options**.
- Choose **JSON** as the key type then click on the **Create** button.
- You should now have a new JSON file for your service account in your Downloads directory.
- Open the file `web/auth.html` in your computer's web browser.
- Open the file `web/auth.html` using your web browser.
- Click **Choose File** and upload the JSON file you just downloaded.
- Enter any User ID and click **Generate**.
- Copy the text from the **ADB Command** section, you will need this.
- Copy the text from the **ADB Command** section. This will be required later on.
- Run the Android application on your Android device or emulator.
- Select `CustomAuthActivity` from the main screen.
- Run the text you copied from the **ADB Command** section of the web page in the steps above.
This should send a token to the running app and update the Custom Token field.
- Select **CustomAuthActivity** from the main screen.
- Run the text copied from the **ADB Command** section of the web page in the steps above. This will update the Custom Token field of the running app.
- Click **Sign In** to sign in to Firebase User Management with the generated JWT. You should
see the User ID you entered when generating the token.


Screenshots
Result
-----------
<img src="app/src/screen.png" height="534" width="300"/>

Support
-------

https://firebase.google.com/support/
- [Stack Overflow](https://stackoverflow.com/questions/tagged/firebase-authentication)
- [Firebase Support](https://firebase.google.com/support/)

License
-------
Expand Down
7 changes: 4 additions & 3 deletions config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,23 @@ Firebase Remote Config Quickstart
Introduction
------------

- [Read more about Firebase Remote Config](https://firebase.google.com/)
- [Read more about Firebase Remote Config](https://firebase.google.com/docs/remote-config/)

Getting Started
---------------

- [Add Firebase to your Android Project](https://firebase.google.com/docs/android/setup).
- Run the sample on Android device or emulator.

Screenshots
Result
-----------
<img src="app/src/screen.png" height="534" width="300"/>

Support
-------

https://firebase.google.com/support/
- [Stack Overflow](https://stackoverflow.com/questions/tagged/firebase-remote-config)
- [Firebase Support](https://firebase.google.com/support/)

License
-------
Expand Down
5 changes: 3 additions & 2 deletions crash/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Firebase Crash Quickstart
Introduction
------------

- [Read more about Firebase Crash](https://firebase.google.com/docs/crash)
- [Read more about Firebase Crash Reporting](https://firebase.google.com/docs/crash)

Getting Started
---------------
Expand All @@ -19,7 +19,8 @@ Screenshots
Support
-------

https://firebase.google.com/support/
- [Stack Overflow](https://stackoverflow.com/questions/tagged/firebase-crash-reporting)
- [Firebase Support](https://firebase.google.com/support/)

License
-------
Expand Down
10 changes: 6 additions & 4 deletions database/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,20 @@ Getting Started
---------------

- [Add Firebase to your Android Project](https://firebase.google.com/docs/android/setup).
- Go to the [Firebase Console](https://console.firebase.google.com)
- In the **Auth** tab enable **Email/Password** authentication.
- Log in to the [Firebase Console](https://console.firebase.google.com).
- Go to **Auth** tab and enable **Email/Password** authentication.
- Run the sample on Android device or emulator.

Screenshots
Result
-----------
<img src="app/src/screen.png" height="534" width="300"/>

Support
-------

https://firebase.google.com/support/
- [Stack Overflow](https://stackoverflow.com/questions/tagged/firebase-database)
- [Firebase Support](https://firebase.google.com/support/)


License
-------
Expand Down
19 changes: 10 additions & 9 deletions dynamiclinks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,25 @@ Getting Started
- [Add Firebase to your Android Project](https://firebase.google.com/docs/android/setup).
- Follow the [quickstart guide](https://firebase.google.com/docs/android/setup) to set up your project.
- Configure the sample:
- Replace the `app_code` value in `strings.xml` with your personal app code. If you don't have an app code, email your Google contact to begin the process.
- Replace the `applicationId` in `app/build.gradle` with the package name that matches your app code.
- Replace the **app_code** value in `strings.xml` with your personal **app code**. If you don't have an **app code**, email your Google contact to begin the process.
- Replace the **applicationId** in `app/build.gradle` with the package name that matches your app code.
- Run the sample on your Android device or emulator.
- Using the sample:
- When the application is started a deep link is generated using your app code. Click **Share**
to share this deep link to another application (like Google Keep).
- When the application is started the app checks if it was launched from a deep link. If so,
the link data is displayed under the **Receive** heading. Try sharing the deep link from the
app and then using that link to re-launch the application.
- When the application is started, a deep link will be generated using your app code.
- Click **Share**
to share this deep link to another application.
- The application checks if it was launched from a deep link. If so, the link data will be displayed under the **Receive** heading.
- Try sharing the deep link from the application and use that deep link to re-launch the application.

Screenshots
Result
-----------
<img src="app/src/screen.png" height="534" width="300"/>

Support
-------

https://firebase.google.com/support/
- [Stack Overflow](https://stackoverflow.com/questions/tagged/firebase-dynamic-links)
- [Firebase Support](https://firebase.google.com/support/)

License
-------
Expand Down
5 changes: 3 additions & 2 deletions invites/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@ Getting Started
- [Add Firebase to your Android Project](https://firebase.google.com/docs/android/setup).
- Run the sample on Android device or emulator.

Screenshots
Result
-----------
<img src="app/src/screen.png" height="534" width="300"/>

Support
-------

https://firebase.google.com/support/
- [Stack Overflow](https://stackoverflow.com/questions/tagged/firebase-invites)
- [Firebase Support](https://firebase.google.com/support/)

License
-------
Expand Down
33 changes: 17 additions & 16 deletions messaging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ Firebase Cloud Messaging Quickstart
==============================

The Firebase Cloud Messaging Android Quickstart app demonstrates registering
an Android app for Notifications and handling the receipt of a message.
InstanceID allows easy registration while FirebaseMessagingService and FirebaseInstanceIDService
an Android app for notifications and handling the receipt of a message.
**InstanceID** allows easy registration while **FirebaseMessagingService** and **FirebaseInstanceIDService**
enable token refreshes and message handling on the client.

Introduction
Expand All @@ -24,38 +24,39 @@ Use Firebase console to send FCM messages to device or emulator.

## Send to a single device

- From Firebase console Notification section, click New Message.
- From Firebase console Notification section, click **New Message**.
- Enter the text of your message in the Message Text field.
- Set the target to Single Device.
- Check the logs for the InstanceID token, copy and paste it into the Firebase console Token field.
If you cannot find the token in your logs, hit the LOG TOKEN button in the app and the token will
be logged in logcat.
- Click Send Message.
- Set the target to **Single Device**.
- Check the logs for the **InstanceID** token, copy and paste it into the Firebase console Token field.
- If you cannot find the token in your logs, click on the **LOG TOKEN** button in the application and the token will
be logged in **logcat**.
- Click on the **Send Message** button.
- If your application is in the foreground you should see the incoming
message printed in the logs. If it is in the background, a system notification should be
displayed, and when tapped should return to the quickstart app.
displayed. When the notification is tapped, the application should return to the quickstart application.

## Send to a topic

- From Firebase console Notification section, click New Message.
- From Firebase console Notification section, click **New Message**.
- Enter the text of your message in the Message Text field.
- Hit the SUBSCRIBE TO NEWS button to subscribe to the news topic.
- Set the target to Topic.
- Click on the **SUBSCRIBE TO NEWS** button to subscribe to the news topic.
- Set the target to **Topic**.
- Select the news topic from the list of topics. You must subscribe from the device or emulator
before the topic will will be visible in the console.
- Click Send Message.
- Click on the **Send Message** button.
- If your application is in the foreground you should see the incoming
message printed in the logs. If it is in the background, a system notification should be
displayed, and when tapped should return to the quickstart app.
displayed. When the notification is tapped, the application should return to the quickstart application.

Screenshots
Result
-----------
<img src="app/src/screen.png" height="534" width="300"/>

Support
-------

https://firebase.google.com/support/
- [Stack Overflow](https://stackoverflow.com/questions/tagged/firebase-cloud-messaging)
- [Firebase Support](https://firebase.google.com/support/)

License
-------
Expand Down

0 comments on commit 2370d9c

Please sign in to comment.