Custom URI Scheme inside an InApp Browser is not working

Hi All,

I am building an Ionic App where a Login Page will open an InAppBrowser for Log in and after that a CUSTOM URI Scheme will trigger( inside the Inappbrowser) and open the app.

I added the following plugin:

cordova plugin add --variable URL_SCHEME=testapp

But, when the inappbrowser opened, i got an error

**The webpage at testapp:// could not be loaded because: net::ERR_UNKNOWN_URL_SCHEME**

How to solve this.
Below is the code.

 <ion-content ng-controller="ExampleController" padding="true">
     <button class="button button-full button-assertive" ng-click="openInExternalBrowser()">
        Open In External Browser
    <button class="button button-full button-assertive" ng-click="openInAppBrowser()">
        Open In App Browser
     <button class="button button-full button-assertive" ng-click="openCordovaWebView()">
        Open In Cordova Webview

Now the Controller Part

function handleOpenURL(url) {
setTimeout( function() {
    var event = new CustomEvent('LaunchUrl', {detail: {'url': url}});
}, 0);

angular.module('starter', ['ionic'])

.run(function($ionicPlatform) {
 $ionicPlatform.ready(function() {
if(window.cordova && window.cordova.plugins.Keyboard) {
  // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard
  // for form inputs)

  // Don't remove this line unless you know what you are doing. It stops the viewport
  // from snapping when text inputs are focused. Ionic handles this internally for
  // a much nicer keyboard experience.
if(window.StatusBar) {

.controller("ExampleController", function ($scope) {

 $scope.openInExternalBrowser = function()
// Open in external browser'','_system','location=yes'); 

$scope.openInAppBrowser = function()
// Open in app browser'testapp://','_blank'); 

$scope.openCordovaWebView = function()
 // Open cordova webview if the url is in the whitelist otherwise opens in app  browser'testapp://','_self');