-
Notifications
You must be signed in to change notification settings - Fork 1
Notification
Shine Chen edited this page Nov 5, 2019
·
1 revision
You have to set up a Firebase Cloud Messaging. Follow Firebase Document.
And setup your AndroidManifest.xml looks like
<!-- Or your custom message service -->
<service
android:name="com.imkit.sdk.firebase.IMFirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>- Subscribe
IMKit.subscribe(String token, IMRestCallback<Object> callback)| Parameter | Type | Required/Optional | Default Value | Description |
|---|---|---|---|---|
| token | String | Required | FCM Token |
- Unsubscribe
unsubscribe(IMRestCallback<Object> callback)| Parameter | Type | Required/Optional | Default Value | Description |
|---|
Create a strings resource such as imkit.xml and place into your project
zh-Hant
<resources>
<string name="im_loc_sticker">傳送了貼圖</string>
<string name="im_loc_image">傳送了照片</string>
<string name="im_loc_video">傳送了影片</string>
<string name="im_loc_audio">傳送了聲音訊息</string>
<string name="im_loc_location">傳送了位置訊息</string>
<string name="im_loc_file">傳送了檔案</string>
<string name="im_loc_joinRoom">加入聊天</string>
<string name="im_loc_leaveRoom">離開聊天</string>
<string name="im_loc_addMember">邀請 %1$s 加入</string>
<string name="im_loc_addMembers">邀請 %1$s 加入</string>
<string name="im_loc_deleteMember">將 %1$s 踢出</string>
</resources>