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

How to clear cache for image after edit?

$
0
0

@AbdallahR99 wrote:

when i edit some image and update new image have same name on server, the app still caching and show the old image for a certain time or until reinstall the app, how to fix that? how to clear the cache of old image after edit it?

Posts: 1

Participants: 1

Read full topic


How to use Ion-Refresher on a smaller portion of the page

$
0
0

@emptygod wrote:

I have recently started using Ionic V4 and I am having a hard time figuring out how to implement a pull down refresh without pulling down the entire ion-content which contains the whole page. If I try to use a nested ion-content, the refresher does not display correctly. What am I missing?

Posts: 1

Participants: 1

Read full topic

Dynamically check a checkbox

$
0
0

@dccil wrote:

Hello,

I would like to check a checkbox from ChecklistPage and have a checkbox at HomePage automatically be checked. I’m currently doing it using Events by doing the publish on ChecklistPage checkbox function and doing the subscribe on Homepage.

ChecklistPage.html

<ion-item>
        <ion-label>I Choose Food. </ion-label>
        <ion-checkbox (ionChange)="addCheckbox($event)" color="danger""></ion-checkbox>
   </ion-item>

ChecklistPage.ts

    addCheckbox(event, checkbox : String) {
        if ( event.checked ) {
          this.checked.push(checkbox);
        } else {
          let index = this.removeCheckedFromArray(checkbox);
          this.checked.splice(index,1);
        };
        let choice = event.checked;
        this.events.publish('User chose:', choice);
        console.log('User chose:', choice)
      }

HomePage.html

        <ion-item>
          <ion-label>
          Checklist
          </ion-label>
            <ion-checkbox [checked]="ischecked"></ion-checkbox>
        </ion-item>

HomePage.ts

ischecked: boolean;

  constructor(public navCtrl: NavController,
              public navParams: NavParams
              public events: Events) {

              this.events.subscribe('User Chose:', (choice) => {
                if (choice === 'true') {
                  this.ischecked = true;
                }
              });
            }

Posts: 1

Participants: 1

Read full topic

Looking for a Ionic 4 Developer (New Project) - Freelance

$
0
0

@andreamada wrote:

Hello,
I’m looking for a Ionic 4 Developer for a iOS/Android App.
The app will be composed roughly by 30-35 screens total.

It must include:
Firebase Cloud Messaging (Push Notifications)
In-app notifications
In-app purchases (upgrade system)
Admob integration
Location choice (mapbox integration)
Login/Register/Reset with fb and accountkit
Verification system similar to Instagram (blue badge)
Giphy Integration
internationalization (Detect device language + ngx-translate)

The app needs to be developed from scratch but I’ll be providing the whole ionic 4 theme (its design so html/scss only).

The backend needs to be developed as well and ideally should be mongodb + nodejs + restAPI.

An Admin Panel will be needed to manage everything (approx 15-20 sections)

I’m looking for a long term relationship and open to partnership once everything is over.

Thank you,
Kind Regards
Andrea

Posts: 2

Participants: 2

Read full topic

IONIC 4 slider auto play stop while change page and go back on slider page

$
0
0

@Ravisharmawiths wrote:

hi ionic i am using ionic 4 and my home page.ts is given bellow

import { Component } from ‘@angular/core’;

@Component({
selector: ‘app-home’,
templateUrl: ‘home.page.html’,
styleUrls: [‘home.page.scss’],
})
export class HomePage {
slideOpts = {
effect: ‘flip’,
autoplay: {
delay: 2000
}
};

}

and home page.html is

<ion-slides loop=“true” pager=“true” [options]=“slideOpts” >









the slide auto play perfect while i go to home on first time but if i change page and go return home the slider auto play not working

Posts: 1

Participants: 1

Read full topic

Ionic 4 get page name on pess device back button

Back action(Angullar router)

$
0
0

@LucasSouza13 wrote:

Hello, so I’m having a problem with ionic 4, it’s about the action of returning, for example: when the application exits the splash and goes to the main screen of the application and press the back button, in the case of androids, the screen just with the background color not loading more the home screen, I often have to close the application and open again, this should be because of the angled routes 6. Does anyone know any way around this?

Posts: 1

Participants: 1

Read full topic

Ionic doctor reporting "add viewport-fix=cover", but already there

$
0
0

@squadle wrote:

When I run ionic doctor check the following warning is reported:

:heavy_check_mark: Detecting issues: 15 / 15 complete - done!
[WARN] viewport-fit=cover not set in index.html

   iOS 11 introduces new "safe regions" for webviews, which can throw off component sizing, squish the header into 
   the status bar, letterbox the app on iPhone X, etc. Fixing this issue will ensure the webview takes up the full 
   size of the screen. See https://blog.ionicframework.com/ios-11-checklist for more information.
   
   To fix, take the following step(s):
   
     1) Add viewport-fit=cover to the <meta name="viewport"> tag in your index.html file
   
   $ ionic config set -g doctor.issues.viewport-fit-not-set.ignored true (ignore this issue in the future)

[INFO] Doctor Summary

   - Detected 1 issue.
   - 0 issues can be fixed automatically

But my index.html already has the line in it:

<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="UTF-8">
    <title>Ionic App</title>
    <meta name='viewport' content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta name="format-detection" content="telephone=no">
    <meta name="msapplication-tap-highlight" content="no">
    <link rel="icon" type="image/x-icon" href="assets/icon/favicon.ico">
    <link rel="manifest" href="manifest.json">
    <meta name="theme-color" content="#4e8ef7">

    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <script src="cordova.js"></script>
    <link href="build/main.css" rel="stylesheet">
  </head>
  <body>
    <ion-app></ion-app>
    <script src="build/polyfills.js"></script>
    <script src="build/vendor.js"></script>
    <script src="build/main.js"></script>
  </body>
</html>

Here is my ionic info:

Ionic:

ionic (Ionic CLI) : 4.12.0 (/Users/jfj/.nvm/versions/node/v7.10.1/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.4
@ionic/app-scripts : 3.2.3

Cordova:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : android 7.0.0, browser 5.0.3, ios 4.5.5
Cordova Plugins : cordova-plugin-ionic 5.2.7, cordova-plugin-ionic-webview 2.3.1, (and 8 other plugins)

System:

Android SDK Tools : 26.1.1 (/Users/jfj/Library/Android/sdk)
NodeJS : v7.10.1 (/Users/jfj/.nvm/versions/node/v7.10.1/bin/node)
npm : 5.7.1
OS : macOS Mojave
Xcode : Xcode 10.1 Build version 10B61

Posts: 1

Participants: 1

Read full topic


Loader Service for Ionic 4

$
0
0

@blondie63 wrote:

Is there a way to create a Loader service for Ionic 4 (async await) like this:

export class LoaderService {

    loader: HTMLIonLoadingElement;

    constructor(public loadingController: LoadingController) {
    }

    showLoader() {
        if (this.loader) { 
            this.loader.present()
        } else {
            this.loader = this.loadingController.create({
                message: 'Loading',
            }).then(() => {
                this.loader.present()
            })
        }
    }

    hideLoader() {
        this.loader.dismiss();
        this.loader = null;
    }

}

Thanks for help

Posts: 2

Participants: 2

Read full topic

Make a vendor.js error more verbose? {"line":68791,"column":125,"sourceURL":"http://localhost:8080/build/vendor.js"}

$
0
0

@adboio wrote:

I’ve been trying to debug an issue with Badge for the past couple days, and have finally come across this error by putting a Badge method call in a try/catch block:

ERROR: {"line":68791,"column":125,"sourceURL":"http://localhost:8080/build/vendor.js"}
(This might be irrelevant, but that line in vendor.js corresponds to a function definition for Badge.)

The problem is that this error is super vague and I have no idea where to even begin debugging from here. Is there any way to make errors from vendor.js more verbose? This was run on an iPhone 8+ iOS 12.1.2, error was spit out in Xcode.

Thanks in advance!!

Posts: 1

Participants: 1

Read full topic

Ionic 4 Events failing :C

$
0
0

@JulioNicolasPapp wrote:

Hello everyone. I have this event in home page:

  async VerPartido(codigo,pk) {
        const alert = await this.Alert.create({
          header: 'Codigo del partido',
          inputs: [
            {
              name: 'Codigo',
              type: 'text',
              placeholder: 'XXX123'
            }
          ],
          buttons: [
           {
              text: 'Ingresar',
              handler: (data) => {
                console.log(data.Codigo);
                if (data.Codigo == codigo){
                  this.events.publish('partido',pk);
                  this.NavCtrl.navigateForward('/partido');
                } else{
                  this.ToastError();
                }
              }
            }
          ]
        });
        await alert.present();
      }

When I getting the event in another page with a subscribe like this:

constructor(public NavCtrl: NavController,
    public storage: Storage,
    public http: Http, 
    public Loading: LoadingController,
    public events: Events) {
      this.events.subscribe('partido', (pk) => {
        // user and time are the same arguments passed in `events.publish(user, time)`
        console.log('Pk': pk);
    });
}

The problem is: The first time not works, but the second time works and i don’t know why. Console throw this message:

Navigation triggered outside Angular zone, did you forget to call ‘ngZone.run()’?

How can i resolve this? :confused:

Posts: 1

Participants: 1

Read full topic

Create button dynamicly

$
0
0

@mgk37 wrote:

Hi,
i want to take the number of my buttons my textbox . textbox=5 i have 5 button
Text box = i have 50 button my screen .
Thanks for helps

Posts: 1

Participants: 1

Read full topic

V4 docs/ folder on github

$
0
0

@royappa wrote:

I’d love to contribute minor edit pull requests (typos and such) to the documentation, but the github docs/ folder for v4 is empty. Thanks.

Posts: 1

Participants: 1

Read full topic

Hi i need how to fix FAILURE: Build failed with an after install cordova-plugin-facebook4

$
0
0

@kitaro27 wrote:

@ionic/cli-utils  : 1.19.3
    ionic (Ionic CLI) : 3.20.1
global packages:
    cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
local packages:
    @ionic/app-scripts : 3.2.1
    Cordova Platforms  : android 7.1.4
    Ionic Framework    : ionic-angular 3.9.3
System:
    Android SDK Tools : 26.1.1
    Node              : v8.4.0
    npm               : 6.7.0
    OS                : Windows 10
Environment Variables:
    ANDROID_HOME : C:\Users\Name-PC\AppData\Local\Android\sdk
Misc:
    backend : pro

Cordova Plguin

cordova-plugin-camera 4.0.3 "Camera"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-facebook4 4.2.1 "Facebook Connect"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-file-transfer 1.7.1 "File Transfer"
cordova-plugin-geolocation 2.4.3 "Geolocation"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 3.1.2 "cordova-plugin-ionic-webview"
cordova-plugin-nativestorage 2.3.2 "NativeStorage"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-telerik-imagepicker 2.2.4 "ImagePicker"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-support-google-services 1.1.0 "cordova-support-google-services"
phonegap-plugin-barcodescanner 8.0.1 "BarcodeScanner"
phonegap-plugin-multidex 1.0.0 "Multidex"
phonegap-plugin-push 2.2.3 "PushPlugin"

After npm cordova plugin add cordova-plugin-facebook4 --save --variable APP_ID=“xxx” --variable APP_NAME=“AppName” Build failed

:app:transformClassesWithDexBuilderForDebug

:app:transformClassesWithMultidexlistForDebug

:app:transformDexArchiveWithDexMergerForDebug
Dex: Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/zxing/client/result/EmailAddressParsedResult;
    UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Lcom/google/zxing/client/result/EmailAddressParsedResult;

com.android.dex.DexException: Multiple dex files define Lcom/google/zxing/client/result/EmailAddressParsedResult;
        at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:661)
        at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:616)
        at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:598)
        at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
        at com.android.dx.merge.DexMerger.merge(DexMerger.java:198)
 FAILED
38 actionable tasks: 12 executed, 26 up-to-date
        at com.android.builder.dexing.DexArchiveMergerCallable.call(DexArchiveMergerCallable.java:61)
        at com.android.builder.dexing.DexArchiveMergerCallable.call(DexArchiveMergerCallable.java:36)
        at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformDexArchiveWithDexMergerForDebug'.
> com.android.build.api.transform.TransformException: com.android.dex.DexException: Multiple dex files define Lcom/google/zxing/client/result/EmailAddressParsedResult;

* 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 37s
cmd: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Dex: Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/zxing/client/result/EmailAddressParsedResult;
    UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Multiple dex files define Lcom/google/zxing/client/result/EmailAddressParsedResult;

com.android.dex.DexException: Multiple dex files define Lcom/google/zxing/client/result/EmailAddressParsedResult;
        at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:661)
        at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:616)
        at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:598)
        at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
        at com.android.dx.merge.DexMerger.merge(DexMerger.java:198)
        at com.android.builder.dexing.DexArchiveMergerCallable.call(DexArchiveMergerCallable.java:61)
        at com.android.builder.dexing.DexArchiveMergerCallable.call(DexArchiveMergerCallable.java:36)
        at java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1424)
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:transformDexArchiveWithDexMergerForDebug'.
> com.android.build.api.transform.TransformException: com.android.dex.DexException: Multiple dex files define Lcom/google/zxing/client/result/EmailAddressParsedResult;

* 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 37s
[ERROR] An error occurred while running cordova build android (exit code 1).

Fix not work

android {
    defaultConfig {
        multiDexEnabled true
    }
}
  • cordova clean
  • cordova build

** But I think the cause is from the plugin phonegap-plugin-push

thank you so much

Posts: 1

Participants: 1

Read full topic

SQLite backup - ionic v3

$
0
0

@dmkdfc wrote:

How can I take backup of my SQLite file ? I save around 1000 rows of data and 2 tables in sqlite which is getting called for offline purpose. But when i clear data for the app my SQLite file gets deleted. Is there a way to take online backup or store it in some other destination so that data in it doesn’t get deleted ?

I am also sending data to server once internet is on but there may be a case of internet failure and data getting stacked and user clears data for the app!

Posts: 1

Participants: 1

Read full topic


Error while Decoding QR Code from Gallery in IONIC

$
0
0

@IonicDeveloper02 wrote:

I need to decode QR image from gallery in ionic. I am using the following code to get the image from gallery and decode it,

gallery() { 

    let options = {
        destinationType: this.camera.DestinationType.FILE_URI,
        sourceType: this.camera.PictureSourceType.PHOTOLIBRARY,
      };


      this.camera.getPicture(options).then((imageData) => {

        this.base64String = imageData;
        this.decodeImg((response) => {
          console.log("response:", response);
          if (response && response != "error in decoding QR Code" && response != "error decoding QR Code") {
            console.log(“Decoded Data ”, response);
          }
          else {
             console.log(“Error”);
          }
        });

      }, (err) => {
        console.log(“Error”, err);
      });
} 

    decodeImg(callback) {
    this.decodeImageFromBase64( this.base64String, (decodedInformation) => {
    console.log("Final Output  ", decodedInformation); 
    callback(decodedInformation);
  });

}


    decodeImageFromBase64(data, callback) {
    try {
      // set callback
      qrcode.callback = callback;
      // Start decoding
      qrcode.decode(data);

      } catch (error) {
      console.log("error  ", error); 
    }
    }

The problem is, some QR getting decoded properly and for some QR i am receiving “error in decoding QR Code”. But the same QR working fine in online decoder. Kindly let me know, the solution why some QR not decoding properly.

Kindly let me know what is the alternate way to decode QR image from gallery in ionic?

Posts: 1

Participants: 1

Read full topic

File path error raw:/ can't get resolved

$
0
0

@hajricod wrote:

I get this error when i try to choose a file from Downloads folder or SD files why it happens?

content://com.android.providers.downloads.documents/document/raw%3A%2Fstorage%2Femulated%2F0%2FDownload%2Fw_wile268.pdf

main.js:423 ERROR: For input string: “raw:/storage/emulated/0/Download/w_wile268.pdf”

Posts: 1

Participants: 1

Read full topic

A new category Ionic-v4 should be created in this forum

$
0
0

@avex wrote:

A new category Ionic-v4 should be created in this forum
But it seems nobody cares about this, Is there anyone know how to notify Ionic Team or help to done this?

Posts: 1

Participants: 1

Read full topic

Ion-Focus Event names language doesn't change

$
0
0

@mustafademirx wrote:

On the ios, when I focused the ion-input area there are 3 keywords are revealed on the screen, like; “Copy”, “Select”, “Select All”. There is no problem. But I have to change this words because I have to use another language. Thanks for all.

Posts: 1

Participants: 1

Read full topic

Ionic-appavailability.check method in ionic 3

Viewing all 71531 articles
Browse latest View live


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