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

AlertController displaying on multiple pages despite being in a separate submodule

$
0
0

@mohammadzbggo wrote:

Hi,

I am using the AlertController in the app I’m building. This app is being migrated from v3 to v4 (using Angular) carefully with the hope of going to ionic 5 straight away after completion.

So I have a series of pages that are ionic 3, represented as separate modules in ionic 4:

Let’s say I am using the tab layout and I have a home page.

The home page has links to 5 pages.

  • page 1
  • page 2
  • page 3
  • page 4
  • page 5

Let’s say page 1’s uses the alert controller on NgInit because I need to show it when they migrate to the page.
After I dismiss the alert modal and navigate back to home and then onto page 2 the alert modal shown. I don’t have the AlertController available in any parent modules.

Am I am missing something?

Thanks

Posts: 1

Participants: 1

Read full topic


Ion-popover: component can not display ion-components as content

$
0
0

@Catweazle101 wrote:

Hi all

I’m using the Ionic popover component and it works so far:

  async presentFilterPopover(event: any) {
    const popover = await this.popoverCtrl.create({
      component: PopoverContentComponent,
      event,
      translucent: false
    });
    return await popover.present();
  }

But as long I use in the template of my PopoverContentComponent pure Html it works.
But when I use a Ionic component as content like:

<ion-list>
</ion-list>

I receive following error:

How can I use Ionic-components within the content of the popover?

Any idea?

Thx,
Oliver

Posts: 2

Participants: 1

Read full topic

AppFlow Updates Without Public Internet Access?

$
0
0

@RangerRick wrote:

I have an unusual use-case in that I make an app that’s used for a convention on a cruise ship every year, and we don’t have access to the public internet, but we can run our own server on the ship.

Is there a way to do AppFlow (or similar) in a way that works without having to hit the public internet for updates? Am I going to have to roll my own using manifests and embedding an iframe or something?

Posts: 1

Participants: 1

Read full topic

How to resolve BABEL error when installing geolocation in ionic app

$
0
0

@Sweg wrote:

I’m trying to install geolocation in my ionic app using these commands:

ionic cordova plugin add cordova-plugin-geolocation
npm install @ionic-native/geolocation

Then I try to run the app on my device (ionic cordova run android), but I’m getting this error message:

Can someone please tell me how to resolve this?

Posts: 2

Participants: 2

Read full topic

Click Event

$
0
0

@thaysg wrote:

Hi, sorry my english, but I’m in Ionic, I’m studying in college, and I have to create an app with a button with this message: ‘Insert your informations’, and after that must have a cancel and a send button, and when click in send, the information that you insert should have appear in a new page. But I’m trying to do that but not succes.

tab2.page.html```

<ion-header [translucent]=“true”>


Cadastro


<ion-content [fullscreen]=“true”>
<ion-button (click)=“showAlert()”
expand=“block”
shape=“round”
class=“my-action-button”>
Informe seus dados


tab2.page.ts

export class Tab2Page {

constructor(private alertCtrl: AlertController) {

}

async showAlert(){

let alert = await this.alertCtrl.create({
  header: 'Cadastro',
  inputs: [        
    {
      name: 'email',
      placeholder: 'Email'
      
    },
    {
      name: 'telefone',
      placeholder: 'Telefone',
      
    }
  ],
  buttons: [
    {
      text: 'Cancel',
      role: 'cancel',
      handler: data => {
        console.log('Cancel clicked');
      }
    },
    {
      text: 'Enviar',
      role: 'enviar',
      handler: data => {
        console.log('Enviar clicked');
        
      }
    }
  ]
});
alert.present();

}

}


[buttoninformation|690x387](upload://pYO3ulwBd5hwg8ZkZ9ifvO7gs5X.png) ![input|690x387](upload://AbiQJFZ4X5Y37PQoRM2wmFOUeH6.png)

Posts: 1

Participants: 1

Read full topic

Some device unable to view images from firebase

$
0
0

@soo wrote:

I have an app using firebase database, showing some external link images and text in the app.

This app has been published for three years, until recently I update new version then some went wrong.

Some of the users mobile can’t detect the image from the firebase database and shown the default image instead.(I use the image-loader plugin which can set default image)

My android and iphone is working fine, images shown correctly, so it is not the code problem.

I don’t know what’s wrong? Somebody helps!!

Thanks in advance.

Posts: 1

Participants: 1

Read full topic

Html video background not working for iOS

$
0
0

@Jinx wrote:

I’m trying to get a full screen video background for my Ionic app, it works perfectly fine on Android and the Browser, but when I run the app on an iPhone in Xcode simulator, it’s just a white background and the video doesn’t load.

Html:

 <div class="fullscreen-bg">
    <video autoplay loop muted playsinline webkit-playsinline>
      <source src="/assets/videos/background.mp4" type="video/mp4">
    </video>
 </div>

CSS:

.fullscreen-bg {
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  z-index: -100;
  height: 100vh;
}

I’ve also added this in the config.xml file

<preference name="AllowInlineMediaPlayback" value="true"/>

Posts: 1

Participants: 1

Read full topic

Could not find plugin "proposal-numeric-separator"

$
0
0

@rahulsharma841990 wrote:

Create a fresh project of ionic with angular framework and cordova. Project created server successfully but when I am creating the build for android or ios it’s showing me an error, even in fresh project.

An unhandled exception occurred: [BABEL] /Users/apple/Desktop/sgni/www/3-es2015.js: Could not find plugin "proposal-numeric-separator". Ensure there is an entry in ./available-plugins.js for it. (While processing: "/Users/apple/Desktop/sgni/node_modules/@babel/preset-env/lib/index.js")
See "/private/var/folders/gx/h8s_w4k104x884fbdw8fsjq80000gn/T/ng-qDOkA1/angular-errors.log" for further details.
[ERROR] An error occurred while running subprocess ng.

IONIC Version: 6.3.0
NPM: 6.14.1
Angular CLI: 9.0.4
OS: MAC
Node: v10.16.2
Cordova: 9.0.0

but its strange thing when I replaced node_modules from my old project it works perfectly and creating a build successfully.

Can anyone tell me, is there any way to solve this issue?

Posts: 1

Participants: 1

Read full topic


Javascript starter example

$
0
0

@Castagnoli wrote:

Hi!
I’m very new here, sorry.
Is it possible to access all functionality about Ionic and Capacitor using Javascript instead or React or Angular? Can You suggest me a link to start?

Cheers!
SC

Posts: 2

Participants: 2

Read full topic

Content of indexedDB in human readable format

$
0
0

@LousyJohnny wrote:

Hi,

I have to retrieve and process data from the indexedDB of a running app on an Android device
I managed to extract it via adb :
adb exec-out run-as io.ionic.starter tar c app_webview/Default/IndexedDB/file__0.indexeddb.leveldb/ > extracted.tar

I got a bunch of .ldb files which seem to contain what I need, but they are compressed in an unknown format
How can I read those file ?

thanks !

Posts: 1

Participants: 1

Read full topic

Is Ionic React Like React Original Project?

Touchscreen desktops detected as mobile

$
0
0

@shepard wrote:

Anyone have advice for detecting touchscreen desktops?
Currently, using getPlatforms returns it as a mobile device.
Apparently this was not addressed with v5 as was suggested it might be earlier.

Posts: 1

Participants: 1

Read full topic

How to ensure one method is executed before executing another?

$
0
0

@Sweg wrote:

I am reading in my current location using Geolocation correctly, & now want to render a Leaflet map which centers around those co-ordinates.

The problem that I’m facing is that both getLoc() & initMap() are being called in ngAfterViewInit().
Even though I’m calling getLoc() first, it looks as my longitude & latitude variables aren’t being populated before the map is initiated.

Can someone please tell me how I can ensure my current location is read in before the map is initiated, so I can use those co-ordinates to center the map?

Here is ngAfterViewInit():

ngAfterViewInit(): void {
        this.getLoc();
        this.initMap();
    }

Here is getLoc():

getLoc() {
    this.geolocation.getCurrentPosition(
      {
        maximumAge: 1000, timeout: 5000,
        enableHighAccuracy: true
      }
    ).then((resp) => {
      this.lat = resp.coords.latitude
      this.lng = resp.coords.longitude
    }, er => {
      alert('Can not retrieve Location')
    }).catch((error) => {
      alert('Error getting location - ' + JSON.stringify(error))
    });
  }

And here is initMap():

private initMap(): void {
    console.log(this.lat + " : " + this.lng);
    this.map = L.map('map', {
      center: [this.lat, this.lng],
      zoom: 3
    });
    const tiles = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
      maxZoom: 19,
      attribution: '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
    });
    tiles.addTo(this.map);
  }

Posts: 1

Participants: 1

Read full topic

Ionic4 Unity3d integration

$
0
0

@GerardSimpson wrote:

Hi,

I am trying to integrate a unity3d project into an ionic4/react project.

I think I’m pretty close, I have a repo here: https://github.com/node-gs/UnityCapacitorIntegration

I can get to the point where I click a button to open the intent, but then I get this error, which I can’t figure out:
24091-24091/io.ionic.starter E/chromium: [ERROR:aw_browser_terminator.cc(125)] Renderer process (24173) crash detected (code -1).

I’ve looked at the unity example projects here:

I’ve tried lots of different variations of copying that project, but using ionic instead, but I can’t seem to get it to work.

Please could someone help me?

Posts: 1

Participants: 1

Read full topic

Ionic uses an older version of my home.page.ts file

$
0
0

@alexmehler wrote:

no matter how many times i save it , itll always use the old code which is already rewitten… ionic serve , ionic run , everywhere the same problem

Posts: 4

Participants: 2

Read full topic


Gradle complile sdk version

$
0
0

@boel21 wrote:

Hello!! ionic automatically compile the gradle version in 28. can i change to 29 just writing in the build.gradle

Posts: 1

Participants: 1

Read full topic

Ionic React Static web site?

$
0
0

@joself wrote:

Is it possible to export a project made with Ionic React to a static website?
I’m using my project in firebase, but I need to run it on my Apache server, and I didn’t understand this part in the documentation.

Posts: 1

Participants: 1

Read full topic

Crashlytics error when migrating to capacitor

$
0
0

@alokjkumar97 wrote:

I decided to have a go at migrating my app from Cordova to Capacitor. I don’t know an awful lot about capacitor or true native development and thought this would be a good opportunity to learn.

The app uses the firebasex plugin for access to cloud firestore and nothing more.

When migrating I keep facing this error and have scoured the web to find a solution without much luck:

Crashlytics could not find the manifest. Not found at C:\path\to\app\android\capacitor-cordova-android-plugins\build\intermediates\merged_manifests\debug\AndroidManifest.xml

I’m not actually using Crashlytics so if it’s possible to disable it that would be a satisfactory solution.

Ionic info below

Ionic:

   Ionic CLI                     : 5.4.16 (C:\Users\Alok\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 5.0.5
   @angular-devkit/build-angular : 0.900.7
   @angular-devkit/schematics    : 9.0.7
   @angular/cli                  : 9.0.7
   @ionic/angular-toolkit        : 2.2.0

Capacitor:

   Capacitor CLI   : 1.5.1
   @capacitor/core : 1.5.1

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.1.0
   Cordova Plugins   : cordova-plugin-ionic 5.4.6, cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 13 other plugins)

Utility:

   cordova-res : 0.9.0
   native-run  : 0.3.0

System:

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

cordova plugin list gives:

cordova-plugin-androidx 1.0.2 "cordova-plugin-androidx"
cordova-plugin-androidx-adapter 1.1.0 "cordova-plugin-androidx-adapter"
cordova-plugin-badge 0.8.8 "Badge"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-firebasex 7.0.1 "Google Firebase Plugin"
cordova-plugin-inappbrowser 3.2.0 "InAppBrowser"
cordova-plugin-ionic 5.4.6 "cordova-plugin-ionic"
cordova-plugin-ionic-keyboard 2.2.0 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.1.3 "cordova-plugin-ionic-webview"
cordova-plugin-local-notification 0.9.0-beta.3 "LocalNotification"
cordova-plugin-purchase 9.0.0 "Purchase"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-plugin-x-socialsharing 5.6.3 "SocialSharing"
cordova-sqlite-storage 4.0.0 "Cordova sqlite storage plugin - cordova-sqlite-storage plugin version"
es6-promise-plugin 4.2.2 "Promise"

Thanks in advance

Posts: 1

Participants: 1

Read full topic

Implementing side menu routing and tabs routing on the crossplatform app

$
0
0

@sinergyamx wrote:

Hi there, I’m trying to create a cross-platform application and I have created a Desktop view with a working side menu with several pages and I want to implement some tabs so the navigation on the desktop view can work with an implementation of ion-tabs that I created as a component

I’m wondering is someone can. put me in the right direction

Here is my app-routing.module.ts

import { NgModule } from '@angular/core';
import { PreloadAllModules, RouterModule, Routes } from '@angular/router';


const routes: Routes = [
  {
    path: '',
    redirectTo: 'home',
    pathMatch: 'full'
  },
  {
    path: 'home',
    loadChildren: () => import('./pages/home/home.module').then( m => m.HomePageModule)
  },
  {
    path: 'login',
    loadChildren: () => import('./pages/login/login.module').then( m => m.LoginPageModule)
  },
  {
    path: 'register',
    loadChildren: () => import('./pages/register/register.module').then( m => m.RegisterPageModule)
  },
  {
    path: 'profile',
    loadChildren: () => import('./pages/profile/profile.module').then( m => m.ProfilePageModule)
  },
  {
    path: 'pagos',
    loadChildren: () => import('./pages/pagos/pagos.module').then( m => m.PagosPageModule)
  },
  {
    path: 'trabajos',
    loadChildren: () => import('./pages/trabajos/trabajos.module').then( m => m.TrabajosPageModule)
  },
  {
    path: 'anuncios',
    loadChildren: () => import('./pages/anuncios/anuncios.module').then( m => m.AnunciosPageModule)
  },
  {
    path: 'galeria',
    loadChildren: () => import('./pages/galeria/galeria.module').then( m => m.GaleriaPageModule)
  },



];

@NgModule({
  imports: [
    RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
  ],
  exports: [RouterModule]
})
export class AppRoutingModule {}

Here my navtabs.component.html

<div class="tabs">
  <ion-tabs slot="bottom">
    <ion-tab-bar slot="bottom">

      <ion-tab-button tab="anuncios">
        <ion-icon name="notifications"></ion-icon>
        <ion-label>Anuncios</ion-label>
        <ion-badge>6</ion-badge>
      </ion-tab-button>
      <ion-tab-button tab="liturgias">
        <ion-icon name="albums"></ion-icon>
        <ion-label>Liturgias</ion-label>
      </ion-tab-button>
  
      <ion-tab-button tab="trabajos">
        <ion-icon name="briefcase"></ion-icon>
        <ion-label>Mis Trabajos</ion-label>
      </ion-tab-button>
  
      <ion-tab-button tab="galeria">
        <ion-icon name="images"></ion-icon>
        <ion-label>Galeria
        </ion-label>
      </ion-tab-button>
    </ion-tab-bar>
  </ion-tabs>
</div>


Any help is most appreciated.

Posts: 1

Participants: 1

Read full topic

Cannot showing my source page

$
0
0

@raisadr wrote:

Hi, I am having a problem showing my source page.
This is my tabs-routing.module.ts



and this is my sources.page.html

this is my source.page.html

and this is my sources page

if I want to click one of the news, for example, the ABC news, it should go to the source page, but it does not show anything, and I do not know what the error.
this is my source page after I click the abc news

Posts: 1

Participants: 1

Read full topic

Viewing all 70432 articles
Browse latest View live