Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/android/AndroidNotch.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ public boolean execute(final String action, final CordovaArgs args, final Callba
this.webView.getView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);
return true;
}

if ("isNotchSupported".equals("action")) {
return Build.VERSION.SDK_INT >= 28;
}

if(Build.VERSION.SDK_INT < 28) {

Expand Down
6 changes: 5 additions & 1 deletion www/notch.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ var AndroidNotch = {
hasCutout: function(success, error) {
run(success, error, "AndroidNotch", "hasCutout");
},

isNotchSupported: function(success, error) {
run(success, error, "AndroidNotch", "isNotchSupported");
},

setLayout: function(success, error) {
run(success, error, "AndroidNotch", "setLayout");
Expand All @@ -32,4 +36,4 @@ var AndroidNotch = {
};


module.exports = AndroidNotch;
module.exports = AndroidNotch;