title: Unable to get REST API response in real android device in Ionic
body: <p>Everything working fines in web browser but not working in debug.apk while running in real device(Android).</p>
  
  <p>I'm not getting any response from https server in real device but in browser i'm getting response and displaying data in ion-label.</p>
  
  <p>For browser:</p>
  
  <pre><code>ionic serve --lab
  </code></pre>
  
  <p>For android debug apk:</p>
  
  <pre><code>ionic cordova build android
  </code></pre>
  
  <p>config.xml:</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;
  &lt;widget id="io.ionic.starter" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"&gt;
      &lt;name&gt;NABH&lt;/name&gt;
      &lt;description&gt;An awesome Ionic/Cordova app.&lt;/description&gt;
      &lt;author email="hi@ionicframework" href="http://ionicframework.com/"&gt;Ionic Framework Team&lt;/author&gt;
      &lt;content src="index.html" /&gt;
      &lt;allow-intent href="*" /&gt;
      &lt;allow-intent href="http://*/*" /&gt;
      &lt;allow-intent href="https://*/*" /&gt;
      &lt;allow-intent href="tel:*" /&gt;
      &lt;allow-intent href="sms:*" /&gt;
      &lt;allow-intent href="mailto:*" /&gt;
      &lt;allow-intent href="geo:*" /&gt;
      &lt;allow-navigation href="*" /&gt;
      &lt;access origin="*" /&gt;
      &lt;allow-navigation href="http://*/*" /&gt;
      &lt;allow-navigation href="https://*/*" /&gt;
      &lt;allow-navigation href="data:*" /&gt;
      &lt;preference name="ScrollEnabled" value="false" /&gt;
      &lt;preference name="android-minSdkVersion" value="19" /&gt;
      &lt;preference name="BackupWebStorage" value="none" /&gt;
      &lt;preference name="SplashMaintainAspectRatio" value="true" /&gt;
      &lt;preference name="FadeSplashScreenDuration" value="300" /&gt;
      &lt;preference name="SplashShowOnlyFirstTime" value="false" /&gt;
      &lt;preference name="SplashScreen" value="screen" /&gt;
      &lt;preference name="SplashScreenDelay" value="300" /&gt;
      &lt;preference name="loadUrlTimeoutValue" value="600000" /&gt;
      &lt;preference name="AutoHideSplashScreen" value="false" /&gt;
      &lt;preference name="orientation" value="portrait" /&gt;
      &lt;platform name="android"&gt;
          &lt;allow-intent href="market:*" /&gt;
          &lt;icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" /&gt;
          &lt;icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" /&gt;
          &lt;icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" /&gt;
          &lt;icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" /&gt;
  .......
  </code></pre>
  
  <p>Followed some tutorial link and added below line also in <code>index.html</code> file,</p>
  
  <pre><code>&lt;meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval'"&gt;
  </code></pre>
  
  <p>ionic.config.json file:</p>
  
  <pre><code>{
    "name": "NXXX",
    "app_id": "",
    "type": "ionic-angular",
    "integrations": {
      "cordova": {}
    },
    "proxies": [
      {
        "path": "/api",
        "proxyUrl": "https://www.testapi.com/mobileapi"
      }
    ]
  
  }
  </code></pre>
  
  <p>ts file:</p>
  
  <pre><code>return new Promise(resolve =&gt; {
        const myheader = new HttpHeaders().set('Content-Type', 'application/x-www-form-urlencoded')
        this.http.get("https://www.testapi.com/mobileapi",{headers:myheader}).subscribe(data =&gt; {
          resolve(data);
        }, err =&gt; {
          console.log(err);
        });
      });
  </code></pre>
  
  <p>Environment info:
  cli packages: (/usr/local/lib/node_modules)</p>
  
  <pre><code>@ionic/cli-utils  : 1.19.2
  ionic (Ionic CLI) : 3.20.0
  </code></pre>
  
  <p>global packages:</p>
  
  <pre><code>cordova (Cordova CLI) : 8.0.0
  </code></pre>
  
  <p>local packages:</p>
  
  <pre><code>@ionic/app-scripts : 3.1.9
  Cordova Platforms  : android 7.0.0
  Ionic Framework    : ionic-angular 3.9.2
  </code></pre>
  
  <p>System:</p>
  
  <pre><code>Android SDK Tools : 26.1.1
  Node              : v8.11.1
  npm               : 5.6.0
  OS                : macOS High Sierra
  Xcode             : Xcode 7.2.1 Build version 7C1002
  </code></pre>
  
  <p>Still, i'm getting stuck at api response in real device. Please let me know what will i do to get JSON response in android device?  </p>