how to access ionic.config.json - ionic-framework

Is there a way to access ionic.config.json from a page or a provider in my ionic framework? I need to change proxy settings for android or web accordingly.
this is my ionic info:
#ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
#ionic/app-scripts : 3.1.8
Cordova Platforms : android 7.0.0
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
Node : v8.11.1
npm : 6.0.0
OS : Windows 10
Environment Variables:
ANDROID_HOME : C:\Users\themhz\AppData\Local\Android\Sdk
Misc:
backend : pro

Related

IONIC 4 Android 9 Background Mode PlugIn. Disable Battery Optimisation

IONIC 4 BackgroundMode PlugIn is not disable battery optimisation.
I tested these solutions, but not working:
https://github.com/katzer/cordova-plugin-background-mode/issues/430
I try to set:
this.backgroundMode.on("activate").subscribe(()=>{
this.backgroundMode.disableWebViewOptimizations();
this.backgroundMode.disableBatteryOptimizations(); HERE
console.log("background activate !!!!");
});
But i get:
Property 'disableBatteryOptimizations' does not exist on type 'BackgroundMode'. Did you mean
'disableWebViewOptimizations'
Environment:
Ionic:
ionic (Ionic CLI) : 4.12.0 (C:\Users\Julio\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : #ionic/angular 4.9.1
#angular-devkit/build-angular : 0.801.3
#angular-devkit/schematics : 8.1.3
#angular/cli : 8.1.3
#ionic/angular-toolkit : 2.0.0
Cordova:
cordova (Cordova CLI) : 9.0.0 (cordova-lib#9.0.1)
Cordova Platforms : android 8.1.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.1, (and 6 other plugins)
System:
Android SDK Tools : 26.1.1 (C:\Users\Julio\AppData\Local\Android\Sdk)
NodeJS : v11.12.0 (C:\Program Files\nodejs\node.exe)
npm : 6.7.0
OS : Windows 10
Any suggestion?
try this
First remove all the platforms, that is ios or android
ionic cordova platform rm android
ionic cordova platform rm ios
Now, add the following plugin,
ionic cordova plugin add https://github.com/tushe/cordova-plugin-background-mode.git
Then install the latest version of background-mode using
npm install --save #ionic-native/background-mode#latest
Add your platforms again then retry.

Why ionic APK for android is generating under the build/outputs/apki/debug/ folder and its not opening in device?

I am building a android APK normally it will generate inside output/apk/ folder but now its generating inside output/apk/debug folder, So my problem is when I install this generated APK in device it's not opening why ?
My ionic info :
#ionic/cli-utils : 1.9.2
ionic (Ionic CLI) : 3.9.2
global packages:
Cordova CLI : 8.0.0
local packages:
#ionic/app-scripts : 3.1.8
Cordova Platforms : android 7.0.0
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
Node : v8.11.0
npm : 5.6.0
OS : Windows 7

Code changes are not reflected after running the app on ios device

I'm working on a mobile app using ionic v4 and my problem is when I try to debug the app on my device I can't see the changes which I did in the file 'app.component.html'(this problem is only for this file)
I'm using vscode for coding and xCode 10 to debug the app on my device
ionic info
Ionic:
ionic (Ionic CLI) : 4.11.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : #ionic/angular 4.0.1
#angular-devkit/build-angular : 0.12.4
#angular-devkit/schematics : 7.2.4
#angular/cli : 7.2.4
#ionic/angular-toolkit : 1.3.0
Cordova:
cordova (Cordova CLI) : 8.1.2 (cordova-lib#8.1.1)
Cordova Platforms : android 7.1.4, ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 10 other plugins)
System:
ios-deploy : 1.9.4
NodeJS : v11.10.1 (/usr/local/bin/node)
npm : 6.7.0
OS : macOS Mojave
Xcode : Xcode 10.1 Build version 10B61

Ionic 3 missing ionic starter folder in platforms folder

Tried to run ionic cordova platform add android#6.3.0 latest ionic version and do not why but the platforms\android\src\io\ionic\starter folder is missing where MainActivity.java is located
Tried reinstalling a new ionic version but still misses. I am installing specific 6.3.0 android version which was working perfectly fine in my previous build, so not sure why its missing the starter folder
Ionic info details below
#ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 6.5.0
local packages:
#ionic/app-scripts : 3.1.10
Cordova Platforms : android 6.3.0
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 26.1.1
Node : v6.11.3
npm : 3.10.10
OS : Windows 10
Environment Variables:
ANDROID_HOME : C:\Users\Oreo\AppData\Local\Android\sdk\
Misc:
backend : pro
Main Activity java can be found in below location
.. \platforms\android\app\src\main\java\com\...
Why do you need this file? If you are building an app, APK can be found in below path
platforms\android\app\build\outputs\apk\release

Ionic 2 Native plugins does not work on device

I'am using some Cordova plugins in my Ionic 2 application (camera, Geolocation, Facebook), but when i try to use them i have a message : "Native: tried calling Camera.getPicture, but the Camera plugin is not installed." but all my plugins are installed.
Any Suggestions ?
EDIT
#ionic/cli-utils : 1.7.0
ionic (Ionic CLI) : 3.7.0
global packages:
Cordova CLI : 7.0.1
local packages:
#ionic/app-scripts : 2.0.0
#ionic/cli-plugin-cordova : 1.4.0
#ionic/cli-plugin-ionic-angular : 1.3.2
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.5.0
System:
Android SDK Tools : 25.2.3
Node : v6.10.3
OS : Windows 10
npm : 3.10.10