ionic-native

ionic2: network connectivity check during splash screen

拜拜、爱过 提交于 2019-12-12 02:08:15
问题 I've been trying hard to figure out how to check for network connectivity while the splashscreen is being displayed.I've searched for the code in many places but most of those articles are outdated. I followed the tutorial that's mentioned here:https://www.thepolyglotdeveloper.com/2016/01/determine-network-availability-in-an-ionic-2-mobile-app/ But then I found out that Network.connection is deprecated and has been replaced by Network.type on the ionic2 website. So I've replaced the word

Ionic App Availability plugin getting Error Object (…) is not a function

天涯浪子 提交于 2019-12-11 05:22:25
问题 I am trying to implement App Availability Feature in ionic. I have an app installed in my device and trying to check if that app exists from another app. But facing an issue in the same, getting the below error 回答1: Possibly you are facing mismatch of ionic version of app and the plugin version you installed in your app. In Ionic V3 you no need to import from '../ngx'; Ionic V3 and V4 have Different plugin url Ionic v3 plugins Ionic v4 plugins. For Ionic v3 App availability ionic cordova

Ionic app fails to launch after adding phonegap-plugin-push plugin

北战南征 提交于 2019-12-11 02:44:26
问题 My Ionic app stucks at splashscreen, after my attempt to add phonegap-plugin-push plugin following guides here: https://ionicframework.com/docs/native/push/ I tried remove and adding platforms, removing and adding phonegap-plugin-push plugin, the outcome is consistent - as long as the push plugin is added into my project, the app silently fails at launching screen without error. Here is the code at app.component.ts: constructor( public events: Events, public userData: UserData, public menu:

cordova - How to integrate CCAvenue to Ionic2

蓝咒 提交于 2019-12-11 02:15:32
问题 I am new in IONIC2 and Angular2. In my application I need payment gateway of CCavenue with merchant server. Please give me steps for that Issue. 回答1: There is no official native plugin for CCAvenue yet.You have few options here. Option 1: You have to write a native Cordova plugin using CCAvenue native android/iOS SDK. Option 2: There is an unofficial plugin which is for Ionic1.Maybe you can use it with Ionic2 after some changes.Here it is. Option 3: You have to use officially supported

Why ionic-native/contacts plugin crash the app when try to save contact at android 8?

二次信任 提交于 2019-12-11 00:40:59
问题 I try to save contact using ionic-native/contacts plugin , it works on all android versions except android 8, the app is stopped and closed. This is my code which is the same of ionic framework example: SaveToContact(phone, name) { try { let contact: Contact = this.contacts.create(); contact.name = new ContactName(null, name, ''); contact.phoneNumbers = [new ContactField('mobile', phone)]; this.global.presentToast('Will Save!'), contact.save().then( () => this.global.presentToast('Contact

Ionic phonegap-plugin-push is not working for web

怎甘沉沦 提交于 2019-12-10 22:28:29
问题 How do I add my Web API key for Google Firebase? in my ionic app for web platform** explanation -: 1. I am working on ionic App where I am trying to integrate it with PUSH (https://ionicframework.com/docs/native/push/) using firebase I have followed all the steps from https://ionicframework.com/docs/native/push/ Problem : Push notification is not working for web platform for ios and android it is working . I am putting the code below : ts file -: import { Push, PushObject, PushOptions } from

How to send POST requests with array properties (Ionic 2 HTTP plugin)?

无人久伴 提交于 2019-12-10 20:22:57
问题 In one of my Ionic 2 projects I need to send a POST request to a server with a JSON body that looks like this: var body = { "prop" : 1, "prop2" : "Test", "prop3": [{ "id" : "1", "qty": 1, "details": "Test" }] } I am using the following code to call the server using the native HTTP plugin (1.2.0) in Android: http.post(url, body, {}).then(function() { ... }) But my server is receiving the following: { "prop" : 1, "prop2" : "Test", "prop3": "[{ \"id\" : \"1\", \"qty\": 1, \"details\": \"Test\" }

Hide footer on keyboard open Ionic3

北城余情 提交于 2019-12-10 17:38:50
问题 I'm trying to hide the footer of my Ionic 3 app when the keyboard is open, i've followed the steps found on official documentation and also on this question's accepted answer: Hide tabs on keyboard open I've correctly installed the keyboard plugin and imported it in app.module.ts, i have this code in app.component.ts: this.platform.ready().then(() => { this.keyboard.onKeyboardShow().subscribe(() => { document.body.classList.add('keyboard-is-open'); }); this.keyboard.onKeyboardHide().subscribe

How to Store Array Data Using Ionic Native Storage?

蹲街弑〆低调 提交于 2019-12-10 14:50:51
问题 I'm planning to use ionic native storage to store some translation history, whenever there's a word being translated. The translation action (date, translate word) will be store in the ionic native storage, and when I open history page, a list of translation history will be shown. Here's the most basic code I got from the ionic official website: export class HomePage { DataArray: Array<string> = []; constructor(public navCtrl: NavController, private storage: Storage) { } // set a key/value

IONIC Android Apk File size Way Too Big ! how to decrease the size of app for android?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-10 07:01:09
问题 I have developed the app using ionic 3 and now while generating android apk file it 's size getting way too big. before the API integration The File Size Was 4.8MB once I Started API Interation I just Modified 10 Pages Then The APK File Size became 71 MB Cordova Plugins I have Used cordova-plugin-console cordova-plugin-datepicker cordova-plugin-device cordova-plugin-network-information cordova-plugin-splashscreen cordova-plugin-statusbar cordova-plugin-whitelist cordova-plugin-x-socialsharing