diff --git a/cordova-js-src/platform.js b/cordova-js-src/platform.js index a49ccfb61..aa197816a 100644 --- a/cordova-js-src/platform.js +++ b/cordova-js-src/platform.js @@ -41,6 +41,10 @@ module.exports = { // see the file under plugin/android/statusbar.js modulemapper.clobbers('cordova/plugin/android/statusbar', 'window.statusbar'); + // Attach the internal navigationBar utility to window.navigationbar + // see the file under plugin/android/navigationbar.js + modulemapper.clobbers('cordova/plugin/android/navigationbar', 'window.navigationbar'); + var APP_PLUGIN_NAME = Number(cordova.platformVersion.split('.')[0]) >= 4 ? 'CoreAndroid' : 'App'; // Inject a listener for the backbutton on the document. diff --git a/cordova-js-src/plugin/android/navigationbar.js b/cordova-js-src/plugin/android/navigationbar.js new file mode 100644 index 000000000..c26c6c315 --- /dev/null +++ b/cordova-js-src/plugin/android/navigationbar.js @@ -0,0 +1,53 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. +*/ + +var exec = require('cordova/exec'); + +var navigationBar = {}; + +// This