Apply for Google FCM ( Firebase Cloud Message ) Project & Configure Android Project

Apply for Google FCM ( Firebase Cloud Message ) Project & Configure Android Project

First of All, you should make sure that your network of your personal computer is ok. And you have already Set network proxy (or VPN) for it.
1. Apply for a Google developer account.
2. Go to https://console.firebase.google.com/ and apply for a FCM project.
a. If you have already created google project before, please “Import Google Project”, else you should “Add Project”. Let’s add a new project. Just Click “Add Project”.
这里写图片描述
b. As the Picture shows below, you can create a new project.
这里写图片描述
这里写图片描述
3. Configure you project information in the google fcm server.
a. Fill in application Id and SHA1.
这里写图片描述
applicationId:
这里写图片描述
SHA1:
The link https://developers.google.com/android/guides/client-auth shows how to check SHA1.
4. Put FCM configs to your android project.
这里写图片描述
a. Download Google Play Service SDK for your project using Android SDK Manager.
b. Download google-services.json.
c. Switch your project file to the project view in the android studio.
d. Put google-services.json to the path “project/app/..”.
5. Put FCM SDK to the project.
这里写图片描述
The link https://firebase.google.com/docs/cloud-messaging/android/client?authuser=0 shows the steps to put the FCM SDK to your project.

Since you have finished all the steps above, you can now send push notification message by Google FCM platform, and receive the message in your app.
Let us take a look at how to send and receive msg.

6. When you build the project added FCM, you install and open it in your android mobile, you will get a device token from google. Such as :
“cews6-oHPMQ:APA91bEas_LUZFej5kexFxjiuYxSPfIDbD9Q7TcPtCGdb0rot6kSaVwYjSDw3w3kadovBRxpZ4fbJ5W1p0_mMXqQtUU_ywO8MfQY5kumtD1r5AcNme-63xb4TkzbckAp1ByH0khgfPg7”. Save it and it will be used to send push notification to single device.
这里写图片描述
7. Since you get the token, you can send single test message with it, let us have a look at how to send PN message.
这里写图片描述
这里写图片描述
As the pictures shown above, you only need to step by step do it.
8. Message sent ? OK, let us check a check the app in your mobile, you can see that like below:
这里写图片描述这里写图片描述

Could you also see this in your side ? Congratulations! You have already add the Google FCM to your project.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值