How the ionic storage uses sqlite in device. can you tell me the structure and where can i db in mobile device.
Ionic storage and sqlite in native device
I cannot install cordova-res
Thanks so much Matt!!
"export 'ICON_PATHS' was not found in 'ionicons/icons'
Yes, it helped! No errors this time. Looks like I’ll be using yarn.
Thank you so much.
A problem occurred configuring root project 'android'. > Cannot add task ':processDebugGoogleServices' as a task with that name already exists
When I run ionic cordova build android
I get this.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Cannot add task ':processDebugGoogleServices' as a task with that name already exists.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s
cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'android'.
> Cannot add task ':processDebugGoogleServices' as a task with that name already exists.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s
[ERROR] An error occurred while running subprocess cordova.
cordova build android exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
ionic info
Ionic:
ionic (Ionic CLI) : 4.7.0 (C:\Users\Nilesh\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.1.8
Cordova:
cordova (Cordova CLI) : 8.1.1 (cordova-lib@8.1.0)
Cordova Platforms : android 6.4.0
Cordova Plugins : not available
System:
Android SDK Tools : 26.1.1 (C:\Users\Nilesh\AppData\Local\Android\Sdk)
NodeJS : v6.17.1 (C:\Program Files\nodejs\node.exe)
npm : 6.9.0
OS : Windows 10
the package.json file:
{
"name": "myApp",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": " ionic-app-scripts build",
"ionic:serve": "node script.js && ionic-app-scripts serve",
"ionic:watch:before": "node script.js",
"ionic:build:before": "node script.js",
"build:prod": "cross-env ENV=dev ionic cordova build android --prod --release"
},
"dependencies": {
"@angular/animations": "^5.2.10",
"@angular/common": "5.0.3",
"@angular/compiler": "5.0.3",
"@angular/compiler-cli": "5.0.3",
"@angular/core": "5.0.3",
"@angular/forms": "5.0.3",
"@angular/http": "5.0.3",
"@angular/platform-browser": "5.0.3",
"@angular/platform-browser-dynamic": "5.0.3",
"@angular/platform-server": "5.2.2",
"@angular/router": "5.2.2",
"@ionic-native/action-sheet": "^4.7.0",
"@ionic-native/android-permissions": "^4.7.0",
"@ionic-native/camera": "^4.7.0",
"@ionic-native/core": "4.4.0",
"@ionic-native/fcm": "^4.7.0",
"@ionic-native/file": "^4.7.0",
"@ionic-native/file-chooser": "^4.7.0",
"@ionic-native/file-path": "^4.7.0",
"@ionic-native/file-picker": "^4.12.0",
"@ionic-native/file-transfer": "^4.7.0",
"@ionic-native/image-picker": "^4.16.0",
"@ionic-native/in-app-browser": "^4.20.0",
"@ionic-native/keyboard": "^4.7.0",
"@ionic-native/network": "^4.7.0",
"@ionic-native/splash-screen": "4.4.0",
"@ionic-native/sqlite": "^4.7.0",
"@ionic-native/status-bar": "^4.11.0",
"@ionic-native/video-editor": "^4.20.0",
"@ionic/pro": "1.0.20",
"@ionic/storage": "2.1.3",
"@types/jasmine": "2.2.30",
"@types/selenium-webdriver": "2.44.26",
"amazing-time-picker": "^1.5.3",
"amazon-cognito-identity-js": "1.29.0",
"aws-sdk": "2.67.0",
"body-parser": "~1.15.1",
"calender": "^1.0.3",
"codelyzer": "4.0.1",
"com.synconset.imagepicker": "^2.1.10",
"cookie-parser": "~1.4.3",
"cordova-android": "6.4.0",
"cordova-android-support-gradle-release": "^2.1.0",
"cordova-ios": "4.5.4",
"cordova-plugin-actionsheet": "^2.3.3",
"cordova-plugin-android-permissions": "^1.0.0",
"cordova-plugin-camera": "^4.0.3",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-fcm": "^2.1.2",
"cordova-plugin-file": "^6.0.1",
"cordova-plugin-file-transfer": "^1.7.1",
"cordova-plugin-filechooser": "^1.2.0",
"cordova-plugin-filepath": "^1.5.5",
"cordova-plugin-filepicker": "^1.1.6",
"cordova-plugin-inappbrowser": "^3.0.0",
"cordova-plugin-ionic-keyboard": "^2.1.3",
"cordova-plugin-ionic-webview": "^1.2.1",
"cordova-plugin-network-information": "^2.0.1",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-video-editor": "^1.1.3",
"cordova-plugin-whitelist": "^1.3.3",
"cordova-sqlite-storage": "^2.6.0",
"core-js": "2.4.1",
"debug": "~2.2.0",
"ejs": "^2.5.2",
"enhanced-resolve": "^3.3.0",
"express": "~4.13.4",
"extract-text-webpack-plugin": "2.1.0",
"ionic-angular": "3.9.2",
"ionic-plugin-keyboard": "^2.2.1",
"ionic-tooltips": "^2.0.1",
"ionicons": "3.0.0",
"jasmine-core": "2.4.1",
"jasmine-spec-reporter": "2.5.0",
"jwt-decode": "^2.2.0",
"karma": "1.2.0",
"karma-chrome-launcher": "2.0.0",
"karma-cli": "1.0.1",
"karma-jasmine": "1.0.2",
"karma-remap-istanbul": "0.6.0",
"moment": "^2.22.1",
"morgan": "~1.7.0",
"ng2-datepicker": "^2.2.5",
"ngx-filter-pipe": "^2.1.0",
"ngx-permissions": "^4.1.0",
"protractor": "5.1.1",
"rxjs": "5.5.2",
"serve-favicon": "~2.3.0",
"sw-toolbox": "3.6.0",
"ts-helpers": "1.1.1",
"ts-node": "3.2.0",
"tslint": "5.7.0",
"typescript": "2.4.2",
"webpack": "2.2.1",
"webpack-dev-middleware": "1.10.1",
"webpack-dev-server": "2.4.2",
"webpack-md5-hash": "0.0.5",
"webpack-merge": "4.1.0",
"zone.js": "0.8.18"
},
"devDependencies": {
"@ionic/app-scripts": "3.1.8",
"@types/node": "^8.9.4",
"typescript": "2.4.2",
"cross-env": "5.2.0",
"nodemon": "^1.18.3"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-whitelist": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-file-transfer": {},
"cordova-plugin-file": {},
"cordova-sqlite-storage": {},
"cordova-plugin-network-information": {},
"cordova-plugin-filechooser": {},
"cordova-plugin-camera": {},
"cordova-plugin-actionsheet": {},
"cordova-plugin-android-permissions": {},
"cordova-plugin-filepath": {},
"com.synconset.imagepicker": {
"PHOTO_LIBRARY_USAGE_DESCRIPTION": "your usage message"
},
"cordova-plugin-fcm": {},
"cordova-plugin-statusbar": {},
"cordova-plugin-filepicker": {},
"cordova-android-support-gradle-release": {
"ANDROID_SUPPORT_VERSION": "26.+"
},
"cordova-plugin-video-editor": {},
"cordova-plugin-inappbrowser": {}
},
"platforms": [
"ios",
"android"
]
}
}
cordova plugin info
com.synconset.imagepicker 2.1.8 "ImagePicker"
cordova-android-support-gradle-release 2.1.0 "cordova-android-support-gradle-release"
cordova-plugin-actionsheet 2.3.3 "ActionSheet"
cordova-plugin-android-permissions 1.0.0 "Permissions"
cordova-plugin-camera 4.0.3 "Camera"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-fcm 2.1.2 "FCMPlugin"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-filechooser 1.2.0 "File Chooser"
cordova-plugin-filepath 1.5.5 "cordova-plugin-filepath"
cordova-plugin-filepicker 1.1.6 "File Picker"
cordova-plugin-firebase 2.0.5 "Google Firebase Plugin"
cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 1.2.1 "cordova-plugin-ionic-webview"
cordova-plugin-network-information 2.0.1 "Network Information"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-video-editor 1.1.3 "VideoEditor"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-sqlite-storage 2.6.0 "Cordova sqlite storage plugin"
I have been stuck on this for too long now. Tried editing the gradle files according to some solutions but to no avail
I'm using side menu and tabs in a same page but when i tired to open side menu based on user role it not working
I’m using side menu and tabs in a same page but when i tired to open side menu based on user role it not working. Please can you help me anyone on this issues
I would be very thank full to you.
Thank in advance
Copy/Move file from temporary folder to external directory not working in android device 8 and above
Hi, I am using IonicMultiCamera plugin,CameraPreview plugin, and ‘cordova-file-plugin’, to capture and move images from cache to a specified folder in externalRootDirectory. This process works well in android version 7 and below, but does not work in android versions 8 and above.
For android version 8 and above the ‘moveFile’ function of ‘cordova-file-plugin’ throws an error as: { code:1, message:‘NOT_FOUND_ERR’}.
Below is the code that i am using to copy images from cache to a specified folder in externalRootDirectory.
/*--------FUNCTION TO CAPTURE IMAGE-------*/
capturepic()
{
this.cachearray=[];
console.log('capturepic');
const pictureOptions: CameraPreviewPictureOptions = {
quality: 80,
width: 640,
height: 640
};
const translations: CameraTranslations = {
cancel: 'Cancel',
finish: 'Finish',
auto: 'AUTO',
on: 'On',
off: 'Off'
};
this.camera.getPicture(pictureOptions)
.then((pictures: Array<Picture>) => {
console.log("success in camera"+JSON.stringify(pictures));
for(let i=0;i<Object.keys(pictures).length;i++)
{
console.log('picturesarray'+JSON.stringify(pictures));
console.log(" getPicture fileEntry "+pictures[i].fileEntry.name)
let imagePath=pictures[i].fileEntry.nativeURL;
let imagename=pictures[i].fileEntry.name;
let imagePatho=imagePath.substr(0,imagePath.lastIndexOf('/')+1);
let fullpath=imagePath+imagename;
let filepathnew="file:///storage/emulated/0/Customervisitingcard/";
console.log(" imagePatho fileEntry "+imagePatho);
this.cachearray.push({imagePath:imagePath, imagename:imagename});
console.log(" cachearray "+JSON.stringify(this.cachearray));
console.log("iiiiii "+i+" llllll "+(Object.keys(pictures).length-1));
if(i==Object.keys(pictures).length-1)
{
console.log("iffff ");
this.copyonclick();
}
}
})
.catch(err => {
console.log("Error in camera"+err);
});
// }
}
/*--------FUNCTION TO COPY IMAGES-------*/
copyonclick(){
console.log("copyonclick"+Object.keys(this.cachearray).length+JSON.stringify(this.cachearray));
for(let i=0;i<Object.keys(this.cachearray).length;i++)
{
let imagePath=this.cachearray[i].imagePath;
let imagename=this.cachearray[i].imagename;
let fullpath=imagePath+imagename;
// let suppliername=this.supplier_name;
// let productname=this.input;
// let offerno=this.offernumber;
let extrtdir = this.file.externalRootDirectory;
console.log('extrtdir=='+extrtdir);
let filepathnew= this.file.externalRootDirectory+'Customervisitingcard/';
console.log('imagePath'+imagePath+'imagename'+imagename);
this.resolvefile(imagePath,imagename,filepathnew);
}
}
resolvefile(imagePath,imagename,filepathnew)
{
this.filePath.resolveNativePath(imagePath)
.then(filePath => {
let correctPath = filePath.substr(0, filePath.lastIndexOf('/') + 1);
let currentName = imagename;
console.log("resolveNativePath "+correctPath+" currentName " + currentName +'filepathnew'+filepathnew);
this.copyFileToLocalDir(correctPath, currentName, this.createFileName(),filepathnew);
});
}
private createFileName() {
console.log("createFileName");
var d = new Date(),
n = d.getTime(),
newFileName = n + ".jpg";
return newFileName;
}
/*--------FUNCTION TO MOVE IMAGES TO SPECIFIED EXTERNAL FOLDER-------*/
private copyFileToLocalDir(namePath, currentName, newFileName,filepathnew) {
this.file.moveFile(namePath, currentName, filepathnew, newFileName).then(success => {
this.storedfilepathname = filepathnew+newFileName;
this.storeimages.push(this.storedfilepathname);
console.log('storeimages'+JSON.stringify(this.storeimages)+'uuuuuuu'+this.storedfilepathname);
this.file.readAsDataURL(filepathnew, newFileName).then(dataurl => {
this.lastImage = dataurl;
this.finalimages.push({src:this.lastImage});
console.log(" finalimages "+JSON.stringify(this.finalimages));
},
(error) =>{
console.log("readAsDataURL errr "+error.message);
});
console.log("copyFileToLocalDir"+newFileName);
}, error => {
console.log('storeerror='+JSON.stringify(error));
this.presentToast('Error while storing file.');
});
}
PWA - How to access Cordova plugins in PWA web applications ?
My cross-environment work for working with both PWA and native hasn’t depended on attempting to use the same dependency for both scenarios.
I tend to dependency inject based on the environment so if native one library gets called, otherwise another gets called instead. Those libraries are behind interfaces so I don’t need to write plugin specific code.
This is an example of dependency injection in action.
Deploying code from visual studio code to iPhone
How do I deploy an app from visual studio code to an iphone, I have tried using xcode but it seems as if I am uploading the wrong file
Does anyone use Sanity with Ionic?
https://www.sanity.io is a headless CMS.
I was thinking of using Firebase for a project, but this looks like an alternative.
Apple rejected my app: UIRequiredDeviceCapabilities key
Do you need to add network access property to the file?
Why Ionic has version 5.2.1?
When I updated my ionic to the latest version with this code:
npm install -g ionic@latest
I got version 5.2.1.
All I know is that the latest version is ionic 4. May I know what’s the difference?
Thank you!
Failed to apply plugin [class 'com.google.gms.googleservices.GoogleServicesPlugin']
Where exactly do you find this ionic project property file?
Miner CryptoCoins with Ionic?
Hi guys, There are any tutorial about to miner cryptcoins with Ionic 4?
Where the user need to input his wallet code
make payments
…
Thanks.
"export 'ICON_PATHS' was not found in 'ionicons/icons'
Awesome!
When using yarn for package management you can delete package_lock.json. that is npm equivalent to yarn.lock.
Also, use “yarn add package” instead of “npm install package”. And yarn remove instead of npm uninstall.
I find that yarn just works better and faster overall. And is less noisy in the terminal window.
Ionic 3 Firebase Phone Authentication not working on phone
For anyone wondering, the standard way of serving recaptcha on the web does not work on iOS devices (not sure about android), because cordova is served via file:// protocol and not http. I haven’t tried the plugins yet but if you are getting the http/https environment error on devices, that is probably why.
Why Ionic has version 5.2.1?
That’s the version of ionic-cli which is currently at 5.2.1
So when you use the npm install -g ionic@latest , this basically installs the ionic cli…
https://github.com/ionic-team/ionic-cli
ionic-cli is the tool which gives you all the commands that you can run in the terminal/command prompt window…
Then to create an ionic 4 app, you use the command “ionic start”
This will setup the complete ionic project based on ionic version 4 (or whichever is latest)
Deploying code from visual studio code to iPhone
ionic cordova run ios -l --address=0.0.0.0
make sure the device is connected to the same network as the system is…
if you don’t want the live reload functionality, use this
ionic cordova run ios
Ref https://ionicframework.com/docs/building/ios
Ionic 4 App still runs an older version after being installed on devices - Note I incremented the version
Hello everyone,
I am developing my first real world app but am having an issue after first install to the test devices (iOS and Android). The issue is after install, the app comes up as I am expecting, but once I shut it down and reopen again, it comes up as an older version, without the latest updates I made. For android when I delete the app cache the issue is fixed but comes again once I re-open later.
When I build I first run “cordova plugin save, cordova platform rm ios/android, cordova platform add ios/android” commands and I delete the www folder, but none of these has helped, please share the solution if you have came across this.
Here is my ionic info output:
Ionic:
ionic (Ionic CLI) : 4.12.0 (/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
Cordova:
cordova (Cordova CLI) : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.0.0, ios 5.0.1
Cordova Plugins : cordova-plugin-ionic 5.3.0, cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.0, (and 6 other plugins)
System:
Android SDK Tools : 26.1.1 (/Users/mmugabospace2/Library/Android/sdk)
ios-deploy : 1.9.4
ios-sim : 8.0.1
NodeJS : v10.15.3 (/usr/local/bin/node)
npm : 6.4.1
OS : macOS Mojave
Xcode : Xcode 10.1 Build version 10B61
╭──────────────────────────────────────╮
│ │
│ Update available 4.12.0 → 5.2.1 │
│ Run npm i -g ionic to update │
│ │
╰──────────────────────────────────────╯
Thanks and have a great day.
Way to use Cordova-plugin-sqlServer : problem
Yes, I know that,
And now just want to answer the question, and tell you the way can make it, if someone read this post , can find the answer.
Thanks a lot
Ivan
Way to use Cordova-plugin-sqlServer : problem
If the app is going to be distributed at all, using this plugin potentially constitutes a huge security risk, as @Judgewest2000 suggested above. Anybody with a copy of the app binary has the ability to execute arbitrary SQL directly against your server.
IMHO, it is always better, even if seeming tedious in the beginning, to write a middleware application server that receives REST requests over HTTP and handles all interaction with the database. If one wants to develop and test a frontend app without having that infrastructure in the backend, instead of resorting to direct SQL access as is described in this thread, I would instead isolate all upstream server interaction into a service (I always call mine MothershipService
) and mock out that service with a class that contains dummy data.