Quantcast
Channel: Ionic Forum - Latest topics
Viewing all 70434 articles
Browse latest View live

Push pre rendered page

$
0
0

@LucaFeger wrote:

Is there any way to push a pre rendered page into the view?
My component has very complex mechanics behind the rendering so I won’t render it every time, I switch pages.

Posts: 1

Participants: 1

Read full topic


Ionic tabs inactive icon color not show on iOS

$
0
0

@MarcFL wrote:

Hello,

I use ionic-v3 to create a Tabs App. There is issue that tabs inactive icon color not visible on iOS

In my variables.scss I set tabs colors like this:

$tabs-background: color($colors, primary); // #2094A7
$tabs-tab-color-inactive: #142735;
$tabs-tab-color-active: #FFFFFF;
// For iOS
$tabs-ios-tab-text-color: $tabs-tab-color-inactive;
$tabs-ios-tab-icon-color: $tabs-tab-color-inactive;
$tabs-ios-tab-text-color-active: $tabs-tab-color-active;
$tabs-ios-tab-icon-color-active: $tabs-tab-color-active;

In my tabs.scss:

page-tabs {
.tab-button-text {
font-family: $font-montserrat-semibold;
font-size: 3.5vw;
}
}

All right on Android
Capture-android

and on iOS, the text color show correctly and the active icon color is right too just like the photo.
image

when I test on browser, I found the color property of tabs ion-icon has correctly setted

by example for the tab calendar:
Capture-css

So is anyone has this issue and how do you solved?

Thanks

Posts: 1

Participants: 1

Read full topic

Customizing internal CSS in Ionic v4

$
0
0

@schngrg wrote:

How to customize CSS of components in Ionic v4?

We have some not-so-common requirements in Ionic v3 apps, which we would like to upgrade to v4 someday soon. Like making a tab icon blink in some cases (to alert user to check something urgent that has showed up on that tab). Customizing list-view and list-item’s label/icon for the margins and borders. Making the entire background of tabs/pages transparent to see-through whatever is underneath (and also let the clicks pass-though). Customizing sliders to ‘start’ from the middle instead of from the left. Changing text size/color/alignment for some alerts, action-sheets. etc…

I think the recommended way now is to use the API variables instead of customizing/overwriting internal CSS of Ionic components but that is unlikely to ever cover ‘all’ the possible cases. There are way too many cases for how every app would want to customize the look and feel. Its good to have these API variables to cover more and more of the common cases over time, making it much easier and blissful to use Ionic. But that definitely can’t be the only way - I don’t think Ionic team will ever be able to cover all such cases. And maybe they shouldn’t, not every customization that a designer/customer asks for will be a good idea - some of them are terrible ideas - but they need to be implemented anyway and probably shouldn’t become a part of standard Ionic API/features.

So while using API variables should be preferred wherever possible, how can the CSS of components be customized for rest of the cases? Any pointer to standard documentation about this will help.

Posts: 1

Participants: 1

Read full topic

Ads not displaying on ionic app

$
0
0

@Akarsh12 wrote:

I am building a mobile app through wordpress rest api. So the ads in the wordpress website are not visible on my app. Can anyone please help me with this.

Posts: 1

Participants: 1

Read full topic

Virtual Scroll Jasmine no render

$
0
0

@BrankoEnero wrote:

I’m trying to test Virtual Scroll into an ion-list by using jasmine, but it never renders.

There someone knowing some way to test that directive?

Thanks!!

Posts: 1

Participants: 1

Read full topic

Ionic local notifications TypeError: Object(…) is not a function

$
0
0

@BOUKHLIF wrote:

I got this error after i call the schedule method on localNotifications plugin.

import {Component} from '@angular/core';
import {NavController} from 'ionic-angular';
import {SocketsProvider} from "../../providers/sockets/sockets";
import {LocalNotifications} from "@ionic-native/local-notifications/ngx";

@Component({
    selector: 'page-home',
    templateUrl: 'home.html'
})
export class HomePage {

constructor(public navCtrl: NavController,
            private socket: SocketsProvider,
            private localNotifications: LocalNotifications) {
}

ionViewDidLoad() {
    this.socket.get().listen('ReservationGuideAssigned', notification => {
        console.log(notification);
        this.data.incrementNotificationsCount(1);
        this.launchNotification(notification.reservation_id, notification.reservation_code);
    });
}

private launchNotification(reservationId, reservationCode) {
    this.localNotifications.schedule({
        title: 'Nouvelle reservation',
        text: `Réservation No ${reservationCode}`,
        data: {
            reservationId: reservationId,
        }
    });
}
}

app.module.ts

// ....

import {LocalNotifications} from "@ionic-native/local-notifications/ngx";

@NgModule({
    // ....
    providers: [
        LocalNotifications,
    ]
})
export class AppModule {
}

package.json

{
//....
"dependencies": {
"@angular/animations": "5.2.11",
"@angular/common": "5.2.11",
"@angular/compiler": "5.2.11",
"@angular/compiler-cli": "5.2.11",
"@angular/core": "5.2.11",
"@angular/forms": "5.2.11",
"@angular/http": "5.2.11",
"@angular/platform-browser": "5.2.11",
"@angular/platform-browser-dynamic": "5.2.11",
"@ionic-native/core": "~4.18.0",
"@ionic-native/local-notifications": "^5.0.0",
"@ionic-native/splash-screen": "~4.18.0",
"@ionic-native/status-bar": "~4.18.0",
"@ionic/storage": "^2.2.0",
"cordova-android": "^7.1.4",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-ionic-keyboard": "^2.1.3",
"cordova-plugin-ionic-webview": "^2.3.1",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-statusbar": "^2.4.2",
"cordova-plugin-whitelist": "^1.3.3",
"ionic-angular": "3.9.2",
"ionicons": "3.0.0",
"laravel-echo": "^1.5.2",
"pusher-js": "^4.3.1",
"rxjs": "5.5.11",
"sw-toolbox": "3.6.0",
"zone.js": "0.8.26"
},
"devDependencies": {
  "@ionic/app-scripts": "3.2.1",
  "typescript": "~2.6.2"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
  "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": {},
  "cordova-plugin-local-notification": {}
},
"platforms": [
  "android"
]
}
}

config.xml

<plugin name="cordova-plugin-whitelist" spec="1.3.3" />
<plugin name="cordova-plugin-statusbar" spec="2.4.2" />
<plugin name="cordova-plugin-device" spec="2.0.2" />
<plugin name="cordova-plugin-splashscreen" spec="5.0.2" />
<plugin name="cordova-plugin-ionic-webview" spec="^2.0.0" />
<plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" />
<engine name="android" spec="^7.1.4" />
<plugin name="cordova-plugin-local-notification" spec="~0.9.0-beta.3" />

Here is the error

Uncaught TypeError: Object(...) is not a function
at LocalNotifications.schedule (index.js:49)
at HomePage.webpackJsonp.76.HomePage.launchNotification (home.ts:76)
at home.ts:49
at PrivateChannel.Dispatcher.emit (pusher.js:1596)
at PrivateChannel.Channel.handleEvent (pusher.js:3238)
at pusher.js:136
at ConnectionManager.Dispatcher.emit (pusher.js:1596)
at message (pusher.js:8168)
at Connection.Dispatcher.emit (pusher.js:1596)
at message (pusher.js:2984)

I tried to update @ionic-native and i got the same error, but at the startup of the application.

I also tried to work directly with cordova, with code like this :

cordova.plugins.notification.local.schedule(...)

but cordova is unknown in the browser, so the application crashes.

please help me, I need to work with ionic native, so that i can test the other components of the application without being blocked by cordova.

Thanks

Posts: 1

Participants: 1

Read full topic

How to navigate between pages in Ionic 4

$
0
0

@erald123 wrote:

I trying to figure out how to navigate between pages in Ionic 4.In v3 the way is:

import { Component } from '@angular/core';
import { WelcomePage } from '../welcome/welcome';

@Component({
  selector: 'app-home',
  templateUrl: 'home.page.html',
  styleUrls: ['home.page.scss'],
})
export class HomePage {
  openWelcomePage() {
    this.navCtrl.push(WelcomePage);
  }
}

but in v4 is giving an error:
Screenshot_2019-01-25_15-57-12

Posts: 1

Participants: 1

Read full topic

ViewChild IonSelect dont work with popover

$
0
0

@Fouk wrote:

Hello everyone,

I work with Ionic v4.0 final release.
I try to call ion-select by viewchild with interface = ‘popover’ but dont work :frowning:
If i try with interface = ‘action-sheet’ or interface = ‘alert’, it’s work perfectly

TypeScript

import { Component, ViewChild } from '@angular/core';
import { IonSelect } from '@ionic/angular';

@Component({
    selector: 'app-home',
    templateUrl: 'home.page.html',
    styleUrls: ['home.page.scss'],
})
export class HomePage {
    @ViewChild('mySelect') public myselect: IonSelect;
    public colorSelected = '#ff6600';

    open() {
        this.myselect.interface = 'popover';
        this.myselect.open();
    }
}

HTML

<ion-toolbar>
    <ion-title>Ionic Blank</ion-title>

    <ion-buttons slot="end">
        <ion-button color="primary" (click)="open()">
            <ion-icon slot="icon-only" name="color-palette" [ngStyle]="{'color': colorSelected}"></ion-icon>

            <ion-select #mySelect [hidden]="true" [(ngModel)]="colorSelected">
                <ion-select-option value="#ff6600">Orange</ion-select-option>
                <ion-select-option value="#cccc00">Yellow</ion-select-option>
                <ion-select-option value="#000000">Black</ion-select-option>
                <ion-select-option value="#0066ff">Blue</ion-select-option>
            </ion-select>
        </ion-button>

    </ion-buttons>
</ion-toolbar>

Anyone have an idea ? I need popover :worried:

Thx !

Posts: 1

Participants: 1

Read full topic


mediaCaptuer, Media ,File error

How do I migrate angular7 project?

$
0
0

@AsimNet wrote:

Hello,
how do I migrate our angular7 project to ionic4?
simply by calling:

ionic init

then I imported the following to app.module.ts:

import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { RouteReuseStrategy } from '@angular/router';

then in imports array:

  imports: [
    .
    .
    .
    IonicModule.forRoot(),
]

and in providers:

  providers: [
    .
    .
    .
    { provide: RouteReuseStrategy, useClass: IonicRouteStrategy },
]

then ionic serve --project= YOUR_PROJECT_NAME --configuration=YOUR_ENVIRONMENT_NAME

:tada::tada::muscle::muscle:

Posts: 1

Participants: 1

Read full topic

Download large amounts of data with Ionic

$
0
0

@blauwberry wrote:

We are looking into Ionic to see if we can merge our Xamarin App & Electron app into a single codebase. When reading the documentation it’s not completely clear what the limitations are.

We need an app which can download & sync presentations. Presentations are created as static HTML5 and can run standalone in a separate webview.

What we need is an overview with available presentations, a downloader/updater, and when ready a webview to show the downloaded content. This surrounded with a simple interface.

From previous apps we know that a big amount of files (downloading / checking / syncing) can be a bit heavy. Before we are going to start with ionic I hope you guys could tell me if it’s possible.

I read different options for downloading content. We would like to store the files in the app. A presentation can contain all kind of assets, videos from 30MB or complete presentations of 300MB. We would like to store the data in separate folders and just open the .index.html. All relative assets need to stay in the same folder.

Is there a good plugin that works with a local file api for each platform?

Posts: 1

Participants: 1

Read full topic

Adding Ionic v4 components in Ionic v3 app

$
0
0

@schngrg wrote:

Goal here is to do an incremental update or incremental adoption of newer Ionic4 components while letting the larger app (including navigation) stay v3, for a while.

Ionic v4 can be added to an app just by including it in html, like this:

<link href="https://unpkg.com/@ionic/core@latest/css/ionic.bundle.css" rel="stylesheet">
<script src="https://unpkg.com/@ionic/core@latest/dist/ionic.js"></script>

If we do this in a v3 app, my concern is that some of the ionic-component names are common between Ionic v3 and v4. Which is likely to cause confusion/errors.

Has anyone tried this? Is this is likely to fail magnificently and not even worth trying, or can it mostly work if done with some care?

Can it be worth the effort to do a custom build of Ionic v4 where all v4 component names are prefixed like <v4-ion-button> etc… to allow for easier and incremental migration/adoption of v4 in larger apps?

Posts: 1

Participants: 1

Read full topic

Ionic Documentation not working

$
0
0

@turkinan wrote:


site loads the content and disappears,
it is same for the new release v4 documentation and the stencil web site.
tested on mac chrome, mac safari, mac firefox, windows 10 chrome, windows 10 firefox

Posts: 2

Participants: 2

Read full topic

Build address link to open in any map app

$
0
0

@helpmelearn wrote:

Probably a long shot but what I’m trying to do is have the ability for a user to click an address (or a button) that would give them the option(s) to open the address in some map app. The world seems to be tied to google maps so not easy to break free of it. Our customers could have different map apps installed.
Really seems like the problem is there is no way to setup a link and let the web know its an address.
I tried something like this window.open(‘maps://?q=’ + address, ‘_system’); didn’t really work.

Pretty much a long shot.

Posts: 1

Participants: 1

Read full topic

Create ionic 4 app inside Angular CLI projects structure

$
0
0

@lduveau wrote:

Hi,
I am looking for a way to “ionic start” a project and having it in the projects folder of an existing Angular CLI solution (containing a web app and a lib already).

Posts: 1

Participants: 1

Read full topic


Possible to create a ZIP file in Ionic?

$
0
0

@mlynch wrote:

My Android+iOS app will allow the user to create multiple files, and when things are working properly they’ll be able to upload them individually to a hosting site I have. I’d like to create a way for users to simply mass-upload all of their files and data at once, in case there’s something wrong with the upload and we need to go through the raw data ourselves.

Is there any way to create a single .zip file from a folder?

Or is there a way to use File Transfer or an HTTP send to upload an entire folder’s worth of data, not just an individual file?

Posts: 1

Participants: 1

Read full topic

Ionic --Prod Mode. error blank screen and Cannot find module "." Only with (Cordova run android --prod)

$
0
0

@mesutcakir wrote:

Hi,

I’m Ionic serve -lsc and ionic cordova run android perfectly working and console in has not errors.

After run this commands “ionic cordova run android --prod”

Build successfull > Apk created successful > Device install successfull
but
Open blank screeen chrome inspect tool one error

cordova.js:1219 deviceready has not fired after 5 seconds.
cordova.js:1212 Channel not fired: onPluginsReady
cordova.js:1212 Channel not fired: onCordovaReady
cordova.js:1212 Channel not fired: onDOMContentLoaded
vendor.js:1 Uncaught Error: Cannot find module "."
    at vendor.js:1
    at vendor.js:1
    at Object.<anonymous> (vendor.js:1)
    at e (vendor.js:1)
    at Object.366 (main.js:1)
    at e (vendor.js:1)
    at window.webpackJsonp (vendor.js:1)
    at main.js:1
(anonymous) @ vendor.js:1
(anonymous) @ vendor.js:1
(anonymous) @ vendor.js:1
e @ vendor.js:1
366 @ main.js:1
e @ vendor.js:1
window.webpackJsonp @ vendor.js:1
(anonymous) @ main.js:1
vendor.js:1 Ionic Native: deviceready event fired after 1780 ms

Ionic:

   ionic (Ionic CLI)  : 4.9.0 (C:\Users\Mesut\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.2

Cordova:

   cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
   Cordova Platforms     : android 7.1.4
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.2, (and 8 other plugins)

System:

   NodeJS : v10.14.2 (C:\Program Files\nodejs\node.exe)
   npm    : 4.6.1
   OS     : Windows 10

Package.json

{
  "name": "test.ionic",
  "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": "ionic-app-scripts serve"
  },
  "dependencies": {
    "@angular/animations": "^7.1.4",
    "@angular/common": "^7.1.4",
    "@angular/compiler": "^7.1.4",
    "@angular/compiler-cli": "^7.1.4",
    "@angular/core": "^7.1.4",
    "@angular/forms": "^7.1.4",
    "@angular/http": "^7.1.4",
    "@angular/platform-browser": "^7.1.4",
    "@angular/platform-browser-dynamic": "^7.1.4",
    "@ionic-native/core": "^4.18.0",
    "@ionic-native/device": "^4.17.0",
    "@ionic-native/firebase": "^4.18.0",
    "@ionic-native/geolocation": "^4.18.0",
    "@ionic-native/image-picker": "^4.18.0",
    "@ionic-native/open-native-settings": "^4.18.0",
    "@ionic-native/splash-screen": "^4.18.0",
    "@ionic-native/status-bar": "^4.18.0",
    "@ionic/storage": "^2.2.0",
    "angularfire2": "^5.1.1",
    "cordova-android": "^7.1.4",
    "cordova-browser": "5.0.4",
    "cordova-plugin-device": "^2.0.2",
    "cordova-plugin-geolocation": "4.0.1",
    "cordova-plugin-ionic-keyboard": "^2.1.3",
    "cordova-plugin-ionic-webview": "^2.3.1",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-telerik-imagepicker": "~2.2.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "cordova-sqlite-storage": "^2.6.0",
    "firebase": "^5.7.2",
    "ionic-angular": "3.9.2",
    "ionic-native-http-connection-backend": "^4.0.8",
    "ionicons": "^4.5.1",
    "rxjs": "^6.3.3",
    "rxjs-compat": "^6.3.3",
    "sw-toolbox": "3.6.0",
    "zone.js": "0.8.26"
  },
  "devDependencies": {
    "@ionic/app-scripts": "3.1.11",
    "@ionic/cli-plugin-proxy": "1.5.8",
    "@ionic/lab": "^1.0.16",
    "node-sass": "4.11.0",
    "typescript": "^2.7.2"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-device": {},
      "cordova-plugin-whitelist": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-ionic-keyboard": {},
      "cordova-sqlite-storage": {},
      "cordova-plugin-telerik-imagepicker": {
        "PHOTO_LIBRARY_USAGE_DESCRIPTION": "your usage message"
      },
      "cordova-plugin-geolocation": {
        "GEOLOCATION_USAGE_DESCRIPTION": "To locate you"
      },
      "cordova-plugin-firebase": {},
      "cordova-open-native-settings": {}
    },
    "platforms": [
      "browser",
      "android"
    ]
  }
}

Posts: 1

Participants: 1

Read full topic

Cannot build ionic 4 app with any native plugins: Error TS2304: Cannot find name 'FileTransfer'

$
0
0

@sjregan wrote:

Hi,

I am trying to migrate my Ionic v3 (Angular) app to Ionic v4 (Angular) and I am stuck trying to use any of the Ionic native plugins. Whenever I run ionic s I get the following compilation errors:

[ng] ERROR in src/app/services/chat.service.ts(48,27): error TS2304: Cannot find name 'FileTransfer'.
[ng] src/app/services/in-app-browser.service.ts(11,22): error TS2304: Cannot find name 'InAppBrowser'.
[ng] src/app/services/in-app-browser.service.ts(13,39): error TS2304: Cannot find name 'SafariViewController'.
[ng] src/app/services/push-notifications.service.ts(28,25): error TS2304: Cannot find name 'Device'.
[ng] src/app/services/push-notifications.service.ts(30,23): error TS2304: Cannot find name 'Push'.

My environment:

Ionic:

   ionic (Ionic CLI)             : 4.9.0 (/usr/local/lib/node_modules/ionic)
   Ionic Framework               : @ionic/angular 4.0.0
   @angular-devkit/build-angular : 0.12.3
   @angular-devkit/schematics    : 7.2.3
   @angular/cli                  : 7.2.3
   @ionic/angular-toolkit        : 1.2.3

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : android 7.1.4, ios 4.5.5
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.2, (and 21 other plugins)

System:

   ios-deploy : 1.9.4
   NodeJS     : v10.15.0 (/usr/local/bin/node)
   npm        : 6.4.1
   OS         : macOS Mojave
   Xcode      : Xcode 10.1 Build version 10B61

Thanks for any help you can provide.

Posts: 6

Participants: 2

Read full topic

"Could not find method google() for arguments [] on repository container"

$
0
0

@stefk wrote:

I’m attempting to update a legacy Ionic v1 app to include push notifications.

I’ve set up my app with firebase, and for v1 support I went with adding phonegap-plugin-push@1.9.0.

I’m now unable to build for Android due to this build.gradle error. I have no idea what it means, and search results have not helped me as of yet.

Here is my build.gradle file (error occurs at line 46):

/*
       Licensed to the Apache Software Foundation (ASF) under one
       or more contributor license agreements.  See the NOTICE file
       distributed with this work for additional information
       regarding copyright ownership.  The ASF licenses this file
       to you under the Apache License, Version 2.0 (the
       "License"); you may not use this file except in compliance
       with the License.  You may obtain a copy of the License at

         http://www.apache.org/licenses/LICENSE-2.0

       Unless required by applicable law or agreed to in writing,
       software distributed under the License is distributed on an
       "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
       KIND, either express or implied.  See the License for the
       specific language governing permissions and limitations
       under the License.
*/

apply plugin: 'com.android.application'

buildscript {
    repositories {
        jcenter()
        maven { url 'https://maven.fabric.io/public' } // Fabrics Maven repository from cordova-plugin-firebase
        maven {
            url "https://maven.google.com"
        }
    }

    // Switch the Android Gradle plugin version requirement depending on the
    // installed version of Gradle. This dependency is documented at
    // http://tools.android.com/tech-docs/new-build-system/version-compatibility
    // and https://issues.apache.org/jira/browse/CB-8143
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.3'
        classpath 'com.google.gms:google-services:4.1.0' // google-services dependency from cordova-plugin-firebase
        classpath 'io.fabric.tools:gradle:1.25.4' // fabric dependency from cordova-plugin-firebase
    }
}

// Allow plugins to declare Maven dependencies via build-extras.gradle.
allprojects {
    repositories {
        jcenter()
        google() // Google's Maven repository from cordova-plugin-firebase
        maven {
            url "https://maven.google.com"
        }
    }
}

task wrapper(type: Wrapper) {
    gradleVersion = '2.14.1'
}

// Configuration properties. Set these via environment variables, build-extras.gradle, or gradle.properties.
// Refer to: http://www.gradle.org/docs/current/userguide/tutorial_this_and_that.html
ext {
    apply from: 'CordovaLib/cordova.gradle'
    // The value for android.compileSdkVersion.
    if (!project.hasProperty('cdvCompileSdkVersion')) {
        cdvCompileSdkVersion = null;
    }
    // The value for android.buildToolsVersion.
    if (!project.hasProperty('cdvBuildToolsVersion')) {
        cdvBuildToolsVersion = null;
    }
    // Sets the versionCode to the given value.
    if (!project.hasProperty('cdvVersionCode')) {
        cdvVersionCode = null
    }
    // Sets the minSdkVersion to the given value.
    if (!project.hasProperty('cdvMinSdkVersion')) {
        cdvMinSdkVersion = null
    }
    // Whether to build architecture-specific APKs.
    if (!project.hasProperty('cdvBuildMultipleApks')) {
        cdvBuildMultipleApks = null
    }
    // .properties files to use for release signing.
    if (!project.hasProperty('cdvReleaseSigningPropertiesFile')) {
        cdvReleaseSigningPropertiesFile = null
    }
    // .properties files to use for debug signing.
    if (!project.hasProperty('cdvDebugSigningPropertiesFile')) {
        cdvDebugSigningPropertiesFile = null
    }
    // Set by build.js script.
    if (!project.hasProperty('cdvBuildArch')) {
        cdvBuildArch = null
    }

    // Plugin gradle extensions can append to this to have code run at the end.
    cdvPluginPostBuildExtras = []
}

// PLUGIN GRADLE EXTENSIONS START
apply from: "com.synconset.imagepicker/<redacted>-ignorelinterrors.gradle"
apply from: "com.synconset.imagepicker/<redacted>-androidtarget.gradle"
apply from: "cordova-plugin-crosswalk-webview/<redacted>-xwalk.gradle"
apply from: "phonegap-plugin-push/<redacted>-push.gradle"
apply from: "cordova-plugin-firebase/<redacted>-build.gradle"
// PLUGIN GRADLE EXTENSIONS END

def hasBuildExtras = file('build-extras.gradle').exists()
if (hasBuildExtras) {
    apply from: 'build-extras.gradle'
}

// Set property defaults after extension .gradle files.
if (ext.cdvCompileSdkVersion == null) {
    ext.cdvCompileSdkVersion = privateHelpers.getProjectTarget()
}
if (ext.cdvBuildToolsVersion == null) {
    ext.cdvBuildToolsVersion = privateHelpers.findLatestInstalledBuildTools()
}
if (ext.cdvDebugSigningPropertiesFile == null && file('debug-signing.properties').exists()) {
    ext.cdvDebugSigningPropertiesFile = 'debug-signing.properties'
}
if (ext.cdvReleaseSigningPropertiesFile == null && file('release-signing.properties').exists()) {
    ext.cdvReleaseSigningPropertiesFile = 'release-signing.properties'
}

// Cast to appropriate types.
ext.cdvBuildMultipleApks = cdvBuildMultipleApks == null ? false : cdvBuildMultipleApks.toBoolean();
ext.cdvMinSdkVersion = cdvMinSdkVersion == null ? null : Integer.parseInt('' + cdvMinSdkVersion)
ext.cdvVersionCode = cdvVersionCode == null ? null : Integer.parseInt('' + cdvVersionCode)

def computeBuildTargetName(debugBuild) {
    def ret = 'assemble'
    if (cdvBuildMultipleApks && cdvBuildArch) {
        def arch = cdvBuildArch == 'arm' ? 'armv7' : cdvBuildArch
        ret += '' + arch.toUpperCase().charAt(0) + arch.substring(1);
    }
    return ret + (debugBuild ? 'Debug' : 'Release')
}

// Make cdvBuild a task that depends on the debug/arch-sepecific task.
task cdvBuildDebug
cdvBuildDebug.dependsOn {
    return computeBuildTargetName(true)
}

task cdvBuildRelease
cdvBuildRelease.dependsOn {
    return computeBuildTargetName(false)
}

task cdvPrintProps << {
    println('cdvCompileSdkVersion=' + cdvCompileSdkVersion)
    println('cdvBuildToolsVersion=' + cdvBuildToolsVersion)
    println('cdvVersionCode=' + cdvVersionCode)
    println('cdvMinSdkVersion=' + cdvMinSdkVersion)
    println('cdvBuildMultipleApks=' + cdvBuildMultipleApks)
    println('cdvReleaseSigningPropertiesFile=' + cdvReleaseSigningPropertiesFile)
    println('cdvDebugSigningPropertiesFile=' + cdvDebugSigningPropertiesFile)
    println('cdvBuildArch=' + cdvBuildArch)
    println('computedVersionCode=' + android.defaultConfig.versionCode)
    android.productFlavors.each { flavor ->
        println('computed' + flavor.name.capitalize() + 'VersionCode=' + flavor.versionCode)
    }
}

android {
    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
            jniLibs.srcDirs = ['libs']
        }
    }

    defaultConfig {
        versionCode cdvVersionCode ?: new BigInteger("" + privateHelpers.extractIntFromManifest("versionCode"))
        applicationId privateHelpers.extractStringFromManifest("package")

        if (cdvMinSdkVersion != null) {
            minSdkVersion cdvMinSdkVersion
        }
    }

    lintOptions {
      abortOnError false;
    }

    compileSdkVersion cdvCompileSdkVersion
    buildToolsVersion cdvBuildToolsVersion

    if (Boolean.valueOf(cdvBuildMultipleApks)) {
        productFlavors {
            armv7 {
                versionCode defaultConfig.versionCode*10 + 2
                ndk {
                    abiFilters "armeabi-v7a", ""
                }
            }
            x86 {
                versionCode defaultConfig.versionCode*10 + 4
                ndk {
                    abiFilters "x86", ""
                }
            }
            all {
                ndk {
                    abiFilters "all", ""
                }
            }
        }
    }
    /*

    ELSE NOTHING! DON'T MESS WITH THE VERSION CODE IF YOU DON'T HAVE TO!

    else if (!cdvVersionCode) {
      def minSdkVersion = cdvMinSdkVersion ?: privateHelpers.extractIntFromManifest("minSdkVersion")
      // Vary versionCode by the two most common API levels:
      // 14 is ICS, which is the lowest API level for many apps.
      // 20 is Lollipop, which is the lowest API level for the updatable system webview.
      if (minSdkVersion >= 20) {
        defaultConfig.versionCode += 9
      } else if (minSdkVersion >= 14) {
        defaultConfig.versionCode += 8
      }
    }
    */

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_6
        targetCompatibility JavaVersion.VERSION_1_6
    }

    if (cdvReleaseSigningPropertiesFile) {
        signingConfigs {
            release {
                // These must be set or Gradle will complain (even if they are overridden).
                keyAlias = ""
                keyPassword = "__unset" // And these must be set to non-empty in order to have the signing step added to the task graph.
                storeFile = null
                storePassword = "__unset"
            }
        }
        buildTypes {
            release {
                signingConfig signingConfigs.release
            }
        }
        addSigningProps(cdvReleaseSigningPropertiesFile, signingConfigs.release)
    }
    if (cdvDebugSigningPropertiesFile) {
        addSigningProps(cdvDebugSigningPropertiesFile, signingConfigs.debug)
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
    // SUB-PROJECT DEPENDENCIES START
    debugCompile(project(path: "CordovaLib", configuration: "debug"))
    releaseCompile(project(path: "CordovaLib", configuration: "release"))
    compile "com.android.support:appcompat-v7:23+"
    compile "com.android.support:support-v4:24.1.1+"
    compile "com.google.android.gms:play-services-analytics:+"
    compile "com.google.android.gms:play-services-appindexing:+"
    compile "com.google.android.gms:play-services:+"
    compile "com.android.support:support-v13:23+"
    compile "com.google.android.gms:play-services-gcm:9.8+"
    compile "me.leolin:ShortcutBadger:1.1.4@aar"
    compile "com.google.android.gms:play-services-tagmanager:+"
    compile "com.google.firebase:firebase-core:+"
    compile "com.google.firebase:firebase-messaging:+"
    compile "com.google.firebase:firebase-config:+"
    compile "com.google.firebase:firebase-perf:+"
    // SUB-PROJECT DEPENDENCIES END
}

def promptForReleaseKeyPassword() {
    if (!cdvReleaseSigningPropertiesFile) {
        return;
    }
    if ('__unset'.equals(android.signingConfigs.release.storePassword)) {
        android.signingConfigs.release.storePassword = privateHelpers.promptForPassword('Enter key store password: ')
    }
    if ('__unset'.equals(android.signingConfigs.release.keyPassword)) {
        android.signingConfigs.release.keyPassword = privateHelpers.promptForPassword('Enter key password: ');
    }
}

gradle.taskGraph.whenReady { taskGraph ->
    taskGraph.getAllTasks().each() { task ->
        if (task.name == 'validateReleaseSigning' || task.name == 'validateSigningRelease') {
            promptForReleaseKeyPassword()
        }
    }
}

def addSigningProps(propsFilePath, signingConfig) {
    def propsFile = file(propsFilePath)
    def props = new Properties()
    propsFile.withReader { reader ->
        props.load(reader)
    }

    def storeFile = new File(props.get('key.store') ?: privateHelpers.ensureValueExists(propsFilePath, props, 'storeFile'))
    if (!storeFile.isAbsolute()) {
        storeFile = RelativePath.parse(true, storeFile.toString()).getFile(propsFile.getParentFile())
    }
    if (!storeFile.exists()) {
        throw new FileNotFoundException('Keystore file does not exist: ' + storeFile.getAbsolutePath())
    }
    signingConfig.keyAlias = props.get('key.alias') ?: privateHelpers.ensureValueExists(propsFilePath, props, 'keyAlias')
    signingConfig.keyPassword = props.get('keyPassword', props.get('key.alias.password', signingConfig.keyPassword))
    signingConfig.storeFile = storeFile
    signingConfig.storePassword = props.get('storePassword', props.get('key.store.password', signingConfig.storePassword))
    def storeType = props.get('storeType', props.get('key.store.type', ''))
    if (!storeType) {
        def filename = storeFile.getName().toLowerCase();
        if (filename.endsWith('.p12') || filename.endsWith('.pfx')) {
            storeType = 'pkcs12'
        } else {
            storeType = signingConfig.storeType // "jks"
        }
    }
    signingConfig.storeType = storeType
}

for (def func : cdvPluginPostBuildExtras) {
    func()
}

// This can be defined within build-extras.gradle as:
//     ext.postBuildExtras = { ... code here ... }
if (hasProperty('postBuildExtras')) {
    postBuildExtras()
}

Here is a list of plugins I am using:

com.synconset.imagepicker 2.1.8 "ImagePicker"
cordova-plugin-app-version 0.1.9 "AppVersion"
cordova-plugin-camera 2.4.1 "Camera"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-console 1.1.0 "Console"
cordova-plugin-crosswalk-webview 2.4.0 "Crosswalk WebView Engine"
cordova-plugin-device 1.1.6 "Device"
cordova-plugin-file 4.3.3 "File"
cordova-plugin-file-transfer 1.6.3 "File Transfer"
cordova-plugin-firebase 2.0.5 "Google Firebase Plugin"
cordova-plugin-geolocation 2.4.3 "Geolocation"
cordova-plugin-google-analytics 0.8.1 "Google Universal Analytics Plugin"
cordova-plugin-inappbrowser 1.7.1 "InAppBrowser"
cordova-plugin-network-information 1.3.3 "Network Information"
cordova-plugin-screen-orientation 2.0.1 "Screen Orientation"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.3 "StatusBar"
cordova-plugin-vibration 2.1.5 "Vibration"
cordova-plugin-whitelist 1.3.2 "Whitelist"
cordova-sqlite-storage 2.0.4 "Cordova sqlite storage plugin"
es6-promise-plugin 4.1.0 "Promise"
google-app-indexing-cordova-android 1 "Android Google App Indexing Cordova Plugin"
ionic-plugin-deeplinks 1.0.17 "Ionic Deeplink Plugin"
ionic-plugin-keyboard 2.2.1 "Keyboard"
phonegap-plugin-push 1.9.0 "PushPlugin"

Note: the firebase plugin seems to be installed with the push plugin automatically, I am not installing it manually.

Posts: 1

Participants: 1

Read full topic

How to close In app browser window and update ionic view

$
0
0

@anilm wrote:

I have redirected to user on paytm site. If payment is successful then , in app browser window should be closed and ionic view should be update.
How I can achieve this using IONIC 3

Posts: 1

Participants: 1

Read full topic

Viewing all 70434 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>