flutter_callkit_incoming
flutter_callkit_incoming copied to clipboard
issue android 13
library flutter callkit incoming v 1.0.2 not showing to android. please give me a solution
I also facing an issue with Android 13 in android 13 crashing the application
but we can do one thing use an external package only for Android because Android support custom call notification so we can create our own notification for a call this is not an appropriate option but until the
flutter_callkit_incoming upgrade to Android 13 we can use the awesome_notification package
I had the same issue, but it turned out to be an issue with permissions. You have to manually request the notification permission on the latest version of Android:
final FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin =
FlutterLocalNotificationsPlugin();
await flutterLocalNotificationsPlugin
.resolvePlatformSpecificImplementation<
AndroidFlutterLocalNotificationsPlugin>()
?.requestPermission();
Hello, I cleared this solution this happened because in Android 13 for making a call you need to grant setting write permission what do you need?
you need to grant permission from the native side below this is the code
import android.app.Application;
import android.content.Intent;
import android.net.Uri;
import android.os.Build;
import android.provider.Settings;
public class App extends Application {
public void onCreate() {
super.onCreate();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
if (!Settings.System.canWrite(this)) {
Intent intent = new Intent(android.provider.Settings.ACTION_MANAGE_WRITE_SETTINGS);
intent.setData(Uri.parse("package:" + getPackageName()));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startActivity(intent);
}
}
}
}
You can use requestNotificationPermission when opening the app (before showing imcoming) in version 2.0.0+2
I tried to call this requestNotificationPermission, but my app seems just to be stuck there
Any solution for this?
tried to call requestNotificationPermission, but my app just to be stuck there