Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all 49526 articles
Browse latest View live

Filetransfer error code 3

$
0
0

@markodemo wrote:

Hi!
Please help if you have expirience with same thing.

Problem: uploading images to server.
Thing i dont understand: images are taken on the same way with camera.
Error:

FileTransferError {code: 3, source: “file:///storage/emulated/0/Pictures/day1_TH_233.png”, target: “http://xxx.xx.xx.xxx:xxxx/api/image_upload”, http_status: null, body: null, …}
code: 3
source: “file:///storage/emulated/0/Pictures/day1_TH_233.png”
target: “http://xxx.xx.xx.xxx:xxxx/api/image_upload”
http_status: null
body: null
exception: “Connection reset”

Code for sending images:

fileTransfer.upload(item.put, test.my.API + 'image_upload', options).then((data) => {
            
var res = JSON.parse(data.response);

            if (res.success === false) {

            } else {

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

Actually everything works fine, there is more code that is not need for description. The problem is that 4 images are sent but on 5-th i got that error code 3, pictures are taken on same way and upload is always the same.

Posts: 1

Participants: 1

Read full topic


Ionic React popover animation

$
0
0

@sh41n4 wrote:

Hi, I am making a IOS app using Ionic 4 and React. I want to animate my popover ( https://ionicframework.com/docs/api/popover ) using enterAnimation attribute, but couldn’t make it work. Can anyone please provide any example of popover animation with enterAnimation using Ionic 4 and React? There are some examples of the popover animation in Angular out there, but couldn’t find any React example.

Posts: 1

Participants: 1

Read full topic

Stop scroll verticaly while scroll horizontal

$
0
0

@danielpt wrote:

Ionic 3.

Hello, im using , but i have a big problem.

When im scrolling horizontally, sometimes i can scroll vertical. And this is so ugly. Have a way to stop the scroll vertical while scrolling horizontal?

Posts: 1

Participants: 1

Read full topic

Error add plugin cordova device

$
0
0

@ismaelsky wrote:

[ng] This likely means that the library (@ionic-native/device/ngx) which declares Device has not been processed correctly by ngcc, or is not compatible with Angular Ivy.

Posts: 1

Participants: 1

Read full topic

Placing an ion-range inside ion-slide

$
0
0

@zouelfikar wrote:

I don’t usually post on forums but i ran into an issue where I had to use an ion-range inside an ion-slide… My problem is when trying to change the value of the range bar (sliding the value) the page also slides producing unwanted behavior. Any thoughts on this?

Posts: 1

Participants: 1

Read full topic

Error: spawn /Users/{name}/Library/Android/sdk/platform-tools/adb ENOENT

$
0
0

@wwwguy wrote:

When trying to run the ionic example demo app on an android device I get the following error.

> cordova build android
> native-run android --app platforms/android/app/build/outputs/apk/debug/app-debug.apk --forward 8100:8100
[native-run] Error: spawn /Users/mike/Library/Android/sdk/platform-tools/adb ENOENT
[native-run] at Process.ChildProcess._handle.onexit (internal/child_process.js:267:19)
[native-run] at onErrorNT (internal/child_process.js:469:16)
[native-run] at processTicksAndRejections (internal/process/task_queues.js:84:21)
[ **ERROR** ] **An error occurred while running subprocess** **native-run** **.**

It appears “platform-tools” is in a different location now? When I look in the android sdk folder there are now 2 nested folders like “platform-tools/platforms-tools/” which is where the adb file is now located. Where do I need to update the config in order to run ionic on android devices now?

Posts: 1

Participants: 1

Read full topic

@param and its use

$
0
0

@heardnetwork wrote:

I have some code in a legacy app that I can’t find anything about at all.

This appears on a few pages - if i uncomment it the whole page throws up errors. I’ve googled and can’t find anything at all about @param. I didn’t code the page so i don’t know what they are or if they’re needed.

If anyone could point me in the right direction as to what they are or if i can remove them. They’re not in all pages of the app, but quite a few. Removing them doesn’t seem to do anything, but i want to be sure.

The export class and contractor are all there and working as they should

thanks

/**

  • This is the page where the user can add, view and search for groups.
  • @param {App} app
  • @param {DataProvider} dataProvider
  • @param {LoadingProvider} loadingProvider
  • @param {AngularFireDatabase} angularFireDatabase
  • @param {AlertController} alertCtrl
  • @param {Geolocation} geolocation
  • @param {Events} events
  • @param {OneSignal} oneSignal
    */

Posts: 1

Participants: 1

Read full topic

Ionic Braintree Tutorial

$
0
0

@keber wrote:

Hi all,

has anyone successfully integrated Braintree on his Ionic (preferably iOS) app?
I’m really confused what I need and how to setup everything correctly.

My main goal is using PayPal with Braintree since the PayPal Cordova Plugin uses UiWebView which won’t be accepted by Apple starting from April.

What I have done so far:

  1. Install Braintree Ionic and Cordova plugin (https://ionicframework.com/docs/native/braintree)
  2. Setup Braintree account, setup Braintree sandbox account
  3. Insert PayPal Sandbox credentials in my Braintree account under “Processing Options”
  4. Insert and setup the sample code from https://ionicframework.com/docs/native/braintree

I can run the Ionic app and also process a sample checkout via credit card.
Although if I click on “PayPal” instead choosing the credit card option, I always get the error message: PayPal app switch is missing a returnURLScheme.

I really don’t know how to fix that, I already checked Google, Stackoverflow but didn’t found the issue. Something seems to be missing in my config but I don’t know what.

Thank you in advance for any help!

Posts: 1

Participants: 1

Read full topic


Changing Ionic core files doesn't work

$
0
0

@IonicProgramming wrote:

I am using Ionic React (version 5.0.4), and changed the “reorder-group.js” file in the following path, in order to add some features to the <IonReorderGroup> tag:

MyProject\node_modules@ionic\core\dist\collection\components\reorder-group\reorder-group.js

However, when I serve the app ( npm run start ) or build it ( npm run build ) there is no change.

Why is it happening and how can I solve it? (maybe it has something to do with cache files or anything similar?:thinking:)

Thanks in advance!

Posts: 1

Participants: 1

Read full topic

Error "tried calling SplashScreen.hide, but the SplashScreen plugin is not installed"

$
0
0

@ioclaudio wrote:

Hi,
on an Ionic4 app, I have a problem with the splash screen, that doesn’t close.
In debug mode I can see this error:

vendor.js:77445 Native: tried calling SplashScreen.hide, but the SplashScreen plugin is not installed.
pluginWarn @ vendor.js:77445
Install the SplashScreen plugin: 'ionic cordova plugin add cordova-plugin-splashscreen'
pluginWarn @ vendor.js:77457

The strange thing is that the splash screen is installed, and until yesterday the app was working.
What could be the problem according to you?

Thank you very much

claudio

Posts: 2

Participants: 2

Read full topic

Ion-datetime default

$
0
0

@Bonsaiko wrote:

Hello,

I have a datetime object and I’d like to setup a default value when the user chooses the date.
But I don’t want this value to get displayed.
Let me explain why :

I have a max value defined to prevent under 18 people to subscribe.
Which means if I subscribe today the max value is 27/03/2002.
So when I try to setup my date of birth it’s set by default on 27/03/2002.

Now Im’ trying to setup my date which is let’s say 30/10/1974 : I’m not able to choose 30 as the day (because the year being set on 2002 I can’t choose 30/03/2002).

Same thing for the month, I won’t be able to choose october.

That’s why I decided to setup the default value of “today - 20 years” so when you arrive today, the default value is 27/03/2000.

It’s ok because when the user clicks to setup his date of birth, he can choose whatever he wants.

However, I think it’s strange because when you open the subscriuption form, you don’t really undertstand why the date of birth is defined on 27/03/2000…

Do you understand my issue ?

Actually I’d like to keep this default date that I setup but I’d like to know if it’s possible not to display this value when the form first opens ?

Thanks for your help.

Posts: 1

Participants: 1

Read full topic

[ng] ERROR in Cannot read property 'map' of undefined

$
0
0

@TheGuy573 wrote:

Hello.
I am a university student writing a dissertation about Ionic framework. I currently in the process of producing my final application but while generating the production release I encountered this error:
[ng] ERROR in Cannot read property ‘map’ of undefined

This error is preventing me from moving forward with my application and I would appreciate any help or suggestions.

Thanks in advance.

Full code can be seen here:
https://drive.google.com/drive/folders/1Mrw4r28IANGFRL_QYGpldq7YMOekBt2B?usp=sharing

Posts: 1

Participants: 1

Read full topic

How to get device orientation correctly

$
0
0

@leonardofmed wrote:

I need to get the device orientation to make some kind of compass. I saw that the old plugin | [2] used for this is now deprecated and that is suggested to use the W3C Device Orientation API now.

I tried to use it this way:

this.window.addEventListener("deviceorientation", function(event) {
    console.log(event);
}, true);

but the main orientation values (alpha, beta and gamma) are always null. I tried to turn on the GPS, but does not change anything.

I tried other events related to changes of orientation, but these don’t even fire, I belive this is because the orientation values are always null.

this.window.addEventListener("orientationchange", (event) => {
    console.log(event, screen.orientation.angle);      				    
}, true);

this.window.onorientationchange = (event) => { 
    console.log(event, screen.orientation.angle);
};

Am I doing something wrong? Is there other easier or correct way to get these informations?

Posts: 1

Participants: 1

Read full topic

Error: Type PdfViewerComponent is part of the declarations of 2 modules

$
0
0

@ashok12 wrote:

i have a lazy loading components ionic project. i have import

import { PdfViewerComponent } from ‘ng2-pdf-viewer’;
@NgModule({
declarations: [
PdfViewerComponent
]

})
export class Page1Module {}
in page1.module.ts and page2.module.ts.
i have received this error Error: Type PdfViewerComponent is part of the declarations of 2 modules

i don’t know how to fix it! any suggestions PLease!

Posts: 10

Participants: 3

Read full topic

Pass data from TabsPage to ChildTab

$
0
0

@Ibernato93 wrote:

Hello to all.
I am developing an app that has a 4 tabs
This is the html page

<ion-tabs>

  <ion-tab-bar slot="bottom">

    <ion-tab-button tab="profilo">
      <ion-icon name="person-sharp"></ion-icon>
      <ion-label>Profilo</ion-label>
    </ion-tab-button>

    <ion-tab-button tab="chat">
      <ion-icon name="chatbubble-sharp"></ion-icon>
      <ion-label>Chat</ion-label>
    </ion-tab-button>

    <ion-tab-button tab="random">
      <ion-icon name="search-sharp"></ion-icon>
      <ion-label>Trova</ion-label>
    </ion-tab-button>

    <ion-tab-button tab="dintorni">
      <ion-icon name="compass"></ion-icon>
      <ion-label>Scopri</ion-label>
    </ion-tab-button>
  </ion-tab-bar>

</ion-tabs>

I need to send a request to the server every 5 seconds to get data.
I want to put this call in the main tab (TabsPage) and then pass the data obtained in the TabChat.
Is it possible to do this or do I have to insert the call to the server in each tab?

So the question is this: how do I pass a data from the tabPage to the tabChat?

Posts: 7

Participants: 2

Read full topic


Ionic v3 display not filling iPad

Self is not defined in ionic angular server side rendering

$
0
0

@YAsh0011 wrote:

I am following https://ionicframework.com/blog/ssr-with-angular-universal-and-ionic this tutorial everything setup is successfully done and also these command run sucessfully npm run build:ssr and npm run serve:ssr then they give me port for run website in browser Node Express server listening on http://localhost:4000 , but when open this port in chrome I got the error ERROR ReferenceError: self is not defined

ReferenceError: self is not defined
    at Object.607 (F:\ionic4-project\app\dist\2.js:44:9)
    at __webpack_require__ (F:\ionic4-project\app\dist\server.js:26:30)
    at __webpack_require__.t (F:\ionic4-project\app\dist\server.js:83:33)
    at ZoneDelegate.invoke (F:\ionic4-project\app\dist\server.js:585:26)
    at Object.onInvoke (F:\ionic4-project\app\dist\server.js:20315:33)
    at ZoneDelegate.invoke (F:\ionic4-project\app\dist\server.js:584:52)
    at Zone.run (F:\ionic4-project\app\dist\server.js:344:43)
    at F:\ionic4-project\app\dist\server.js:1083:34
    at ZoneDelegate.invokeTask (F:\ionic4-project\app\dist\server.js:617:31)
    at Object.onInvokeTask (F:\ionic4-project\app\dist\server.js:20306:33)

my project package.json

{
  "name": "app",
  "version": "1.0.1",
  "author": "hello",
  "homepage": "http://app.com/",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e",
    "serve": "ionic serve --no-livereload --lab",
    "pwa": "ng build --prod --base-href /demo/app-pwa/ --deploy-url /demo/app-pwa/",
    "compile:server": "webpack --config webpack.server.config.js --progress --colors",
    "serve:ssr": "node dist/server",
    "build:ssr": "npm run build:client-and-server-bundles && npm run compile:server",
    "build:client-and-server-bundles": "ng build --prod && ng run app:server:production"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^7.2.15",
    "@angular/common": "^7.2.2",
    "@angular/core": "^7.2.2",
    "@angular/fire": "^5.2.1",
    "@angular/forms": "^7.2.2",
    "@angular/http": "^7.2.2",
    "@angular/platform-browser": "^7.2.2",
    "@angular/platform-browser-dynamic": "^7.2.2",
    "@angular/platform-server": "^7.2.2",
    "@angular/pwa": "^0.900.7",
    "@angular/router": "^7.2.2",
    "@angular/service-worker": "^8.2.14",
    "@ionic-native/admob-free": "^5.12.0",
    "@ionic-native/core": "^5.0.0",
    "@ionic-native/file": "^5.12.0",
    "@ionic-native/file-transfer": "^5.8.0",
    "@ionic-native/firebase-dynamic-links": "^5.14.0",
    "@ionic-native/firebase-messaging": "^5.13.0",
    "@ionic-native/ionic-webview": "^5.12.0",
    "@ionic-native/media": "^5.9.0",
    "@ionic-native/music-controls": "^5.12.0",
    "@ionic-native/native-audio": "^5.8.0",
    "@ionic-native/social-sharing": "^5.12.0",
    "@ionic-native/splash-screen": "^5.0.0",
    "@ionic-native/status-bar": "^5.0.0",
    "@ionic/angular": "^4.1.0",
    "@ionic/angular-server": "^5.0.7",
    "@ionic/storage": "^2.2.0",
    "@nguniversal/express-engine": "^7.1.1",
    "@nguniversal/module-map-ngfactory-loader": "0.0.0",
    "@ngx-translate/core": "^11.0.1",
    "@ngx-translate/http-loader": "^4.0.0",
    "cordova": "^9.0.0",
    "cordova-admob-sdk": "^0.24.1",
    "cordova-android": "8.1.0",
    "cordova-ios": "^5.0.1",
    "cordova-plugin-admob-free": "0.27.0",
    "cordova-plugin-androidx": "1.0.2",
    "cordova-plugin-androidx-adapter": "1.1.0",
    "cordova-plugin-device": "2.0.2",
    "cordova-plugin-file": "^6.0.2",
    "cordova-plugin-file-transfer": "^1.7.1",
    "cordova-plugin-firebase-dynamiclinks": "3.0.0",
    "cordova-plugin-firebase-messaging": "^3.0.0",
    "cordova-plugin-ionic-keyboard": "^2.2.0",
    "cordova-plugin-media": "^5.0.3",
    "cordova-plugin-music-controls": "git+https://github.com/amitkhare/cordova-music-controls-plugin.git",
    "cordova-plugin-nativeaudio": "^3.0.9",
    "cordova-plugin-splashscreen": "5.0.2",
    "cordova-plugin-statusbar": "2.4.2",
    "cordova-plugin-whitelist": "1.3.3",
    "cordova-plugin-x-socialsharing": "5.4.7",
    "cordova-promise-polyfill": "0.0.2",
    "cordova-sqlite-storage": "^3.2.1",
    "cordova-support-android-plugin": "^1.0.1",
    "cordova-support-google-services": "^1.3.1",
    "core-js": "^2.5.4",
    "es6-promise-plugin": "4.2.2",
    "express": "^4.15.2",
    "firebase": "^6.3.1",
    "moment": "^2.24.0",
    "phonegap-plugin-push": "2.2.3",
    "rxjs": "~6.5.1",
    "tslib": "^1.9.0",
    "typescript": "^3.2.4",
    "zone.js": "~0.8.29"
  },
  "devDependencies": {
    "@angular-devkit/architect": "~0.13.8",
    "@angular-devkit/build-angular": "~0.13.8",
    "@angular-devkit/core": "~7.3.8",
    "@angular-devkit/schematics": "~7.3.8",
    "@angular/cli": "~7.3.8",
    "@angular/compiler": "~7.2.2",
    "@angular/compiler-cli": "~7.2.2",
    "@angular/language-service": "~7.2.2",
    "@ionic/angular-toolkit": "~1.5.1",
    "@ionic/lab": "2.0.6",
    "@types/jasmine": "~2.8.8",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~12.0.0",
    "codelyzer": "~4.5.0",
    "cordova-plugin-device": "^2.0.2",
    "cordova-plugin-ionic-keyboard": "^2.2.0",
    "cordova-plugin-ionic-webview": "^4.1.1",
    "cordova-plugin-splashscreen": "^5.0.2",
    "cordova-plugin-statusbar": "^2.4.2",
    "cordova-plugin-whitelist": "^1.3.3",
    "jasmine-core": "~2.99.1",
    "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": "~1.1.2",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "~5.4.0",
    "ts-loader": "^5.2.0",
    "ts-node": "~8.1.0",
    "tslint": "~5.17.0",
    "webpack-cli": "^3.1.0"
  },
  "description": "An Ionic project",
  "cordova": {
    "plugins": {
      "cordova-plugin-whitelist": {},
      "cordova-plugin-statusbar": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-file": {},
      "cordova-plugin-media": {
        "KEEP_AVAUDIOSESSION_ALWAYS_ACTIVE": "NO"
      },
      "cordova-plugin-music-controls": {},
      "cordova-sqlite-storage": {},
      "cordova-plugin-file-transfer": {},
      "cordova-plugin-x-socialsharing": {
        "ANDROID_SUPPORT_V4_VERSION": "24.1.1+",
        "PHOTO_LIBRARY_ADD_USAGE_DESCRIPTION": "This app requires photo library access to function properly.",
        "PHOTO_LIBRARY_USAGE_DESCRIPTION": "This app requires photo library access to function properly."
      },
      "cordova-plugin-androidx": {},
      "cordova-plugin-androidx-adapter": {},
      "cordova-plugin-admob-free": {
        "ADMOB_APP_ID": "ca-app-pub-~xxx"
      },
      "cordova-plugin-ionic-keyboard": {},
      "cordova-plugin-ionic-webview": {
        "ANDROID_SUPPORT_ANNOTATIONS_VERSION": "27.0.1"
      },
      "cordova-admob-sdk": {
        "PLAY_SERVICES_VERSION": "+"
      },
      "cordova-plugin-firebase-messaging": {},
      "cordova-plugin-firebase-dynamiclinks": {
        "APP_DOMAIN": "app.com",
        "PAGE_LINK_DOMAIN": "app.page.link",
        "FIREBASE_CORE_VERSION": "17.0.+",
        "FIREBASE_DYNAMIC_LINKS_VERSION": "18.0.+"
      }
    },
    "platforms": [
      "ios",
      "android"
    ]
  }
}

Ionic Info

Ionic:

   Ionic CLI                     : 5.2.7 (C:\Users\xxx\AppData\Roaming\nvm\v10.16.3\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.11.10
   @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 CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : not available
   Cordova Plugins   : not available

Utility:

   cordova-res : 0.6.0
   native-run  : 0.3.0

System:

   Android SDK Tools : 26.1.1 (C:\Users\xxx\AppData\Local\Android\sdk)
   NodeJS            : v10.16.3 (C:\Program Files\nodejs\node.exe)
   npm               : 6.9.0
   OS                : Windows 10

Please help

Posts: 1

Participants: 1

Read full topic

Is it possible to use your Ionic app as a sat-nav?

Image not displaying from server ionic 4

$
0
0

@UnnatiPatadia wrote:

I want to show list of categories.

Image is not shown on android version 9 and above.
when I try to put static image it shows perfectly but image from server is not shown.

tab1.html

<ion-grid>
  <ion-row  class="margin" *ngFor="let row of grid">
    <ion-col size="3" class="ion-text-center" *ngFor="let item of row" (click)="quizInfo(item.categoryId,item.name)">
      <img class="logo" [src]='item.image'> <br>
      <!-- <img src="../../assets/icon/bio.png" class="logo"> <br> -->
      <p class="margin title">{{item.name}}</p>
    </ion-col>
  </ion-row>
</ion-grid>

This is my html for displaying list.

Image is not shown

1st image is of android version 9 and is android version 7

Screenshot_20200328-160748_Knowledge Up Screenshot_2020-03-28-16-26-17-538_com.cipher.knowledgeup

Posts: 1

Participants: 1

Read full topic

How to exit app in Ionic5

Viewing all 49526 articles
Browse latest View live