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

Show UI notification for incoming call

$
0
0

@Masetek wrote:

Hello,

I’m developing an Ionic 4 app that uses Tokbox video-chat. How can I make a phone call notification? Any ideas?

I use firebase cloud messaging for other notifications.

Thanks in advance!

Posts: 1

Participants: 1

Read full topic


Ionic 4 SQLite PDF storage

$
0
0

@krishnageethika wrote:

Hi, I’m new to ionic and in my Ionic Application, I need to store a pdf and image file in SQLite i.e in the app storage. I will get the file from another database like MongoDB in the URL format.
Could anyone of you help me out of this and suggest any references to complete the app storage using SQLite.

Thanks in advance.

Posts: 1

Participants: 1

Read full topic

General advise and critique needed on UI ionic development

$
0
0

@GeauxOnAndOn wrote:

I have been tasked with taking an existing angular app and ionizing it. Lets say the app is already mobile friendly and responsive , i.e. extensive css and jquery transformations to make sure it rocks on little screens.

I know one of ionic 4 claim to fame is all it’s components that are responsive and mimic the look and feel of the hosting os, ios or android. What if I don’t care about that and feel the look of the angular html is just fine?

Would there be a problem just using the minimum oinc framework and leaving all the UI in html?

Posts: 1

Participants: 1

Read full topic

Update the view depending on another class

$
0
0

@viviana02 wrote:

I need help, I do not know English I use the google translator and I’m learning ionic so if I have everything wrong, please tell me xd, I have two classes, the first sends a number to a method of the second and this method should update the view so that the quantity of images does not appear, what happens is that the value does arrive but the view is not updated

home.ts

realizarPedido(){
  var pedido = this.sumar;
   let distribucion = new DistribucionPage(null,null,null);
   distribucion.quitarProductosDis(pedido); 
  }

distribucion.html

<div class="box green">
      <img *ngIf="!mostrarr[0]" class="zana-1" src="../assets/zanahoria.png" alt="">
    </div>
    
    <img *ngIf="!mostrarr[1]" class="zana-2" src="../assets/zanahoria.png" alt="">
    <img *ngIf="!mostrarr[2]" class="zana-2" src="../assets/zanahoria.png" alt="">
    <div class="box yellow">
      <img *ngIf="!mostrarr[3]" class="zana-3" src="../assets/zanahoria.png" alt="">
    </div>   

distribucion.ts

quitarProductosDis(cantidad){
 
    for (let index = 0; index < cantidad; index++) {
      this.mostrarr[index] = true;
    }
  }

Posts: 1

Participants: 1

Read full topic

Subclassing ion-list

$
0
0

@Imaginativeone wrote:

I would like to add drag and drop functionality to an ion-list without using Dragula (or any other third party utility). Can I add it by creating a subclass, and then making changes to it?

Posts: 1

Participants: 1

Read full topic

Response for preflight has invalid HTTP status code 405

$
0
0

@dbarett wrote:

I am trying to solve the following inconvenience that occurs when sending data to the server from a device
the error is
XMLHttpRequest can not load
http://10.0.0.0/MovilAppWS/api/Pedidos/Post. Response for preflight has invalid HTTP status code 405

the information is loaded from a SQLite database

Used codes
this code is to bring the orders of the database
OrdersSynchronize ()
{
this.database.RequestsSynchronize (). then ((data: any) => {
console.log (data);
this.postData = data;
}, (error) => {
console.log (error);
})
}

The following code is for sending data through a web service

var headers = new Headers ({
‘Content-Type’: ‘application / json’,
‘Access-Control-Allow-Origin’: ‘*’,
‘Access-Control-Allow-Headers’: ‘X-API-KEY, Origin, X-Requested-With, Content-Type, Accept, Access-Control-Request-Method’,
‘Access-Control-Allow-Methods’: ‘GET, POST, OPTIONS, PUT, DELETE’
});

 // headers.append ('Content-Type', 'application / json', 'Access-Control-Allow-Origin');
  const requestOptions = new RequestOptions ({headers: headers})
  let url = "http://10.0.0.0/MovilAppWS/api/Pedidos/Post"
  this.http.post (url, this.postData, requestOptions)
 .map (res => res.json ()). subscribe (data => {
  const toast = this.toastCtrl.create ({
    message: 'Your request has been processed, we will contact you shortly.',
    duration: 5000
    position: 'top'
    });
    toast.present ();
 },
 err => {
 const toast = this.toastCtrl.create ({
     message: err,
     duration: 5000
     position: 'middle'
     });
     toast.present ();
 });

Posts: 1

Participants: 1

Read full topic

Ionic framework not installed, cannot find ionic-angular/package

$
0
0

@abhisheker wrote:

when I do ionic info it says the Ionic Framework : not installed

I installed cordova@8.1.2 and ionic@4.4.0

Here is the order of commands:

sudo rm -rf node_modules
sudo npm uninstall -g ionic
sudo npm uninstall -g cordova
sudo npm install -g cordova@8.1.2
sudo npm install -g ionic@4.4.0
ionic info

APMDRD2PAASINGs-MacBook-Pro:iphis-mobile superuser$ ionic info
[ERROR] Error loading ionic-angular package.json: Error: Cannot find module
‘ionic-angular/package’
[ERROR] Error loading @ionic/app-scripts package.json: Error: Cannot find module
@ionic/app-scripts/package’

Ionic:

ionic (Ionic CLI) : 4.4.0 (/Users/superuser/.nvm/versions/node/v11.2.0/lib/node_modules/ionic)
Ionic Framework : not installed
@ionic/app-scripts : not installed

Cordova:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
Cordova Platforms : ios 4.5.4
Cordova Plugins : cordova-plugin-ionic-webview 1.2.1, (and 14 other plugins)

System:

NodeJS : v11.2.0 (/Users/superuser/.nvm/versions/node/v11.2.0/bin/node)
npm : 6.9.0
OS : macOS
Xcode : Xcode 10.1 Build version 10B61

Posts: 1

Participants: 1

Read full topic

Issues trying to open PDF with native viewer

$
0
0

@JohnCressman wrote:

I followed a video tutorial on opening a PDF using native cordova plugins. The app runs, but when I move it to my Android device - it doesn’t open a local or remote PDF.

Instead I get the following error:

ERROR TypeError: Cannot read property 'then' of undefined
    at HomePage.push../src/app/home/home.page.ts.HomePage.openLocalPdf (home-home-module.js:112)
    at Object.eval [as handleEvent] (ng:///HomePageModule/HomePage.ngfactory.js:24)
    at handleEvent (vendor.js:57150)
    at callWithDebugContext (vendor.js:58220)
    at Object.debugHandleEvent [as handleEvent] (vendor.js:57947)
    at dispatchEvent (vendor.js:54599)
    at vendor.js:55046
    at HTMLElement.<anonymous> (vendor.js:66909)
    at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (polyfills.js:2785)
    at Object.onInvokeTask (vendor.js:51333)
View_HomePage_0 @ ng:///HomePageModule/HomePage.ngfactory.js:19

I have the exact code, so I’m not sure what’s wrong and I’m hoping another pair of eyes can help. The local PDF is called my.pdf and is in the assets folder.

html file

<ion-header>
  <ion-toolbar>
    <ion-title>
      Ionic PDFs
    </ion-title>
  </ion-toolbar>
</ion-header>

<ion-content padding>
  <ion-button expand="full" (click)="openLocalPdf()">Open Local PDF</ion-button>
  <ion-button expand="full" (click)="downloadAndOpenPdf()">Download and open PDF</ion-button>
</ion-content>

ts file

import { Platform } from '@ionic/angular';
import { File } from '@ionic-native/File/ngx';
import { Component } from '@angular/core';
import { FileOpener } from '@ionic-native/file-opener/ngx';
import { DocumentViewer, DocumentViewerOptions } from '@ionic-native/document-viewer/ngx';
import { FileTransfer } from '@ionic-native/file-transfer/ngx';

@Component({
  selector: 'app-home',
  templateUrl: 'home.page.html',
  styleUrls: ['home.page.scss'],
})
export class HomePage {


  constructor(private platform: Platform, private file: File, private ft: FileTransfer,
              private fileOpener: FileOpener, private document: DocumentViewer) {

  }

  openLocalPdf() {
    let filePath = this.file.applicationDirectory + 'www/assets';

    if (this.platform.is('android')) {
      let fakeName = Date.now();
      this.file.copyFile(filePath, 'my.pdf', this.file.dataDirectory, `${fakeName}.pdf`).then(result => {
        this.fileOpener.open(result.nativeURL, 'application/pdf')
            .then(() => console.log('File is opened'))
            .catch(e => console.log('Error opening file', e));
      });
    } else {
      // Use Document viewer for iOS for a better UI
      const options: DocumentViewerOptions = {
        title: 'My PDF'
      }
      this.document.viewDocument(`${filePath}/my.pdf`, 'application/pdf', options);
    }
  }

  downloadAndOpenPdf() {
    let downloadUrl = 'https://devdactic.com/html/5-simple-hacks-LBT.pdf';
    let path = this.file.dataDirectory;
    const transfer = this.ft.create();

    transfer.download(downloadUrl, path + 'myfile.pdf').then(entry => {
      let url = entry.toURL();

      if (this.platform.is('ios')) {
        this.document.viewDocument(url, 'application/pdf', {});
      } else {
        this.fileOpener.open(url, 'application/pdf')
            .then(() => console.log('File is opened'))
            .catch(e => console.log('Error opening file', e));
      }
    });
  }
}

Any know what I’m doing wrong or can point me to a working example?

Posts: 1

Participants: 1

Read full topic


Upload images from PC on ionic PWA

$
0
0

@JEricaM wrote:

I’m developing a pwa where I have the feature that allow the user to upload an image on firebase from the pc.
I’ve searched on google and on this forum but I didn’t find any useful information.

Someone can tell me if this is possibile?

Thank you so much

Posts: 1

Participants: 1

Read full topic

ERROR with permissions in MACBOOK PRO and ionic 4

$
0
0

@dupan wrote:

21

MacBook has just been installed and with the remaining node and environment download and install.
Is it because it’s the MacOS Mojave (10.14.5)?
I’ve already removed IONIC but I have the same error when trying to remove CORDOVA

Posts: 2

Participants: 2

Read full topic

Ionic v4 and ngx-socket.io not working after biuild

Read pdf file inside app

$
0
0

@Marwakamal wrote:

I need help regarding preview a pdf file inside app from external link without using Google view or download file

Posts: 1

Participants: 1

Read full topic

Anyone having trouble in using sms-native plugin when submitting playstore?

$
0
0

@pdj wrote:

I’m having trouble in submitting app to playstore…

I’m using plguin as below…
result is to calling contacts and when I select a contact or multiple contacts, then it goes to sms write form

weird thing is that app didn’t ask me any permissoin but it’s working.

 var options = {
      replaceLineBreaks: false,
      android: {
        intent: 'INTENT' 
      }
  }

    if(this.Text=="") return;
    else {
      setTimeout(()=>{

        this.sms.send('', this.Text, options).then(()=>{

        }).catch((e)=>{
          window.alert("error"+e);
          console.log(e);
          this.sms.send('', this.Text, options).then(()=>{
    
          }).catch((e)=>{
            console.log(e);
            
          })
        })
      },500)
      console.log(this.platform2.is());
    
     }

is it right to check Default SMS handler when I submit app?

google rejected app for below reson

Based on our review, we found your app’s expressed user experience did not match your declared core functionality {Default SMS handler (and any other core functionality usage while default handler)}. Please remove these permissions from your app.

Default handler capability was listed on your declaration form, but your app does not appear to have default handler capability. Please submit a revised declaration form.

Posts: 1

Participants: 1

Read full topic

How run c file in ionic

$
0
0

@admins1 wrote:

i have installed cordova-plugin-cpp-bridge this plugin but not working
then how import this plugin module

Posts: 1

Participants: 1

Read full topic

Ionic Background geolocation

$
0
0

@Bikshu wrote:

Hi Team,
If I place my app in background for 30 minutes, ios app is being crashed after opening an app.
Am using Background geolocation cordova plugin for background location tracking.

is not possible to place an app for more than 1/2 hour in background for location tracking with this plugin?

Posts: 1

Participants: 1

Read full topic


Ionic4 ion-tab default selection

$
0
0

@OmDIonic wrote:

I am implementing ion-tabs.
One Parent Page and under it 5 tabs.
Every-time when I come on parent page I have to tap on first tab and then it get open.

I want that when I land on parent page then by default first tab should open.
How can I achieve that.

Code in ParentPage.html

<ion-content padding> 
                        <ion-tabs>

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

                                    <ion-tab-button tab="tab1">
                                        <ion-icon name="folder"></ion-icon>
                                    </ion-tab-button>
                                    <ion-tab-button tab="tab2">
                                        <ion-icon name="folder"></ion-icon>
                                    </ion-tab-button>
                                    <ion-tab-button tab="tab3">
                                        <ion-icon name="folder"></ion-icon>
                                    </ion-tab-button>
                                    <ion-tab-button tab="tab4">
                                        <ion-icon name="folder"></ion-icon>
                                    </ion-tab-button>
                                    <ion-tab-button tab="tab5">
                                        <ion-icon name="folder"></ion-icon>
                                    </ion-tab-button>

                                </ion-tab-bar>

                            </ion-tabs>
         </ion-content>

ParentPage.Module.ts

const routes: Routes = [
    {
      path: 'tabs/:id',
      component: ParentPage,
      children:
        [
          {
            path: 'tab1',
            children:
              [
                {
                  path: '',
                  component: Tab1Component
                }
              ]
          },
          {
            path: 'tab2',
            children:
              [
                {
                    path: '',
                    component: Tab2Component                  
                }
              ]
          },
          {
            path: 'tab3',
            children:
              [
                {
                    path: '',
                    component: Tab3Component
                  
                }
              ]
          },
          {
            path: 'tab4',
            children:
              [
                {
                    path: '',
                    component: Tab4Component
                  
                }
              ]
          },
          {
            path: 'tab5',
            children:
              [
                {
                    path: '',
                    component: Tab5Component
                  
                }
              ]
          },
          {
            path: '',
            redirectTo: '/tabs/tab1',
            pathMatch: 'full'
          }
        ]
    },
    {
      path: '',
      redirectTo: '/tabs/tab1',
      pathMatch: 'full'
    }
  ];

Where I am doing mistake.

Thanks

Posts: 1

Participants: 1

Read full topic

Unable to use Ionic Studio

$
0
0

@mikealavi wrote:

Trying to Open an existing project or create a new project in Ionic Studio and getting this error:
Error: self signed certificate in certificate chain

at TLSSocket.onConnectSecure (_tls_wrap.js:1051:34)
at TLSSocket.emit (events.js:189:13)
at TLSSocket._finishInit (_tls_wrap.js:633:8)

I can use the Ionic CLI without any problem (used this command: set NODE_TLS_REJECT_UNAUTHORIZED=0). ut not sure how to set NODE_TLS_REJECT_UNAUTHORIZED value in Studio.

Thanks,
Mike

Posts: 1

Participants: 1

Read full topic

Get array of data from native storage

$
0
0

@robertnic wrote:

I have array of data saved in my native-storage but when i try to retrieve them i get this error:

1102

Code

<ion-row *ngIf="items">
    <ion-col size="12" *ngFor="let post of items | slice:0:limit | async">
      <ion-card class="welcome-card">
        <ion-card-header>
          <ion-card-subtitle>{{post.created_at | date : "d.M.y"}} - by {{post.user}}</ion-card-subtitle>
          <ion-card-title [routerLink]="['/', 'posts', post.url]">
            {{post.title}}
          </ion-card-title>
  
        </ion-card-header>
      </ion-card>
    </ion-col>
  
  </ion-row>
export class OfflinePage implements OnInit {
  items: any[] = [];

  constructor(
    private storage: NativeStorage
  ) { }

  ngOnInit() {
    this.getFavorites();
  }

  getFavorites() {
    return this.storage.getItem('item').then(
      data => {
        console.log(data);
        this.items.push(data)
        if (this.items != null) {
          this.items = data;
        } else {
          this.items.push('You havn\'t add any article to offline mode.');
        }
      },
      error => {
        this.items = error;
      }
    );
  }
}

Any idea?

Posts: 1

Participants: 1

Read full topic

Partner needed

$
0
0

@faizalcaba wrote:

Hi, i need a ionic development partner, to help develop fast and of course split 50% / 50% revenue.
The idea is to share the resources everyone have and see how can we can help each other.

I am a old developer, but i started using ionic this year.

Have one app on google play: https://play.google.com/store/apps/details?id=com.alep.hora_da_pesca (ionic v3)
Now i am developing ionic v4 apps.

My skype: faizal_caba

And if u can speak portuguese is a bonus.

Thanks

Posts: 1

Participants: 1

Read full topic

Ionic-v3 native sqlite selfTest fails windows

$
0
0

@groupclaes wrote:

Hello, I’m creating a shopping application and for storing all our product, prices data, etc we use sqllite. We’ve been working on this app for 4months, our app is working perfectly on iOS and Android, windows, however, is just hopeless I’ve been trying to get our app to work in windows, most of it works untill we need data from our database, it just won’t do anything.

I’ve tried a blank new app and there it seems to work even on windows, I tried upgrading our ionic 3 app to ionic 4 maybe that would help since it would be a fresh start, after changing a lot of code to get it to work in ionic 4 I managed to get it fully working again … on iOS (didn’t test android) but again nothing on windows this time tho I get nothing more than a blank screen.

So back to ionic 3,

get isCordova(): boolean {
    return this.platform.is('cordova');
  }

  get isPlatform(): string {
    return this.platform.navigatorPlatform();
  }

return true and Win32 so that’s ok.

this.sqllite.selfTest().then(r => {
      this.selfTest = true;
    });

    this.sqllite.echoTest().then(r => {
      this.echoTest = true;
    });

this.selfTest is false this.echoTest is true :thinking: well gotcha, for some weird reason the selfTest wont work.
I tried removing the windows platform, adding it again, removing all plugins and installing them again but nothing works.

Posts: 1

Participants: 1

Read full topic

Viewing all 70435 articles
Browse latest View live


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