| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
The Firebase Cloud Messaging Test Application (testapp) demonstrates receiving Firebase Cloud Messages using the Firebase Cloud Messaging C++ SDK. This application has no user interface and simply logs actions it's performing to the console.
Link your iOS app to the Firebase libraries.
$ sudo gem install CocoaPods --pre
$ pod install
$ open testapp.xcworkspace
Register your iOS app with Firebase.
Download the Firebase C++ SDK linked from https://firebase.google.com/docs/cpp/setup and unzip it to a directory of your choice.
Add the following frameworks from the Firebase C++ SDK to the project:
In XCode, build & run the sample on an iOS device or simulator.
The testapp has no user interface. The output of the app can be viewed via the console. In Xcode, select View --> Debug Area --> Activate Console from the menu.
Register your Android app with Firebase.
Create a new app on firebase.google.com/console , and attach your Android app to it.
You can use "com.google.android.messaging.testapp" as the Package Name while you're testing.
To generate a SHA1 run this command (Note: the default password is 'android'):
Mac and Linux:
keytool -exportcert -list -v -alias androiddebugkey -keystore ~/.android/debug.keystore
Windows:
keytool -exportcert -list -v -alias androiddebugkey -keystore %USERPROFILE%\.android\debug.keystore
If keytool reports that you do not have a debug.keystore, you can create one with:
keytool -genkey -v -keystore ~/.android/debug.keystore -storepass android -alias androiddebugkey -keypass android -dname "CN=Android Debug,O=Android,C=US"
Add the google-services.json file that you downloaded from Firebase console to the root directory of testapp. This file identifies your Android app to the Firebase backend.
For further details please refer to the general instructions for setting up an Android app with Firebase.
Download the Firebase C++ SDK linked from https://firebase.google.com/docs/cpp/setup and unzip it to a directory of your choice.
Configure your SDK paths
Run this command in the project directory, and modify the path to match your local installation path:
> echo "systemProp.firebase_cpp_sdk.dir=/User/$USER/firebase_cpp_sdk" >> gradle.properties
Build & Run
curl --header "Authorization: key=<Server Key>" --header "Content-Type: application/json" https://android.googleapis.com/gcm/send -d '{"notification":{"title":"Hi","body":"Hello from the Cloud"},"data":{"score":"lots"},"to":"<Registration Token>"}'
https://firebase.google.com/support/
Copyright 2016 Google, Inc.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
| Back | FazBrowse Home | New Git URL |