cometchat / cometchat-uikit-android

Ready-to-use Chat UI Components for Android
https://www.cometchat.com
44 stars 26 forks source link

java.lang.IllegalArgumentException: com.immigration_app: Targeting S+ (version 31 and above) #9

Closed mukeshocpc closed 2 years ago

mukeshocpc commented 2 years ago

Getting an error once a call is received in android.

Screenshot 2022-06-09 at 9 21 01 PM
darshanbhanushali commented 2 years ago

Hello,

We have fixed this issue and released our UI Kit. We suggest you please check the below link to know the changes and do the same in your OngoingService.javafile.

https://github.com/cometchat-pro/android-java-chat-ui-kit/blob/master/uikit/src/main/java/com/cometchat/pro/uikit/ui_components/calls/call_manager/ongoing_call/OngoingCallService.java#L52

mukeshocpc commented 2 years ago

It didn't solve the problem

Screenshot 2022-06-14 at 6 35 22 PM
darshanbhanushali commented 2 years ago

Hello,

Can you please create a NotificationChannel in your Application class and check again. As we are displaying notifications during the call, it is necessary to create a notification channel before displaying any notification.

Please add below code snippet in your Application class and call it inside onCreate() method.


 private void createNotificationChannel() {
        // Create the NotificationChannel, but only on API 26+ because
        // the NotificationChannel class is new and not in the support library
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
            CharSequence name = getString(R.string.app_name);
            String description = getString(R.string.channel_description);
            int importance = NotificationManager.IMPORTANCE_HIGH;
            NotificationChannel channel = new NotificationChannel("2", name, importance);
            channel.setDescription(description);
            // Register the channel with the system; you can't change the importance
            // or other notification behaviors after this
            NotificationManager notificationManager = getSystemService(NotificationManager.class);
            notificationManager.createNotificationChannel(channel);
        }

    }
mukeshocpc commented 2 years ago

Hi i have done the push notification setup getting success as well so as of now FCM key is added in comet portal and token is updated but still i am not getting push notification .

Screenshot 2022-06-15 at 9 43 02 PM
darshanbhanushali commented 2 years ago

Hello,

Can you please check the other steps like integrating Firebase into your app? To handle Push Notifications you need to create a FirebaseService which includes onMessageReceived(RemoteMessage message) method. This method gets triggered whenever a device receives any push notification. We suggest you to please check our MyFirebaseMessagingService file from our sample app for reference.

Also please check below documentation link to learn more about Push Notification Setup in Android App. https://www.cometchat.com/docs/extensions/android-push-notifications#android-app-setup