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

Cordova-plugin-filepath: Unable to resolve filesystem path

$
0
0

@thisisirfan wrote:

Trying to upload image from ionic application using cordova-plugin-camera via android/ios gallery. It’s working perfectly fine on ios but throw error while resolving path, I’m using cordova-plugin-filepath for resolving file path.

But it always throw following error while resolving native path in this.filePath.resolveNativePath(imagePath) method:

{code: 0 ; message: "Unable to resolve filesystem path."}

Here is my code for uploading image:

var options = {
  quality: 60,
  targetWidth:900,
  sourceType: sourceType,
  saveToPhotoAlbum: false,
  correctOrientation: true
};


// Get the data of an image
this.camera.getPicture(options).then((imagePath) => {
  if (this.platform.is('android') && sourceType === this.camera.PictureSourceType.PHOTOLIBRARY) {
    console.log('image path',imagePath)
    this.filePath.resolveNativePath(imagePath)
      .then(res => {
        let correctPath = res.substr(0, res.lastIndexOf('/') + 1).toString();
        let currentName = imagePath.substring(imagePath.lastIndexOf('/') + 1, imagePath.length).toString();
        this.copyFileToLocalDir(correctPath, currentName, this.createFileName());
      }).catch(err=>{
        console.log('unable to resolve file path issue', err)
      });
  } else {
    var currentName = imagePath.substr(imagePath.lastIndexOf('/') + 1);
    var correctPath = imagePath.substr(0, imagePath.lastIndexOf('/') + 1);
    console.log(currentName,correctPath)
    this.copyFileToLocalDir(correctPath, currentName, this.createFileName());
  }
}, (err) => {
  console.log(err);
});

I have even tried using following code but no success:

window.FilePath.resolveNativePath(imagePath)
      .then(res => {
        let correctPath = res.substr(0, res.lastIndexOf('/') + 1).toString();
        let currentName = imagePath.substring(imagePath.lastIndexOf('/') + 1, imagePath.length).toString();
        this.copyFileToLocalDir(correctPath, currentName, this.createFileName());
      }).catch(err=>{
        console.log('unable to resolve file path issue', err)
      });

Here are my plugin details:

<plugin name="cordova-plugin-camera" spec="^4.0.3" />
<plugin name="cordova-plugin-filepath" spec="^1.4.2" />

Ionic info:

ionic (Ionic CLI) : 4.6.0
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.1
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.1, (and 15 other plugins)
System:
Android SDK Tools : 25.2.4
NodeJS : v9.11.1
npm : 6.0.1
OS : Windows 10"

Posts: 1

Participants: 1

Read full topic


Ionic 4 issue with form inside modal

$
0
0

@Stylemayster wrote:

I found an anoying bug that start from Ionic 4 beta 18 and still exist in RC1. Happening on android.

When working with a form inside a modal, if you close the modal while keyboard is open (like when you have a save button in the header or footer that save and close the modal), if you edit a field from a certain distance from the top of the screen, an invisible overlay stay and block all interraction with elements (litteraly prevent user to…use app and force him to kill and restart).

Yeah, it’s very specific…and I can’t believe I’m the only one to know that bug exist.

I’ve record an example on my pc of what I mean (even if the bug only occur on android with virtual keyboard) for better understanding.!
example|443x500

If you’re interrested to try it, I’ve made a simple case here : https://github.com/Stylemayster/Ionic-4-RC0-keyboard-bug

I’ve put more information here : https://github.com/ionic-team/ionic/issues/17023

Since it appear that nobody found that bug, I wonder if, doing a form inside modal is a good practice.

Posts: 1

Participants: 1

Read full topic

Optimize load time on page

$
0
0

@xerintel wrote:

Hello,

I need to pass a printed form to an application. That form contains about 1000 fields, and takes up to 4000 lines of code on my slowpage.html

When I use this.navCtrl.setRoot(‘slowpage’); it gets stuck loading for about 30 seconds and I don’t know how to reduce that time. I tried, at least, to use a loadingController to warn the user that it could take about 10-30 seconds to show the page, but I can’t call loadingController since the slowpage is not loaded/entered, app is stuck on the page that redirects to slowpage.

How can I solve this problem? What are my alternatives? I need to somehow load the content step by step and I don’t know which component should I use.

Excuse me for my english, not my native language :grinning:

Posts: 1

Participants: 1

Read full topic

Error when execute Ionic serve

$
0
0

@IreneC wrote:

Hello everyone,

When I execute ionic serve, the following error appears:

> ionic-app-scripts serve --address 0.0.0.0 --port 8100 --livereload-port 35729 --dev-logger-port 53703 --nobrowser
[app-scripts] “sh” no se reconoce como un comando interno o externo,
[app-scripts] programa o archivo por lotes ejecutable.

[ERROR] ionic-app-scripts has unexpectedly closed (exit code 1).

_ The Ionic CLI will exit. Please check any output above for error details._

The versions that I have installed are:

Ionic:

** ionic (Ionic CLI) : 4.7.1 **
** Ionic Framework : ionic-angular 3.9.2**
** @ionic/app-scripts : 3.2.1**

Cordova:

** cordova (Cordova CLI) : not installed**
** Cordova Platforms : android 7.1.4**
** Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 1.2.1, (and 6 other plugins)**

System:

** NodeJS : v10.13.0**
** npm : 6.4.1**
** OS : Windows 7**

Can anyone help me?

Thank you so much in advanced

Posts: 1

Participants: 1

Read full topic

App gets frozen when running --prod mode in Android

$
0
0

@franzisk4sis wrote:

Hi guys,

When I run the app on device in debug mode everything works fine, but when I build with --prod and try to run it gets frozen and never goes after the splash screen.

I think that might be something related to Facebook, my app has Facebook Login.

01-14 16:11:49.014 5251-5251/? E/WebContentsProviderReceiver: onReceive - not approved application
    
    --------- beginning of system
01-14 16:11:49.484 855-1058/? E/MARsDBManager: updateDBAll : begin --size 3
01-14 16:11:49.554 855-1058/? E/MARsDBManager: updateDBAll : end
01-14 16:11:49.674 6891-6891/? E/ActivityThread: Failed to find provider info for com.facebook.appmanager.nekodirect
01-14 16:11:50.214 5312-5312/? E/Zygote: v2
01-14 16:11:50.224 5312-5312/? E/Zygote: accessInfo : 0
01-14 16:11:50.714 5329-5329/? E/Zygote: v2
01-14 16:11:50.724 5329-5329/? E/Zygote: accessInfo : 0
01-14 16:11:52.354 5385-5385/? E/Zygote: v2
01-14 16:11:52.364 5385-5385/? E/Zygote: accessInfo : 0
01-14 16:11:52.694 5385-5400/? E/SPPClientService: ShipBuild Binary : True
01-14 16:11:52.954 5329-5376/? E/GraphResponse: {HttpStatus: 400, errorCode: 100, subErrorCode: 33, errorType: GraphMethodException, errorMessage: Unsupported get request. Object with ID '181349075940707' does not exist, cannot be loaded due to missing permissions, or does not support this operation. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api}
01-14 16:11:54.154 5312-5422/? E/HealthAnalytics: [HAnalytics] checkMandatoryProperty(), property ordinal : 1 is mandatory, but key is empty.
01-14 16:11:54.154 5312-5422/? E/HealthAnalytics: [HAnalytics] checkMandatoryProperty(), property ordinal : 2 is mandatory, but key is empty.
01-14 16:11:54.154 5312-5422/? E/HealthAnalytics: [HAnalytics] checkMandatoryProperty(), property ordinal : 3 is mandatory, but key is empty.
01-14 16:11:54.154 5312-5422/? E/HealthAnalytics: [HAnalytics] checkMandatoryProperty(), property ordinal : 4 is mandatory, but key is empty.
01-14 16:11:54.154 5312-5422/? E/HealthAnalytics: [HAnalytics] checkMandatoryProperty(), property ordinal : 5 is mandatory, but key is empty.
01-14 16:11:54.154 5312-5422/? E/HealthAnalytics: [HAnalytics] checkMandatoryProperty(), property ordinal : 6 is mandatory, but key is empty.
01-14 16:11:54.154 5312-5422/? E/HealthAnalytics: [HAnalytics] checkMandatoryProperty(), property ordinal : 7 is mandatory, but key is empty.
01-14 16:11:54.234 5329-5412/? E/File: fail readDirectory() errno=2
    fail readDirectory() errno=2
01-14 16:11:54.244 5329-5412/? E/File: fail readDirectory() errno=2

And here is my project config:

± % ionic info                                                                                                                                                                !10

cli packages: (/usr/local/lib/node_modules)

    @ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 7.1.0

local packages:

    @ionic/app-scripts : 3.2.0
    Cordova Platforms  : android 6.3.0 ios 4.5.5
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    ios-deploy        : 2.0.0
    ios-sim           : 6.0.0
    Node              : v8.11.3
    npm               : 5.6.0
    OS                : macOS
    Xcode             : Xcode 10.1 Build version 10B61

Plugins:

± % cordova plugin list                                                                                                                                                       !11
com.googlemaps.ios 2.7.0 "Google Maps SDK for iOS"
com.telerik.plugins.nativepagetransitions 0.6.5 "Native Page Transitions"
cordova-plugin-add-swift-support 1.7.2 "AddSwiftSupport"
cordova-plugin-android-permissions 1.0.0 "Permissions"
cordova-plugin-camera 4.0.3 "Camera"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-console 1.1.0 "Console"
cordova-plugin-contacts 3.0.1 "Contacts"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-email-composer 0.8.15 "EmailComposer"
cordova-plugin-facebook4 3.1.0 "Facebook Connect"
cordova-plugin-file 6.0.1 "File"
cordova-plugin-geolocation 4.0.1 "Geolocation"
cordova-plugin-globalization 1.11.0 "Globalization"
cordova-plugin-googleplus 5.3.2 "Google SignIn"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 2.2.0 "cordova-plugin-ionic-webview"
cordova-plugin-linkedin 1.2.1 "LinkedIn"
cordova-plugin-mauron85-background-geolocation 2.3.6 "CDVBackgroundGeolocation"
cordova-plugin-media 5.0.2 "Media"
cordova-plugin-nativeaudio 3.0.9 "Cordova Native Audio"
cordova-plugin-nativegeocoder 3.1.2 "NativeGeocoder"
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-streaming-media 2.2.0 "StreamingMedia"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-x-socialsharing 5.4.1 "SocialSharing"
cordova-sqlite-storage 2.5.0 "Cordova sqlite storage plugin"
es6-promise-plugin 4.2.2 "Promise"
ionic-plugin-keyboard 2.2.1 "Keyboard"
phonegap-plugin-barcodescanner 8.0.0 "BarcodeScanner"
phonegap-plugin-push 2.1.2 "PushPlugin"
twitter-connect-plugin 0.6.0 "Twitter Connect"

Any word to help me solve this?

Posts: 1

Participants: 1

Read full topic

@ViewChild is not working for Ionic 4 web components

Status bar color on a specific page

$
0
0

@alizeegtd wrote:

I’d like to set a general setting for status bar color and a specific color for one particular page of the app.
How can I do this without having to set the color in each page separately?

In app.component.ts I’m setting the general color

statusBar.styleLightContent();
statusBar.backgroundColorByHexString("#80D4FF");

If I set a specific color in my page.ts the app will then keeps this last setting because app.component.ts is only called once.

Posts: 1

Participants: 1

Read full topic

APK with invalid signature

$
0
0

@PSKT wrote:

Hi, so I have currently build an APK and I was planning to upload it to the Google Play Store. But problem occurred when I want to upload the apk file to the production. Here is the error:

So, I have checked anyone with the same issues and there are some solution that might worked for some of us. One of the solution is to tick the box of V1 and V2 like this:

image

So, I was wondering what is the V1 and V2 box and where I can find it. Plus is it applicable for ionic.

Thank you in advance

Posts: 1

Participants: 1

Read full topic


Failed Login Session with Twitter Connect Plugin in Ionic 3

$
0
0

@setu1421 wrote:

I have integrated twitter-connect-plugin in my app with firebase. I have followed this tutorial for setting up the twitter with firebase in my Ionic 3 application.

In my config.xml:

 <preference name="TwitterConsumerKey" value="****************" />
 <preference name="TwitterConsumerSecret" value="*************" />
<plugin name="twitter-connect-plugin" spec="^0.6.0">
        <variable name="FABRIC_KEY" value="*******************" />
</plugin>

In my package.json:

	  "@ionic-native/twitter-connect": "^4.19.0",
	  "twitter-connect-plugin": "^0.6.0",
	   "twitter-connect-plugin": {
        "FABRIC_KEY": "****************"
      }

It was working perfectly fine but now it’s showing Failed Login Session error in the console.

What’s the problem here?

Posts: 1

Participants: 1

Read full topic

Ionic 3 - navbar Iphone X open page in modal bug

$
0
0

@kydenz wrote:

Hello,

I am developing an application with the same paging system as Facebook Messenger. That is a button at the top left that opens a menu (which is a modal).

A button list is displayed in this modal, which opens pages.

Problem:
On the Iphone X, when I open a page I have no problem, unless I open it from the modal, indeed the navbar is in the system bar as if iphone X was not taken in charge.

Infos :

thank you

Posts: 1

Participants: 1

Read full topic

I need help wirh firestore

$
0
0

@NoorAlhuda1990 wrote:

i need to connect a firestore with my ionic 3 app and i want to read some database from firestore to my ionic 3 app >>> please help me

Posts: 1

Participants: 1

Read full topic

Pass data between pages ionic 4

$
0
0

@Ludolefrenchy wrote:

Hello,
what is the best way to pass data from one page to another with ionic 4?
I have to pass a title and a description from an input.

thank you in advance

Ludo

Posts: 2

Participants: 2

Read full topic

Ionic 4 - Scrollable List - Needed

$
0
0

@vvanherk wrote:

Hello.

I have a list in the middle of screen that needs to be vertically scrollable - not a page scroll. An example scenario is that I have 25 information records (items in list). I only have room to display 5 at once - need to scroll list vertically to see remaining records.

It seems that is no longer part of Ionic 4. I have seen reference to this, along with suggestions for using

- but I’ve not been able to get those suggestions to work.

Can someone direct me to how to implement a scrollable list and some possible examples or code snippits.

Thanks.

Posts: 4

Participants: 2

Read full topic

Ionic infinitescroll with json data

$
0
0

@RenzoM78 wrote:

Hello,

I have the following page and restapi that works fine. But there are al lot of items loaded and what I want to do is to load a few items and every time when scrolling down after about ten items load more. I thought infinitescroll is then a good thing to use but I dont know how to implement in the following pages, anyone who can help me the good direction?

RestApi

import { Injectable } from '@angular/core';
import { Observable, of, throwError } from 'rxjs';
import { HttpClient, HttpHeaders, HttpErrorResponse } from '@angular/common/http';
import { forkJoin } from 'rxjs';

const apiUrl = "http://....nl/";

@Injectable({
  providedIn: 'root'
})
export class RestApiService {

  constructor(private http: HttpClient) { }
  
  getData(): Observable<any> {
	  let response = this.http.get(apiUrl+'f1nieuws');
	  return forkJoin([response]);
  }
  
}

Tab2 .ts

import { Component } from '@angular/core';
import { LoadingController } from '@ionic/angular';
import { RestApiService } from '../rest-api.service';

@Component({
  selector: 'app-tab2',
  templateUrl: 'tab2.page.html',
  styleUrls: ['tab2.page.scss']
})
export class Tab2Page {
	
	data:any;
	
	constructor(public api: RestApiService, public loadingController: LoadingController) { }
	
	ngOnInit() {
  this.getData();
}	
	async getData() {
  const loading = await this.loadingController.create({
    message: 'Loading'
  });
  await loading.present();
  this.api.getData()
    .subscribe(res => {
      console.log(res);
      this.data = res[0];
      loading.dismiss();
    }, err => {
      console.log(err);
      loading.dismiss();
    });
}

}


Tab2 html

<ion-header>
  <ion-toolbar>
    <ion-title>
      F1 nieuws
    </ion-title>
  </ion-toolbar>
</ion-header>

<ion-content class="cards-bg">

  <ion-card *ngFor="let f of data">
    
	<img src="{{f.Afbeelding}}">
  <ion-card-content>
    <ion-card-title>{{f.title}}</ion-card-title>
    <div>
      {{f.body}}
   </div>
  </ion-card-content>
    
  </ion-card>
</ion-content>

Posts: 1

Participants: 1

Read full topic

Xcode archive error after Successful build of App

$
0
0

@rammohanb wrote:

Currently I’m using Ionic Framework and trying to build iOS mobile App. In order do that I Did following steps.

  1. To add the platform,

$ ionic cordova platform add android

2.To building the app

ionic cordova build ios -- --buildFlag="-UseModernBuildSystem=0"

  1. After sucessful it generated .xcodeproject file. And I import the file into Xcode.
  2. After importing the project, cleaned the project folder in the xcode itself

5.Then I added the Apple ID account to my Xcode.
6. After Adding the account I’m trying to archive the project, to do that I follwing URL’s

Official Documentation to generate the IOS app

Stackoverflow answer to .ipa file.

  1. In the Archiving process I’m getting following errors

error: Your development team, does not support the Push Notifications capability. (in target ‘folder’)

I tried to rectify by following way

DISABLE_PUSH_NOTIFICATIONS=1 

in the preprocessor macros. Unfortunately it didn’t solve my problem.

I don’t have any Apple developer ID

How to solve this problem, in order archive the project. Could any one help me in this regard.

I tried all the solution’s which are available solutions but didn’t solve any answer. I stuck from past 2 days.

Posts: 1

Participants: 1

Read full topic


Ionic4 component not a known element

$
0
0

@polonski wrote:

Hi guys,

I’ve looked around but it seems I have all bases covered. Here’s a repro:

  1. create an example project ionic start example --type=angular - ok so far

  2. generate a component ‘some-thing’ seems to work ok

> ionic generate
? What would you like to generate? component
? Name/path of component: some-thing
> ng generate component some-thing
CREATE src/app/some-thing/some-thing.component.html (29 bytes)
CREATE src/app/some-thing/some-thing.component.spec.ts (650 bytes)
CREATE src/app/some-thing/some-thing.component.ts (285 bytes)
CREATE src/app/some-thing/some-thing.component.scss (0 bytes)
UPDATE src/app/app.module.ts (871 bytes)
[OK] Generated component!
  1. going to ‘app.component.html’ to add the new component <some-thing></some-thing>
    noting that the load is in ‘app.module.ts
import { SomeThingComponent } from './some-thing/some-thing.component';


@NgModule({
  declarations: [AppComponent, SomeThingComponent],
  entryComponents: [],
  imports: [
    BrowserModule,
  1. i run ionic serve compile works ok, but when i browse to the page i get a console error:
compiler.js:2427 Uncaught Error: Template parse errors:
'some-thing' is not a known element:
1. If 'some-thing' is an Angular component, then verify that it is part of this module.
2. If 'some-thing' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message. ("
              </ion-label>

              [ERROR ->]<some-thing></some-thing>

            </ion-item>
"): ng:///AppModule/AppComponent.html@17:14
    at syntaxError (compiler.js:2427)
    at TemplateParser.push../node_modules/@angular/compiler/fesm5/compiler.js.TemplateParser.parse (compiler.js:20311)
    at
...

All answers about this seem to point to having to load this component in manually, but it looks like that is already done inside the ‘app.module.ts’

I noticed this in the tabs sample project and thought it was something about lazy loading, but it’s still happening inside a non-tabs projects too.

What am I missing here? gotta be something small

with many thanks

Posts: 1

Participants: 1

Read full topic

After splash screen - ionic4

$
0
0

@rajeshvs wrote:

ionic 4:
My app, currently about 4 lazy modules. 3 Providers are declared in the app.module.ts

After the splash screen, the screen is white for 1-2 seconds and then the 1st screen displays.

How can I eliminate the 2 sec whiteness after the splash?

Eng team,
www.gainerp.com
Accounting/Inventory/Field Service on Google Cloud and Mobile.

Posts: 1

Participants: 1

Read full topic

Ionic 4 IonSlides bug? with screen orientation change

$
0
0

@arnhrwd wrote:

IonSlides does not properly update when the screen orientation changes. E.g. consider the following code snippet:

@ViewChild(IonSlides) slides: IonSlides;
constructor(private screenOrientation: ScreenOrientation){}
public ionViewWillEnter() {
    this.slides.update();
}
public ngOnInit() {
    this.screenOrientation.onChange().subscribe(
      () => {
          this.slides.update();
      }
    );
}

The update() method is called and works (solving a problem) for the ionViewWillEnter() hook. However while the update() method is called anytime a screen orientation changes (confirmed), it does not seem to have effect - the IonSlides displays incorrectly in this case. Any idea how to fix this? The IonSlides codebase has swiper as private so I can’t get to anything in there. BTW: confirmed on Samsung S9+ with the Dalvik debugger if that means anything.

Posts: 1

Participants: 1

Read full topic

How to stop build that is STUCK because of --prod flag

$
0
0

@trvrphlps wrote:

Hi, we are facing the problem that our builds is stuck when we using --prod flag, but the real problem is that now it has stuck not on our cli, but inside ionicframework build tool VM. How can we cancel those builds(cause now we have two builds there that’s we try to test, one is stuck right now and the second is in line…waiting to be stuck same as his friend)

Posts: 1

Participants: 1

Read full topic

Slides does not exist anymore

Viewing all 48981 articles
Browse latest View live


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