|
3 | 3 | <img alt="CometChat" src="https://assets.cometchat.io/website/images/logos/banner.png">
|
4 | 4 | </p>
|
5 | 5 |
|
6 |
| -# Android Sample App by CometChat |
| 6 | +# Android Sample App with Push Notifications for Java by CometChat |
7 | 7 |
|
8 | 8 | This is a reference application showcasing the integration of [CometChat's Android UI Kit](https://www.cometchat.com/docs/ui-kit/android/5.0/overview) in a native Android application using Kotlin. It demonstrates how to implement real-time messaging and voice/video calling features with ease.
|
9 | 9 |
|
@@ -31,30 +31,26 @@ This is a reference application showcasing the integration of [CometChat's Andro
|
31 | 31 | git checkout v5
|
32 | 32 | ```
|
33 | 33 |
|
34 |
| -3. Open the project in Android Studio by navigating to the cloned directory and open the `sample-app-java+push-notification` folder. |
| 34 | +3. Sync Gradle to ensure all dependencies are downloaded. |
35 | 35 |
|
36 |
| -4. Sync Gradle to ensure all dependencies are downloaded. |
37 |
| - |
38 |
| -5. `[Optional]` Configure CometChat credentials: |
39 |
| - - Open the `AppCredentials.java` file located at `sample-app-java+push-notification/src/main/java/com/cometchat/sampleapp/java/fcm/AppCredentials.java` and enter your CometChat _`App ID`_, _`Region`_, and _`Auth Key`_: |
40 |
| - ```java |
41 |
| - public class AppCredentials { |
42 |
| - public static final String APP_ID = "YOUR_APP_ID"; |
43 |
| - public static final String REGION = "YOUR_REGION"; |
44 |
| - public static final String AUTH_KEY = "YOUR_AUTH_KEY"; |
45 |
| - } |
46 |
| - ``` |
47 |
| -6. Set up Firebase Cloud Messaging (FCM) by following the below steps |
| 36 | +4. `[Optional]` Enter your CometChat _`App ID`_, _`Region`_, and _`Auth Key`_ in the [AppCredentials.java](src/main/java/com/cometchat/sampleapp/java/fcm/AppCredentials.java) file: |
| 37 | + file:https://github.com/cometchat/cometchat-uikit-android/blob/b7b7c0d76eb70960728e6622ed7f70ab4e45b4af/sample-app-java%2Bpush-notification/src/main/java/com/cometchat/sampleapp/java/fcm/AppCredentials.java#L3-L11 |
| 38 | + |
| 39 | +5. Set up Firebase Cloud Messaging (FCM) by following the below steps |
48 | 40 | - Go to the [Firebase Console](https://console.firebase.google.com/) and create a project.
|
49 | 41 | - Add your Android app to the Firebase project and download the `google-services.json` file.
|
50 | 42 | - Place the `google-services.json` file in the `sample-app-java+push-notification/` directory of your project.
|
51 | 43 |
|
52 |
| -7. Set up CometChat Push Notification: |
| 44 | +6. Set up CometChat Push Notification: |
53 | 45 | - Go to the [Notification Documentation](https://www.cometchat.com/docs/notifications/push-integration) and follow integration steps.
|
| 46 | + - Note the provider id entered while configuring the Push Notifications in CometChat Dashboard. |
| 47 | + |
| 48 | +7. Update the provider id from the step 7 in [AppConstants.java](src/main/java/com/cometchat/sampleapp/java/fcm/utils/AppConstants.java) file:https://github.com/cometchat/cometchat-uikit-android/blob/aa63fc07e27822175f9cba03c789a0d08b367d01/sample-app-java+push-notification/src/main/java/com/cometchat/sampleapp/java/fcm/utils/AppConstants.java#L34-L36 |
| 49 | + |
| 50 | +8. In the Android Studio toolbar, select the `sample-app-java+push-notification` module from the module dropdown and run the project using an emulator or a physical device |
54 | 51 |
|
55 |
| -8. Run the project using an emulator or a physical device to build and run the sample app. |
56 | 52 |
|
57 | 53 |
|
58 | 54 | ## Help and Support
|
59 | 55 |
|
60 |
| -For issues running the project or integrating with our UI Kits, consult our [documentation](https://www.cometchat.com/docs/ui-kit/android/5.0/getting-started) or create a [support ticket](https://help.cometchat.com/hc/en-us). You can also access real-time support via the [CometChat Dashboard](http://app.cometchat.com/). |
| 56 | +For issues running the project or integrating with our UI Kits, consult our [documentation](https://www.cometchat.com/docs/ui-kit/android/5.0/getting-started) or create a [support ticket](https://help.cometchat.com/hc/en-us). You can also access real-time support via the [CometChat Dashboard](http://app.cometchat.com/). |
0 commit comments