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

Native Plugins: Cordova vs Ionic Native

$
0
0

@LacOniC wrote:

In native docs, installation is like that:

ionic cordova plugin add cordova-plugin-appavailability
npm install @ionic-native/app-availability

I thought they are optional. So i run only “npm install @ionic-native/app-availability” and it work on local (web). But i wonder anout, Is Cordova necessary for real device or is it an alternative?

Thanks in advance.

Posts: 1

Participants: 1

Read full topic


Failed to login

$
0
0

@tcha-the-great wrote:

i have tried to use ionic cordova resources in order to use my icon and splash but when i enterd by email and password it return message wrong username or password while i can be able to login in dashboard.
this is ionic info result

@ionic/cli-utils  : 1.19.0
ionic (Ionic CLI) : 3.19.0

global packages:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)

local packages:

@ionic/app-scripts : 3.2.2-201901242027-201901242027
Cordova Platforms  : android 7.1.4
Ionic Framework    : ionic-angular 3.8.0

System:

Android SDK Tools : 26.1.1
Node              : v10.15.1
npm               : 6.8.0
OS                : Windows 7

Environment Variables:

ANDROID_HOME : C:\Users\chief\AppData\Local\Android\sdk

Misc:

backend : pro

Posts: 1

Participants: 1

Read full topic

Unable to play recorded with MediaCapture.captureVideo

$
0
0

@obaqueiro1 wrote:

I have tried everything I can think of, and followed a lot of the proposed solutions without success. This is the problem: When trying to capture a video using MediaCapture and then try to play it in a tag, the video just does not load. The code snippet is:

this.mediaCapture.captureVideo({limit: 1, duration: 30}).then (
        (data: MediaFile[]) => {
          console.log(data);
          this.videoPath = data[0].fullPath;
          this.validRecording = true;
          this.spinnerVisible = false;

          this.validRecording = true;
           let fileName = this.webView.convertFileSrc(this.videoPath);          
            document.getElementById('videoSource'+this.videoId).setAttribute('src', 
             fileName );
            this.video.load();
            this.video.play();

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

I am using webview 4, which contains convertFileSrc.
As a result of convertFileSrc i get a 'http://localhost/_app_file/storage/emulated/DCIM/camera/20190324_1123.mp4" url
On the step when the video is tried to be played in the tag, I am getting a 404 (OK) error (not found??). But when looking at the phone, the video is recorded correctly.

Other dependencies I’ve got installed:

“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/camera”: “~5.2.0”,
@ionic-native/core”: “~5.2.0”,
@ionic-native/file”: “~5.2.0”,
@ionic-native/ionic-webview”: “^5.2.0”,
@ionic-native/media-capture”: “~5.2.0”,
@ionic-native/splash-screen”: “~5.2.0”,
@ionic-native/status-bar”: “~5.2.0”,
@ionic-native/video-player”: “^5.2.0”,
@ionic/storage”: “2.1.3”,
@types/node”: “^11.11.3”,
“cordova”: “^8.0.0”,
“cordova-android”: “7.1.4”,
“cordova-browser”: “5.0.4”,
“cordova-plugin-camera”: “^4.0.3”,
“cordova-plugin-device”: “^2.0.2”,
“cordova-plugin-file”: “^6.0.1”,
“cordova-plugin-ionic-keyboard”: “^2.1.3”,
“cordova-plugin-ionic-webview”: “4.0.0”,
“cordova-plugin-media-capture”: “^3.0.2”,
“cordova-plugin-splashscreen”: “^5.0.2”,
“cordova-plugin-statusbar”: “2.4.2”,

Please help!

Posts: 2

Participants: 1

Read full topic

Human readable date with Angular

$
0
0

@ahmadt wrote:

Hello

Forgive me if this is a simple question, I’m new to Ionic 4 and to Angular

I’m receiving a datetime from API in this format (2019-03-09 15:47:18), I know this is a UTC timezone, the question how can I display it in the user local timezone with Human readable format?

<ion-note class=“ion-float-end”>{{notification.created_at | date:‘full’}}</ion-note>

This will display the date but in UTC format and I couldn’t find any option with “angular date” to display it

if you can please guide me, I’m still learning Ionic with Angular.

Thanks

Posts: 1

Participants: 1

Read full topic

[Ionic 4] Page background image with 100% screen width?

$
0
0

@ahmadt wrote:

Hello Experts :slight_smile:

I spend almost five days trying to figure this out.

I have a page that I want to set an image for the background (fixed image) and to support all type of screens.

I want the width of the image to match the screen width (and 50% of screen height), and make the toolbar transparent.

Is such a thing is even possible with Ionic? All resources on the internet are either old or don’t work

Posts: 1

Participants: 1

Read full topic

Source and destination must not be the same

$
0
0

@Dovel wrote:

Currently the builds with Cordova-Android 8.0.0 will randomly fail (especially on Windows systems).

The reason is, that Cordova uses fs-extra now for file operations like copy.
See Change-Log and the issue

In a nutshell:
fs-extra checks the pathes of file / directory before copy. It sounds great. But the check-method uses the Node fs Inode value to verify it’s the same file. See source code
This is not the best idea. Why?

  • They uses the number type of the value. Not the big-integer. In JavaScript the maximum safe integer is 53-bit. Node fs supports big-integer since version 10.4. see docs. Inode can be a huge value. See the difference between number and big-integer
  • The Inode number is an integer unique to the volume upon which it is stored. This means, you maybe can’t copy a file between volumes.

Here’s the active issue on Github
Please support it, if you want to keep building Apps with Ionic (Cordova).
This is a common issue on the latest Cordova version.

It really often breaks the build.

Posts: 1

Participants: 1

Read full topic

No padding in ionic v4

$
0
0

@sonicwong wrote:

I know both “ion-no-padding” class or “no-padding” attribute work.
But, which would be prefer to use?

Posts: 1

Participants: 1

Read full topic

Ionic Google Drive

$
0
0

@Harikag wrote:

I have a requirement to display images from Google drive to my app, can we do, If yes, How to do help me with example, If possible

Posts: 1

Participants: 1

Read full topic


How to get ahold of IonContent element from deep within?

$
0
0

@VictorNorman wrote:

I have created an accordion list in my app, but when the user clicks on the item that is near the bottom of the screen, most of the sub-list is added off-screen, so that the user doesn’t even know it is there. So, I need programmatically scroll the screen up a bit. I have written code (following Josh Morony’s excellent tutorial https://www.joshmorony.com/animating-list-items-in-ionic-with-intersection-observer-api/) to observe when the new elements are off-screen.

The only way I can find to programmatically scroll is to call one of the scroll functions on IonContent.

However, the trigger for this is the user clicking on a card way deep down in the DOM – many levels below the ion-content element.

What is the best way to get a handle on the IonContent element so that I can call the scrollToTop() method on it (or some such)?

Thanks.

Vic

Posts: 1

Participants: 1

Read full topic

Check actual connection

$
0
0

@Kyrax80 wrote:

This plugin just tells me if I’m connected to wifi, even if the wifi has no connection for any reason.

Is there a way to check if there’s an actual connection to the internet?

Thanks

Posts: 1

Participants: 1

Read full topic

How create a search textbox inside the ion-select?

Blocked a frame with origin "http://***.***.***.**:8100" from accessing a cross-origin frame

$
0
0

@shilpakaramar wrote:

How to fix the blocked a frame issue. What i need to achieve is to access >

document.getElementById(“iframe_id”).contentWindow.location.href.

how to achieve this in ionic android application

Posts: 1

Participants: 1

Read full topic

How to create a spring loader for a specific div location

Problem with form - Multiple line items having same name

$
0
0

@wOx wrote:

So I have a form multiple line items having same column/field. Below is my html code:

<ion-item>
<ion-label position="floating">Customer Name</ion-label>
<ion-input type="text" name="CustomerName" ngModel>
</ion-input>
</ion-item>

<ion-item *ngFor="let att of anArray; let idx = index">
<ion-item>
        <ion-label position="floating">Line Date : </ion-label>
        <ion-input type="text" name="LineDate{{idx+1}}" ngModel></ion-input>
    </ion-item>
    <ion-item>
        <ion-label position="floating">Line Item</ion-label>
        <ion-input type="text" name="LineItem{{idx+1}}" ngModel></ion-input>
    </ion-item>input type="text" name="Type{{idx+1}}" ngModel></ion-input>
    </ion-item>
    <ion-item>
        <ion-label position="floating">Description</ion-label>
        <ion-input type="text" name="Description{{idx+1}}" ngModel></ion-input>
    </ion-item>
</ion-item>

After submitting the form, I am getting below JSON generated:

{
  "CustomerName": "",
  "LineDate1": "A",
  "LineItem1": "A",
  "Type1": "A",
  "Description1": "A",
  "LineDate2": "B",
  "LineItem2": "B",
  "Type2": "B",
  "Description2": "B"
}

But this is not what I actually was expecting. I need something like below. So that I can easily convert below JSON to rows and insert into a database table.

{
  "CustomerName": "abc",
  "LineDate": "A",
  "LineItem": "A",
  "Type": "A",
  "Description": "A"
},
{
  "CustomerName": "abc",
  "LineDate": "B",
  "LineItem": "B",
  "Type": "B",
  "Description": "B"
}

Posts: 1

Participants: 1

Read full topic

Issue to open modal page if application is compiled with --prod flag

$
0
0

@manojpatel0217 wrote:

Hello,

I am trying to open one modal page that contains google address search api. it opens if I install application normally. but somehow its not opening if i create apk with --prod flag.

Its a wired issue but I stuck on that. Can someone help me on that?

Thanks

Posts: 1

Participants: 1

Read full topic


Ionic 3 and Can't make phone call with callnumber plugin!

$
0
0

@pdj wrote:

Hello

I’m quite sure that code is not missing…
whenever comes to phonecall function…
it has error saying
TypeError: Object(…) is not a function

the wierd one is that I used to use plugin well on import

import { CallNumber } from '@ionic-native/call-number
not with ngx postfix…
when I remove those ngx. it says can not find name CallNumber even I import it without ngx.

import { CallNumber } from '@ionic-native/call-number/ngx';
constructor(public callNumber:CallNumber,public navCtrl: NavController, public navParams: NavParams) {

}
  phonecall(){
this.callNumber.callNumber("15771234", true)
.then(res => console.log('Launched dialer!', res))
.catch(err => console.log('Error launching dialer', err));
  }

package.json is

{
“name”: “solami”,
“version”: “0.0.1”,
“author”: “Ionic Framework”,
“homepage”: “http://ionicframework.com/”,
“private”: true,
“scripts”: {
“start”: “ionic-app-scripts serve”,
“clean”: “ionic-app-scripts clean”,
“build”: “ionic-app-scripts build”,
“lint”: “ionic-app-scripts lint”
},
“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”,
@angular/router”: “^7.2.9”,
@ionic-native/call-number”: “^5.3.0”,
@ionic-native/camera”: “^4.11.0”,
@ionic-native/core”: “~4.10.0”,
@ionic-native/document-viewer”: “^4.11.0”,
@ionic-native/file”: “^4.11.0”,
@ionic-native/file-transfer”: “^4.11.0”,
@ionic-native/in-app-browser”: “^4.20.0”,
@ionic-native/onesignal”: “^4.11.0”,
@ionic-native/photo-viewer”: “^4.11.0”,
@ionic-native/splash-screen”: “~4.10.0”,
@ionic-native/sqlite”: “^4.11.0”,
@ionic-native/status-bar”: “~4.10.0”,
@ionic/storage”: “2.1.3”,
@types/text-encoding”: “0.0.35”,
“call-number”: “1.0.1”,
“com-sarriaroman-photoviewer”: “^1.2.1”,
“cordova-android”: “6.3.0”,
“cordova-plugin-camera”: “^4.0.3”,
“cordova-plugin-device”: “^2.0.2”,
“cordova-plugin-document-viewer”: “^0.9.10”,
“cordova-plugin-file”: “^6.0.1”,
“cordova-plugin-file-transfer”: “^1.7.1”,
“cordova-plugin-inappbrowser”: “^3.0.0”,
“cordova-plugin-ionic-keyboard”: “^2.1.3”,
“cordova-plugin-ionic-webview”: “^2.4.0”,
“cordova-plugin-kakao-sdk”: “^3.0.0”,
“cordova-plugin-splashscreen”: “^5.0.2”,
“cordova-plugin-whitelist”: “^1.3.3”,
“cordova-sqlite-storage”: “^2.3.2”,
“html-escape-unescape”: “^1.0.3”,
“ionic-angular”: “3.9.2”,
“ionicons”: “3.0.0”,
“kakao-sdk”: “^3.0.0”,
“mx.ferreyra.callnumber”: “~0.0.2”,
“naver-login”: “^1.0.1”,
“naver-sdk”: “^1.0.1”,
“ng2-pdf-viewer”: “^5.1.1”,
“onesignal-cordova-plugin”: “^2.4.1”,
“rxjs”: “5.5.11”,
“sw-toolbox”: “3.6.0”,
“text-encoding”: “^0.7.0”,
“zone.js”: “0.8.26”
},
“devDependencies”: {
@ionic/app-scripts”: “3.1.11”,
“typescript”: “~2.6.2”
},
“description”: “An Ionic project”,
“cordova”: {
“plugins”: {
“cordova-plugin-whitelist”: {},
“cordova-plugin-device”: {},
“cordova-plugin-splashscreen”: {},
“cordova-plugin-ionic-webview”: {
“ANDROID_SUPPORT_ANNOTATIONS_VERSION”: “27.+”
},
“cordova-plugin-ionic-keyboard”: {},
“cordova-sqlite-storage”: {},
“com-sarriaroman-photoviewer”: {},
“cordova-plugin-camera”: {},
“onesignal-cordova-plugin”: {},
“cordova-plugin-file”: {},
“cordova-plugin-file-transfer”: {},
“cordova-plugin-document-viewer”: {},
“cordova-plugin-inappbrowser”: {},
“cordova-plugin-kakao-sdk”: {
“KAKAO_APP_KEY”: “xxx”
},
“call-number”: {},
“mx.ferreyra.callnumber”: {}
},
“platforms”: [
“android”
]
}
}

Posts: 1

Participants: 1

Read full topic

Build Error Upload IPA

$
0
0

@FilonKsegundo wrote:

[07:38:05]: Shell command exited with exit status 1 instead of 0.
upload failed: . ‘ascii’ codec can’t encode character u’\xe7’ in position 36: ordinal not in range(128)

[07:38:05]: fastlane finished with errors
/Library/Ruby/Gems/2.0.0/gems/fastlane-2.46.1/fastlane_core/lib/fastlane_core/ui/interface.rb:143:in `shell_error!’: [!] Shell command exited with exit status 1 instead of 0. (FastlaneCore::Interface::FastlaneShellError)
upload failed: .to s3:app-store.ipa ‘ascii’ codec can’t encode character u’\xe7’ in position 36: ordinal not in range(128)

Posts: 1

Participants: 1

Read full topic

Ionic Page navParam Lowercase

$
0
0

@chaitya wrote:

How to do global level change for IonicPage navParams ? Whether I am passing from another page or whether user types in for browser It should always be read and changed to lower case .

Is there any way to do so ?

lets say : my app URL is : https://www.abcd.com/en and https://www.abcd.com/fr however if user types in manually EN --> it should automatically read and convert to en this is not only for one page or one place otherwise I can manually convert toLowerCase() However is there any property or any option we can pass so it will automatically be read always as lowercase

Posts: 1

Participants: 1

Read full topic

ESNext with Ionic 4

$
0
0

@LacOniC wrote:

Hi. I was reading a tutorial about locales and tells about dynamic import. Dynamic import needs EsNext. I wonder about, what happens if i don’t use es2015. Most of mobile phones are up to date. I can’t figure what happens.

Thanks in advance.

Posts: 1

Participants: 1

Read full topic

Select an item in ion-select and perform action

$
0
0

@FK2193 wrote:

if I select ‘twice a day’ then the list of the item shows two times, how we do that?

Posts: 1

Participants: 1

Read full topic

Viewing all 49211 articles
Browse latest View live


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