To show a so called floating notification, app must have the permission SYSTEM_ALERT_WINDOW.
A permission is something given by the user. So, there is no way to enable them by default from the app. What you can do is to take user to the settings page.
Check if you already have the permission
The recommended way to do this is using Settings#canDrawOverlays(Context).This permission is introduced only in API level 23. Therefore as per doc, it there is no need to check the permission in older devices.
However it is seen that this won't work well as expected in some pre-Marshmallow devices like Xiaomi Mi 2. So is better to do it as shown in this post.
Take user to the settings page if there is no permission
If the app targets API level 23 or higher, the app user must explicitly grant this permission to the app through a permission management screen. The app requests the user's approval by sending an intent with action Settings.ACTION_MANAGE_OVERLAY_PERMISSION.
Intent intent = new Intent();
intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS);
intent.addCategory(Intent.CATEGORY_DEFAULT);
intent.setData(Uri.parse("package:" + context.getPackageName()));
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
intent.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);
intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
context.startActivity(intent);