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

(ionic-v4) ion-datetime


Android App not working with Firebase plugin

$
0
0

@nganeshreddi wrote:

I am using Firebase plugin in my APP,
While building APK it was giving error with multiDex, then I added multiDexEnabled true and build the APK
This APK is not working in device , it says App stopped working

Posts: 1

Participants: 1

Read full topic

Need help in RSS Feed application

$
0
0

@saifuddin_m wrote:

I am looking for solution to read and convert XML RSS Feed using ionic

[ERROR]
Access to XMLHttpRequest at ‘https://rss.com/feed/’ from origin ‘http://localhost:8100’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.

ionic (Ionic CLI) : 4.9.0 (C:\Users\msaifuddin\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.6.0
@angular-devkit/build-angular : 0.13.9
@angular-devkit/schematics : 7.3.9
@angular/cli : 7.3.9
@ionic/angular-toolkit : 1.5.1

stem:

NodeJS : v8.11.3 (C:\Program Files\nodejs\node.exe)
npm : 6.8.0
OS : Windows 10
╭─────────────────────────────────────╮
│ Update available 4.9.0 → 5.2.3 │
│ Run npm i -g ionic to update │
╰─────────────────────────────────────╯

import { Injectable } from '@angular/core';
import { Http, RequestOptions } from '@angular/http';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/do';
import { Observable } from 'rxjs/Rx';
// let Parser = require('rss-parser');

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

  private url: string = "https://rss.com/feed/";

  posts: any;
  options: any;
  headers: any;

  constructor(private http: Http) {
    this.headers = new Headers(
      {
        'Content-Type': 'application/rss+xml',
        'Accept': 'application/rss+xml',
      });
    this.options = new RequestOptions({ headers: this.headers });

    this.http.get(this.url, this.options).map(res => res).subscribe(
      data => {
        this.posts = data;
      },
      err => {
        console.log("Oops!");
      });
  }
}

Any help appreciated in

Posts: 1

Participants: 1

Read full topic

Api ai javascript is request error

$
0
0

@santad wrote:

I used ionic call dialogflow .
run android device error but ionic serve not error
error say “api ai javascript is request error”

import {ApiAiClient} from “api-ai-javascript”;
platform.ready().then(() => {
const client = new ApiAiClient({accessToken: ‘aaaaaaaaaaaaaaaaaaaaa’});
client.textRequest(‘Hello!’)
.then((response) => { this.alertController(“y”,“y”) })
.catch((error) => { this.alertController(“n”,“n”) })
});

Posts: 1

Participants: 1

Read full topic

Ionic 3 geolocation is not working

$
0
0

@dushan wrote:

I’m trying to get my current location from geolocation. But the geolocation.getCurrentPosition().then() is not getting called.

My ioinc version is 3
@ionic-native/geolocation": “^4.20.0”

Posts: 1

Participants: 1

Read full topic

Ionic v4 no keep CSS design in android 6.0

$
0
0

@leovidal wrote:

Good night! I am starting in the world of Ionic. I am developing and application using Firebase. Everything is going well, except when I run this application in my device with Android 6. It don’t keep CSS design. Do you have any idea? Thanks

Posts: 1

Participants: 1

Read full topic

Network error in firebase

$
0
0

@lloydlim wrote:

Iam getting an error of network error (timeout or interupted connection, unreachable host during interacting with the firebase) when i test on real device , but on emulator this does not occur , can anyone suggest a work arround here ? I already have the whitelist plugin installed

Posts: 1

Participants: 1

Read full topic

Getting this error while ionic serve --lab the project?


How to call component methods (Ionic 4 + Vue.js 2)

$
0
0

@kms695 wrote:

For example, if I use the ion-tabs and want to change the current tab manually, there is a select method provided for this component which returns a promise. But I don’t understand how to use given methods of components (in Vue.js).

Does anyone know how this works? The corresponding doc is here: https://ionicframework.com/docs/api/tabs

I don’t understand how to use the given methods of components at all. There are several examples, mostly for Angular, which are outdated. I seek a solution for Vue.js only.

Posts: 1

Participants: 1

Read full topic

App unfortunately stooped on real android device

$
0
0

@shree12 wrote:

I have developed one app in ionic 3, which works fine in browser. Is it working good before Jun 16,2019. Now it is unfortunately stopped on android device.

After 16 june is showing build error so I tried below steps

> ionic cordova platform rm android
> ionic cordova platform add android@8.0.0 
> ionic cordova plugin add cordova-plugin-androidx 
> ionic cordova plugin add cordova-plugin-androidx-adapter

cordova plugin add cordova-android-support-gradle-release --save

then is successfully built but ‘Unfortunately stopped on device’.

Is their any way to get error message for stopping?? Please help me

Posts: 1

Participants: 1

Read full topic

Ionic4 - Nested reorder groups problem - 2nd level reorder stops working after moving 1st level component

$
0
0

@vojtechkubat wrote:

TL/DR

Nested (2nd level) ion-reorder-group stops working, after moving its parent in higher ion-reorder-group (1st level).

The demo project is here: ionic4 nested reorder

Any idea what’s wrong?

The Case

I have an ion-reorder-group containing a list of questions. Each of the questions have nested ion-reorder-group with answers. User shall be able to reorder the questions, and reorder answers on the list of each question. Both, the questions and the answers, use handle for drag and drop.

The Problem

This works correctly when the page is rendered for the first time. But when a question is moved, the nested reorder list with the answers does not work anymore - the handle of the answer now drags the whole question.

Expected Behavior

The nested reorder list shall work correctly, after its 1st level reorder object is reordered.

My clunky workaround

By trial and error, I figured out, that the answers can be reordered again, if I use *ngIf=“hide” to hide the reorder list after moving of a question, and asynchronously let it appear again.

questionMoved() {
   this.hideAnswers = true;
   setTimeout(()=>{
     this.hideAnswers = false;
   }, 0);
}
<ion-reorder-group
  *ngIf="!this.hideAnswers"
  disabled="false"
  (ionItemReorder)="itemReorder($event)"
>

HomePage - the list of questions

...

export class HomePage {
questions = [
    {
      question: "Question 1",
      answers: ["Yes","No","Not sure",]
    },
    {
      question: "Question 2",
      answers: ["A","B","C","D",]
    },
    {
      question: "Question 3",
      answers: ["Yes","No","Not sure",]
    }
  ];

itemReorder(event) {
    event.detail["complete"](true);
}
...
<ion-reorder-group
    (ionItemReorder)="itemReorder($event)"
    disabled="false"
    id="reorderQuestions"
  >
      <div 
        *ngFor="let current of this.questions; let i = index" 
        class="question"
      >
        <ion-item>
          <ion-reorder slot="end" style="border: 2px solid black;"></ion-reorder>
          <ion-label>{{ current.question }}</ion-label>
        </ion-item>
        <ion-item>
          <app-answers
            style="width: 75%;"
            [answers]=current.answers
          ></app-answers>
        </ion-item>
      </div>
  </ion-reorder-group>

Answers component - the list of answers

This component is used in each of the question.

@Component({
  selector: 'app-answers',
  templateUrl: 'answers.component.html',
  styleUrls: ['answers.component.scss'],
})
export class AnswersComponent {

  @Input() answers = [];

  itemReorder(event) {
    event.detail["complete"](true);
    event.stopPropagation();
  }

}
<ion-reorder-group
  disabled="false"
  (ionItemReorder)="itemReorder($event)"
>
  <ion-item 
    *ngFor="let current of this.answers; let i = index" 
    class="answers"
  >
    <ion-label>{{ current }}</ion-label>
    <ion-reorder slot="end" style="border: 2px solid black;"></ion-reorder>
  </ion-item>
</ion-reorder-group>

Posts: 1

Participants: 1

Read full topic

How to take screenshots of an Ionic4 app for the Apple Store?

$
0
0

@ioclaudio wrote:

Hi,
to publish an Ionic4 app on the Apple Store a great number of screenshot in many different formats are required.
I don’t have all these devices to take a screenshot of the app.
Are there tools or simulators that allow you to take screenshot of an app running on Apple devices?

Thank you

Claudio

Posts: 1

Participants: 1

Read full topic

Ion-img disappearing and reappearing during ion-tabs navigation (iOS)

$
0
0

@JamesSlater wrote:

I have made an Ionic 4 app that uses both tabs and sidemenu navigation. Everything works perfectly when testing on my Android phone, however when I have started to test on iOS some issues have been highlighted.

This issue is where the logo (ion-img) that appears on each page disappears and is replaced by a clear box with white borders for a brief second, and then the ion-img appears again (when navigating using the tabs).

Does anyone know what would cause this, and how I would go about fixing it?

Here is a link to a video of the issue for more detail.

Here is the code for my dashboard page which includes the logo:

<div class="nav-wrapper" style="background: white;">
  <ion-header class="navbar">
    <div class="icons">
    <ion-buttons slot="start">
      <ion-menu-button color="tertiary"></ion-menu-button>
    </ion-buttons>
<ion-icon (click)="settings()" class="settings" color="tertiary" name="settings"></ion-icon>
    <ion-img src="assets/logo.png"></ion-img>
</div>

</ion-header>
</div>

this is the code for the tabs, present in the on the dashboard page and the other 2 pages - just differs slightly with routing, active-item etc.

  <ion-tabs>
    <ion-tab-bar slot="bottom">
      <ion-tab-button routerDirection="forward" (click)="about()">
        <ion-icon name="information-circle-outline"></ion-icon>
        <ion-label>About Us</ion-label>
      </ion-tab-button>
      <ion-tab-button class="activeTab" tab="dashboard">
        <ion-icon color="blue" name="home"></ion-icon>
        <ion-label>Dashboard</ion-label>
      </ion-tab-button>
      <ion-tab-button (click)="contact()">
        <ion-icon name="contacts"></ion-icon>
        <ion-label>Contact Us</ion-label>
      </ion-tab-button>
    </ion-tab-bar>
  </ion-tabs>

Posts: 1

Participants: 1

Read full topic

Ionic 3 - this.navCtrl.last() works in development mode but dosen't work in production build in android

$
0
0

@nikhil7 wrote:

  • In my application, there are number of pages which redirects to one common page.
  • Now in that common page I use this.navCtrl.last() for returning back to the page it came from.
  • It works properly in development mode as this.navCtrl.last() gives us last page name.
  • But same functionality not working in production build, it doesn’t redirect to previous page.

in constructor I use

this.page = this.navCtrl.last().name;

and on click of button in the common page it redirects to the page from where it came from
so on button click I use

this.navCtrl.push(this.page);

For above scenario page redirects nowhere on click of button in production build, I just want the same results as in development mode.

Posts: 1

Participants: 1

Read full topic

Publishing ionic app to iTunes App Store

$
0
0

@JohnCressman wrote:

I’ve been an android guy for years but I want to publish my app for iphone. I have a macbook air, I loaded ionic and xcode on it, but I’m a little lost at the whole process. Can anyone recommend a step by step guide or tutorial for getting from ionic to the itunes app store?

Thanks!

Posts: 1

Participants: 1

Read full topic


Ionic 4 Change Toast CSS

$
0
0

@DeanCMSSystems wrote:

A VERY basic question:
How do I change the CSS of a toast?

I want to change the content max-width on the toast message, because the close button get pushed of the screen. So one would think to add .toast-content in the global.scss file and it should work…

No, not with Ionic. With Ionic there is no simple solution!!!

And no, I don’t want to add cssClass property to EVERY toast created, I want to change this globally…

Posts: 3

Participants: 2

Read full topic

On-infinite-scroll v5

$
0
0

@AJDCNumenti wrote:

He probado según los tutoriales y la propia documentación de ionic implememtar on-infinite-scroll, pero no funciona.
¿Alguna solución?

Posts: 1

Participants: 1

Read full topic

Display event from json

$
0
0

@Tubiss wrote:

this is my calendar how look like

Ads%C4%B1z

ts file

import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';
import { Calendar } from '@ionic-native/calendar/ngx';
import { RmtServiceProvider } from '../../providers/rmt-service/rmt-service';
import {Http} from '@angular/http';
/**
 * Generated class for the TakvimPage page.
 *
 * See https://ionicframework.com/docs/components/#navigation for more info on
 * Ionic pages and navigation.
 */

@IonicPage()

export class CalendarPage {


  currentEvents = [
    {

     
      year: 2019,
      month: 2,
      date: 25,
     


    },
    {
      
      year: 2019,
      month: 2,
      date: 26,
      
      
    }
  ];

 
 

 constructor(public navCtrl: NavController ,    public navParams: NavParams,
  public remoteService : RmtServiceProvider,public http: Http,) {
    
  
  }



ionViewDidLoad() {
    console.log('ionViewDidLoad CalendarPage');
  }

  onDaySelect(e){
    console.log(e);
  }
  onMonthSelect(e){
    console.log(e);
  }
  onTitleSelect(e){
    console.log(e);
  }

  goBackPage(){
    this.navCtrl.push('HomePage');
  }

}

html

 <ion-content padding  >
	<mycal [events]="currentEvents" (onDaySelect)="onDaySelect($event)" (onMonthSelect)="onMonthSelect($event)"  >
		
	</mycal>
  </ion-content>

provider

 return new Promise(resolve => {
      this.http.get('http://127.0.0.1:8000/api/lessons'  )
        .map(res => res.json())
        .subscribe(data => {
          this.data = data;
          console.log(data);
          resolve(this.data);
        });
    });
  }

and my json like this

[{“name”:“firstlesson”, “start_time”:2019-09-22 17:13:02}]

how can ı display this on the calendar. ionic 3 angular 5

Posts: 1

Participants: 1

Read full topic

iOS package build fails due to 'invalid byte sequence in UTF-8'

$
0
0

@alexmuelli wrote:

When running the package build for iOS I always get the error below.
I can build it locally without issues.

Running with gitlab-runner 10.2.0~beta.147.gbd1f3fcb (bd1f3fcb)
  on ip-10-2-158-91 (dc549c99)
Creating new VM...
Running on Ionics-Mac-3.local via ip-10-2-158-91...
Cloning repository...
Cloning into 'builds/project-0'...
Checking out 68cd950b as feature-appflow...
Skipping Git submodules setup
$ fetch-updates || true
Checking for build process updates...
$ build-ios
Setting up project pipeline...
Running build process...
+--------------------------------------------+---------+----------------------------+
|                                   Used plugins                                    |
+--------------------------------------------+---------+----------------------------+
| Plugin                                     | Version | Action                     |
+--------------------------------------------+---------+----------------------------+
| fastlane-plugin-update_project_codesigning | 0.2.0   | update_project_codesigning |
+--------------------------------------------+---------+----------------------------+

[14:30:18]: Sending anonymous analytics information
[14:30:18]: Learn more at https://docs.fastlane.tools/#metrics
[14:30:18]: No personal or sensitive data is sent.
[14:30:18]: You can disable this by adding `opt_out_usage` at the top of your Fastfile
[14:30:18]: You have required a gem, if this is a third party gem, please use `fastlane_require 'securerandom'` to ensure the gem is installed locally.
[14:30:18]: ------------------------------
[14:30:18]: --- Step: default_platform ---
[14:30:18]: ------------------------------
[14:30:18]: Driving the lane 'ios package_build' 🚀
[14:30:18]: ---------------------------
[14:30:18]: --- Step: build_summary ---
[14:30:18]: ---------------------------

+---------------------+---------------------------+
|                  Build Summary                  |
+---------------------+---------------------------+
| Job ID              | 6588141                   |
| Node.js version     | v10.16.0                  |
| Cordova CLI version | 9.0.3 (cordova-lib@9.0.2) |
| npm version         | 6.9.0                     |
| macOS version       | 10.14.5                   |
| Xcode version       | Xcode 10.2.1              |
|                     | Build version 10E1001     |
+---------------------+---------------------------+

[14:30:23]: --------------------------------
[14:30:23]: --- Step: detect_native_type ---
[14:30:23]: --------------------------------
[14:30:23]: Checking if cordova or capacitor project
[14:30:23]: Cordova project detected
[14:30:23]: -------------------------
[14:30:23]: --- Step: get_web_dir ---
[14:30:23]: -------------------------
[14:30:23]: webDir is `www`
[14:30:23]: ---------------------------------
[14:30:23]: --- Step: add_git_credentials ---
[14:30:23]: ---------------------------------
[14:30:23]: -------------------------------
[14:30:23]: --- Step: modify_config_xml ---
[14:30:23]: -------------------------------
[14:30:23]: No custom native config detected.
[14:30:23]: -----------------------------
[14:30:23]: --- Step: create_keychain ---
[14:30:23]: -----------------------------
[14:30:23]: $ security list-keychains -d user
[14:30:23]: ▸ "/Users/ionic/Library/Keychains/login.keychain-db"
[14:30:23]: ----------------------------
[14:30:23]: --- Step: download_certs ---
[14:30:23]: ----------------------------
[14:30:24]: -------------------------
[14:30:24]: --- Step: upload_logs ---
[14:30:24]: -------------------------
[14:30:24]: ---------------------------
[14:30:24]: --- Step: shell command ---
[14:30:24]: ---------------------------
[14:30:24]: -----------------------------
[14:30:24]: --- Step: delete_keychain ---
[14:30:24]: -----------------------------
[14:30:24]: invalid byte sequence in UTF-8
+------------------+-------------------+
|             Lane Context             |
+------------------+-------------------+
| DEFAULT_PLATFORM | ios               |
| PLATFORM_NAME    | ios               |
| LANE_NAME        | ios package_build |
| PROJECT_WEB_DIR  | www               |
+------------------+-------------------+
[14:30:24]: invalid byte sequence in UTF-8

+------+---------------------+-------------+
|             fastlane summary             |
+------+---------------------+-------------+
| Step | Action              | Time (in s) |
+------+---------------------+-------------+
| 1    | default_platform    | 0           |
| 2    | build_summary       | 5           |
| 3    | detect_native_type  | 0           |
| 4    | get_web_dir         | 0           |
| 5    | add_git_credentials | 0           |
| 6    | modify_config_xml   | 0           |
| 7    | create_keychain     | 0           |
| 💥   | download_certs      | 0           |
| 9    | upload_logs         | 0           |
| 10   | shell command       | 0           |
| 11   | delete_keychain     | 0           |
+------+---------------------+-------------+

[14:30:24]: fastlane finished with errors
WARNING: Nokogiri was built against LibXML version 2.9.2, but has dynamically loaded 2.9.4
/Users/ionic/.fastlane/bin/bundle/bin/fastlane: [!] invalid byte sequence in UTF-8 (ArgumentError)
\e[91mFailed to upload ipa to storage please retry your build.\e[0m
Running after script...
$ clean-up
Cleaning up files...
Successful clean up
ERROR: Job failed: Process exited with: 1. Reason was:  ()

Posts: 1

Participants: 1

Read full topic

Ionic get value from json object

Viewing all 70439 articles
Browse latest View live


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