Hey,
i don’t understand the error either. Why so you use this Plugin and not the official Ionic Storage?
Error: Can't resolve all parameters for HomePage (NativeStorage)
Ionic dynamic menu
Of course it is possible But because the Ionic Menu is not build for this case, i think you completely have to develop your own component, that lays over and wrap a own <iom-router>
.
Short googling results into:
Error: Can't resolve all parameters for HomePage (NativeStorage)
It’s working now… I didn’t restart the ionic serve after adding the plugin…
Thanks!
HttpClient infinity Timeout?
Thanks for your prompt reply. I’ll mull over this answer and see what I can think of how best to reply.
Ionic native web intent plugin
Hi, iam trying to use ionic native web intent, but iam not able to get it work. It always fails when run ionic cordova run android --prod
while building android with this error:
Executing script found in plugin com-darryncampbell-cordova-plugin-intent for hook "after_prepare": plugins\com-darryncampbell-cordova-plugin-intent\hooks\after_prepare.js
ENOENT: no such file or directory, open './platforms/android/gradle.properties'
There is some problem with underlying cordova plugin, any ideas how to solve it? I tried removing and adding android platform but it doesnt help.
my package.json looks like this:
{
"name": "entrychecker2",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "https://ionicframework.com/",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"
},
"private": true,
"dependencies": {
"@angular/common": "~8.1.2",
"@angular/core": "~8.1.2",
"@angular/forms": "~8.1.2",
"@angular/platform-browser": "~8.1.2",
"@angular/platform-browser-dynamic": "~8.1.2",
"@angular/router": "~8.1.2",
"@ionic-native/barcode-scanner": "^5.21.4",
"@ionic-native/core": "^5.0.0",
"@ionic-native/splash-screen": "^5.0.0",
"@ionic-native/status-bar": "^5.0.0",
"@ionic-native/web-intent": "^5.21.5",
"@ionic/angular": "^4.7.1",
"@ionic/storage": "^2.2.0",
"com-darryncampbell-cordova-plugin-intent": "^2.0.0",
"cordova-android": "7.1.4",
"cordova-plugin-chrome-apps-common": "^1.0.7",
"cordova-plugin-chrome-apps-sockets-udp": "^1.3.0",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-ionic-keyboard": "^2.2.0",
"cordova-plugin-ionic-webview": "^4.1.3",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-sqlite-storage": "^4.0.0",
"core-js": "^2.5.4",
"hex2dec": "^1.1.2",
"phonegap-nfc": "^1.0.4",
"phonegap-plugin-barcodescanner": "^8.1.0",
"rxjs": "~6.5.1",
"tslib": "^1.9.0",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular-devkit/architect": "~0.801.2",
"@angular-devkit/build-angular": "~0.801.2",
"@angular-devkit/core": "~8.1.2",
"@angular-devkit/schematics": "~8.1.2",
"@angular/cli": "~8.1.2",
"@angular/compiler": "~8.1.2",
"@angular/compiler-cli": "~8.1.2",
"@angular/language-service": "~8.1.2",
"@ionic/angular-toolkit": "^2.1.1",
"@types/jasmine": "~3.3.8",
"@types/jasminewd2": "~2.0.3",
"@types/node": "~8.9.4",
"codelyzer": "^5.0.0",
"jasmine-core": "~3.4.0",
"jasmine-spec-reporter": "~4.2.1",
"karma": "~4.1.0",
"karma-chrome-launcher": "~2.2.0",
"karma-coverage-istanbul-reporter": "~2.0.1",
"karma-jasmine": "~2.0.1",
"karma-jasmine-html-reporter": "^1.4.0",
"protractor": "~5.4.0",
"ts-node": "~7.0.0",
"tslint": "~5.15.0",
"typescript": "~3.4.3"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"phonegap-nfc": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {
"ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.+"
},
"cordova-plugin-ionic-keyboard": {},
"phonegap-plugin-barcodescanner": {
"ANDROID_SUPPORT_V4_VERSION": "27.+"
},
"cordova-sqlite-storage": {},
"cordova-plugin-chrome-apps-sockets-udp": {},
"com-darryncampbell-cordova-plugin-intent": {}
},
"platforms": []
}
}
Geofence plugin error: Cannot find module '../../src/cordova/platform_metadata'
Hi Team,
I am new to ionic 4 and need to add geofencing to my project . After adding the plugin, I cannot build the application. It returns the following error .
Cannot find module ‘…/…/src/cordova/platform_metadata’
I use this command to add the plugin:
‘cordova plugin add cordova-plugin-geofence’
Used Versions:
Cordova-android: 8.1.0
Java: 1.8.0_24
Ionic cli: 6.1.0
Appreciate if you could help to resolve this error.
Thanks !
How to open Dialer in ionic V5?
Thanks for your reply, but i cant install the plugin from ionic native, i did npm install call-number but i still getting the same error
How to open Dialer in ionic V5?
Ionic Native is only a Wrapper for the Plugin. Have you added the Plugin via Capacitor?
Ion-button with text and image
Hi,
is there a way to create a ion-button with a text and an image?
I mean, not a ion-icon, but an element…
Thank you!
Ionic dynamic menu
Ok, thank you for your replay
I want to download a file from my rest and save it on download folder
I’m using Ionic 4 and I can’t make file-transfer plugin work. I’m desperate. I don’t know what to do or what to try. If anyone could guide me I would appreciate it.
How change IonTab "selected-tab" without click in IonTabButton
I have this following situation:
-The component contains 6 IonTabs, the first IonTabButton is hidden, and its tab appears when component render (acting like a main screen).
-The other IonTabs can navigate normally clicking in your respective buttons, and each IonTab (rendering other components) has a button to return to the “main screen” ( first IonTab ).
The problem is:
When I click in return button and use < Redirect to="/main" />, only the prop “current-path” change and “selected-tab” remains with clicked IonTabButton value. How can I solve this?
IonTabBar example in DOM:
< ion-tab-bar slot=“bottom” current-path="/main" selected-tab=“dashboard” role=“tablist” class=“md hydrated”></ ion-tab-bar >
No www found in root of project
Bit of follow-up info for anyone else curious.
I tried to clean-up my package.json, because there was a lot of random noise in it from previous dev groups, and I removed the following lines…
"start": "ionic-app-scripts serve",
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint"
…from my scripts object not knowing they were needed for App Flow. I replaced them and re-ran my App Flow build with success.
How to get firebase ID
Hi I’m following this tutorial. And I’m fairly new to Ionic and Firebase. I’m following this tutorial:
Would want to get the ID of the user that has login and use it to make lets say a user profile with a name, address and maybe things like a shopping list. Care to shed some light how one can do it?
Problem import AutoStart(IONIC 4)
Error import,
index.js:72 Uncaught TypeError: Object(…) is not a function
at index.js:72
at Module…/node_modules/@ionic-native/autostart/index.js (index.js:114)
at webpack_require (bootstrap:84)
at Module…/src/app/app.component.ts (main.js:842)
at webpack_require (bootstrap:84)
at Module…/src/app/app.module.ts (app.component.ts:14)
at webpack_require (bootstrap:84)
at Module…/src/main.ts (main.ts:1)
at webpack_require (bootstrap:84)
at Object.0 (alert.service.ts:7)
App component .ts
import {Component} from ‘@angular/core’;
import {Platform, NavController, MenuController} from ‘@ionic/angular’;
import {SplashScreen} from ‘@ionic-native/splash-screen/ngx’;
import {StatusBar} from ‘@ionic-native/status-bar/ngx’;
import {AuthenticationService} from ‘./services/authentication.service’;
import {Router} from ‘@angular/router’;
import { Autostart } from ‘@ionic-native/autostart’; - PS(Error and ngx autostart);
@Component({
selector: ‘app-root’,
templateUrl: ‘app.component.html’,
styleUrls: [‘app.component.scss’]
})
export class AppComponent {
constructor(
private platform: Platform,
private splashScreen: SplashScreen,
private statusBar: StatusBar,
private authService: AuthenticationService,
private router: Router,
private navController: NavController,
public menuCtrl: MenuController,
private autostart: Autostart
) {
this.initializeApp();
}
/**
* @method Check if the user ios authenticated, if yes will be redirected to homeShooter page, if not homePage
*/
initializeApp() {
this.platform.ready().then(() => {
this.statusBar.styleDefault();
this.splashScreen.hide();
this.authService.authenticationState.subscribe(state => {
if (state) {
this.navController.navigateRoot(['home/shooter']);
} else {
this.navController.navigateRoot(['home']);
}
});
});
}
/**
* @method Redirect to event Page
*/
goToEvent() {
this.menuCtrl.enable(false, 'first');
this.router.navigate(['/event/list']);
this.menuCtrl.enable(true, 'first');
}
/**
* @method Redirect to habituality Page
*/
gotToHabituality() {
this.menuCtrl.enable(false, 'first');
this.router.navigate(['/habituality']);
this.menuCtrl.enable(true, 'first');
}
/**
* @method Redirect to home Page
*/
logout() {
this.menuCtrl.enable(false, 'first');
this.authService.logout();
this.menuCtrl.enable(true, 'first');
}
/**
* @method Redirect to chat Page
*/
goToChat() {
this.menuCtrl.enable(false, 'first');
this.router.navigate(['/home/chat']);
this.menuCtrl.enable(true, 'first');
}
/**
* @method Redirect to noticie Page
*/
goToNoticie() {
this.menuCtrl.enable(false, 'first');
this.router.navigate(['noticies']);
this.menuCtrl.enable(true, 'first');
}
}
Can not store data in a file
I found a way to get what I needed… I post here in case it could help someone.
I install this package:
=> npm i @byteowls/capacitor-filesharer
Then in my React class:
import {FileSharer} from '@byteowls/capacitor-filesharer';
FileSharer.share({
filename: fileName,
base64Data: "content converted as base64 string",
contentType: " text/plain",
}).then(() => {
alert("export done!");
}).catch(alert);
![image|507x500](upload://ptL8yHilFna0djIgbMFrbMZxyp2.jpeg)
You'll be able to find your file in the download folder
![image|690x479](upload://cpmoXbgRFqnHKyO3cXF6ADtRghP.png)
No error returned but no data returned on successful json post to api
Well, that doesn’t seem to be working so great for you. My suggestion would be that CORS needs to be fixed on the server, and once that’s done you can go back to using Angular HttpClient
, which is much easier to deal with.
Run webView with https
Yes, as long as you’re passing https:
URLs to libraries that fire off XHRs (such as Angular HttpClient
).
I’ve used Stripe, and I’ve written Ionic apps, but haven’t yet done the two together. This cordova plugin claims to be able to interact with Stripe in Ionic apps (and there’s an Ionic Native shim). I would think that if you had to jump through any additional hoops to get that to work, it would be documented there.
Ionic 4 & Angular 8
Problem solved! It turned out that my old `index.html contained
<script src="https://unpkg.com/@webcomponents/webcomponentsjs@2.0.3/custom-elements-es5-adapter.js"></script>
which was not present in the starter project with Angular 8. Instead it seems that building with Angular 8 automatically injects
<script src="runtime-es2015.js" type="module"></script><script src="runtime-es5.js" nomodule defer></script><script src="polyfills-es5.js" nomodule defer></script><script src="polyfills-es2015.js" type="module"></script><script src="styles-es2015.js" type="module"></script><script src="styles-es5.js" nomodule defer></script><script src="scripts.js" defer></script><script src="vendor-es2015.js" type="module"></script><script src="vendor-es5.js" nomodule defer></script><script src="main-es2015.js" type="module"></script><script src="main-es5.js" nomodule defer></script></body>
in the file. Removing the existing reference to custom-elements-es5-adapter.js
solved the problem.
Ionic 4 & Angular 8
Thanks for reporting back so that anybody else in your situation can benefit from the knowledge.