Simply Clone the project from android-java-push-notifications-app repository and open in Android Studio. Build the Demo App and it will be ready to Run
To Run to sample App you have to do the following changes by Adding ApiKey and AppId
-
Go to Under java
-->com\inscripts\cometchatpro-->Constant
-
Under class
Constant.java
-
modify APP_ID and API_KEY with your own ApiKey and AppId
static final String API_KEY= "XXXXXXXXXXXXXX";
static final String APP_ID = "XXXXXXXXXXXXXX";
-
modify FCM_APPLICATION_ID and FCM_WEB_API_KEY wtih your
WEB_API_KEY
andAPPLICATION_ID
from your firebase consoleyou can get your Web API Key and App Id from your firebase console under -->Project Settings-->General
`static final String FCM_APPLICATION_ID="XXXXXXXXXXXXX";` `static final String FCM_WEB_API_KEY="XXXXXXXXXXXXXX";`
-
static final String UID
is UID of receiver -
static final String GUID
is GUID of joined group -
To enable push notifcation follow the instruction here How to Add Push Notification in Cometchat Pro
You can Obtain your APP_ID and API_KEY from CometChat-Pro Dashboard
For more information read CometChat-Pro Android SDK Documentation
You can Obtain fiyour FCM_APPLICATION_ID and FCM_WEB_API_KEY from Firebase Console
Feel free to make Pull Request.