I am trying to control the max speed at which a user can scroll through an ion-list. I have not been able to find anything on this in the ionic documentation. How is this achieved in Ionic 3? Thanks in advance.
Ionic:
ionic (Ionic CLI) : 4.2.1 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
#ionic/app-scripts : 3.2.0
Related
I am facing an issue in the Ionic App icon, how I can fix it? please see images
Ionic Information
Ionic:
Ionic CLI : 5.4.9 (/usr/local/lib/node_modules/ionic)
Ionic Framework : #ionic/angular 4.4.2
#angular-devkit/build-angular : 0.13.9
#angular-devkit/schematics : 7.3.9
#angular/cli : 7.3.9
#ionic/angular-toolkit : 1.5.1
Capacitor:
Capacitor CLI : 1.1.0
#capacitor/core : 1.1.0
Cordova:
Cordova CLI : 9.0.0 (cordova-lib#9.0.1)
Cordova Platforms : ios 5.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.0.1, (and 7 other plugins)
Utility:
cordova-res : 0.8.1
native-run : not installed
System:
Android SDK Tools : 26.1.1 (/Users/iosdev/Library/Android/sdk)
ios-deploy : 2.0.0
ios-sim : 8.0.2
NodeJS : v10.15.3 (/usr/local/bin/node)
npm : 6.10.3
OS : macOS Mojave
Xcode : Xcode 10.2.1 Build version 10E1001
u can try these steps, (i solved mine like this only)
1. npm remove cordova-res
2. npm install cordova-res
and then replace those default icon with your custom one once again and
run ionic cordova resources that will generate your custom icon and it should be shown.
This is not a bug, its IOS default functionality, Try with lots of top applications from the App store showing the same.
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.
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
I have ionic project scanning barcode, Im using #ionic-native/barcode-scanner it works fine on iOS, but in android when I call the scan method, the camera is opening and when it catch the barcode the apps crash and go to the root page (login). Im using LG Nexus android 6.0, can anyone help me please!
this.barcodeScanner.scan().then((data) => {
this.addProduct(data.text);
}, (err) => {
console.log(err);
});
Ionic:
ionic (Ionic CLI) : 4.0.1 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2 #ionic/app-scripts :
3.1.10
Cordova:
cordova (Cordova CLI) : 7.1.0 Cordova Platforms : android
7.1.1, browser 5.0.3, ios 4.5.5
System:
ios-deploy : 1.9.2 NodeJS : v6.10.0 (/usr/local/bin/node)
npm : 6.2.0 OS : macOS High Sierra Xcode :
Xcode 9.4.1 Build version 9F2000
I have added onPauseSubscription in app.component so when I call the barcode scanner it calls this event automatically in android only. I removed it and it is working now.
this.onPauseSubscription = platform.pause.subscribe(() => {
console.log('onPauseSubscription'); // 30 sn
this.logout();
});
The app works fine in both android and ios (11.3 or hight), when I used to run the app using commands:
ionic cordova build ios
But as soon as I run the app using ‘–prod’ in front of them the app used to get stuck on my splash
My ionic info prints this:
cli packages: (/usr/local/lib/node_modules)
#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 : ios 4.5.4
Ionic Framework : ionic-angular 3.9.2
System:
ios-deploy : 1.9.2
ios-sim : 6.1.2
Node : v8.10.0
npm : 5.6.0
OS : macOS High Sierra
Xcode : Xcode 9.3 Build version 9E145
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : pro
I got this in my safari debugger. Maybe this would help you out…!
enter image description here
I run on IOS 11.3 no problem, but with IOS 10 or lower and using flag “–prod” then error.