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

When starting app (first time) while device is offline black screen shows

$
0
0

I am building an app (Ionic 5 capacitor) that needs to have offline capabilities.
At the moment with an archived ipa, when I start it for the first time (or after a force quit) when the device is offline (iphone), the app starts up but shows a black screen, similar to the black screen you see when you are debugging on a device and the app starts up (but then you see the ip-address and url it tries to connect to)

I do not understand why this happens and would be grateful to get some insight into why this is happening

1 post - 1 participant

Read full topic


How to exclude weekends in Ion-DateTime component

$
0
0

Hello everyone, I need to exclude weekends from my dateTime. How can I do this?
Thanks a lot to everyone

1 post - 1 participant

Read full topic

Best Open Source Chat and DB to Use?

$
0
0

Hello amazing web devs of the Internet world! I have a client who needs to build a fairly robust chat app within an Ionic framework. I see there are several good open source templates on the frontend side of things to make a chat app look like Whatsapp or something similar, however the backend code and how to do that the best way seems to be lacking from my perspective.

Could someone shed some light on what is the best database to choose for a chat section within an Ionic app - ie: Firebase real time messaging? or does it matter that much if we use Laravel PHP and MySQL very much. is one better suited for Ionic? Thoughts? @mhartington would love your thoughts specifically if you have time.

Also, are there open source Github repos that others have used for their Chat backend, and do you recommend them for others in the Ionic community to think about using? Any recommendations here?

This looks like a chat good repo I found called Chat 21 - GitHub - chat21/chat21-ionic: A ionic v5 and Angular 8 desktop and mobile chat - does anyone have experience with Chat 21 for Ionic?

Thank you for reading and would love your advice!

Sincerely, Jonathon Lunardi

1 post - 1 participant

Read full topic

Change the base font size in Ionic

$
0
0

Rather than target specific components, how can I set the base font size for my whole app?

Is there something like an --ion-base-font-size variable?

1 post - 1 participant

Read full topic

Localize iOS GeoLocation Permission Message when using Geolocation Capacitor Plugin

$
0
0

I am trying to get our iOS app to display the NSLocationWhenInUseUsageDescription permission message in Spanish when the phone’s language is set to Spanish. I have created infoPlist.string files for English and Spanish but the app always presents the message in English, even though the title and buttons are in Spanish.

What is the secret to getting an Ionic app using a Capacitor plugin to display the permission message in the local language?

Screen Shot 2022-03-23 at 10.35.16 AM

1 post - 1 participant

Read full topic

Error going to previous page in Ionic with Angular (Android)

$
0
0

I have an application developed with Ionic + Capacitor + Angular. Everything works correctly until I install a cordova plugin (for example cordova-plugin-fingerprint-aio), from here, when I compile for android, when trying to go back, the pages do not load correctly and are displayed one below the other. This error only occurs when I install a cordova plugin, if I uninstall the plugin everything returns to normal. The error occurs on the android platform, on the web it works correctly.

Ionic:

   Ionic CLI                     : 6.19.0 (C:\Users\USUARIO\AppData\Roaming\npm\node_modules\@ionic\cli)
   Ionic Framework               : @ionic/angular 6.0.12
   @angular-devkit/build-angular : 13.3.0
   @angular-devkit/schematics    : 13.3.0
   @angular/cli                  : 13.3.0
   @ionic/angular-toolkit        : 6.1.0

Capacitor:

   Capacitor CLI      : 3.4.3
   @capacitor/android : 3.4.3
   @capacitor/core    : 3.4.3
   @capacitor/ios     : not installed

Utility:

   cordova-res : 0.15.4
   native-run  : 1.5.0

System:

   NodeJS : v12.22.10 (C:\Program Files\nodejs\node.exe)
   npm    : 8.5.5
   OS     : Windows 10

In the following image I navigated from page one to four and then when I go back one page is not replaced by another but they are shown below.

Any help you can give me will be greatly appreciated.

1 post - 1 participant

Read full topic

Modal + image = lag

$
0
0

Hi,

I am using a modal container with 4 images inside. When I open the modal, the modal slide correctly but the images are displayed only after the modal is 100% opened. The text are displayed during the slide, the image only at end.

I open the modal :

const modal = await this.modalController.create({
      component: StatusPage,
      componentProps: {
      }
    });
    return await modal.present();

In the modal the data (images + texts) are set before the modal is opened. I use them like this :

{{text }} ==> this text is immediately displayed
<ion-img style="height: 0.9em; width: 0.9em; display: inline-block; vertical-align: middle;" [src]="iconUrl" ></ion-img>. => this image is displayed only after the modal is 100% opened.

Do you know why I have this problem ?

1 post - 1 participant

Read full topic

Disable navigation url for capacitor plugin

$
0
0

we are using ionic-appauth using capacitor plugin. we want to disable navigation bar url for that. Is it possible to do so ?

1 post - 1 participant

Read full topic


Superfluous "app" layer in routes of Conference App

$
0
0

I’ve been playing around with the conference app to get my head around combining tabs and the side menu and I have a question about the routing.

The four main tabs (schedule, speakers, map, & about) are all under the “tabs” level of the URL hierarchy, but they are also under an “app” level. Does this level serve a purpose?

Could all the routing be adjusted from ‘/app/tabs/schedule’ to ‘/tabs/schedule’?

I’ve been playing around with it here, but would like to know if I’m missing anything.

1 post - 1 participant

Read full topic

Ionic 6 is using the var() CSS function which is not supported on my Android 8 device

$
0
0

I am using ion-list-header. It has the following style:

padding-inline-start: calc(var(–ion-safe-area-left, 0) + 16px);

But it is not supported on my Android 8 device’s WebView. Is there any workaround for this?

Thanks.

Screen Shot 2022-03-23 at 8.16.33 PM

1 post - 1 participant

Read full topic

ION-RANGE: Only change value when using the knob, disable range-bar click (touchend) event

$
0
0

Hi,
I want to disable the click / touched event when clicking / tapping on the range-bar from the ion-range component. Only the knob should change the value.

For ideas I would be very grateful, THX

1 post - 1 participant

Read full topic

How to Host Ionic PWA in the subfolder of Github Pages

Looking for ionic developer - Czech preferred

$
0
0

Hello,
we are looking for new member to join our team. We prefer you to be from Czech Republic as we need communication with client in Czech.
You:

  • 2+ years of professional experience (A technical assessment will be required)
  • Senior-level experience building mobile apps with Ionic + Capacitor
  • Ability to create clean, modern, testable, well-documented code
  • Strong familiarity with iOS and Android applications
  • Experience deploying apps to AppStore Connect and Google Play platforms, via Ionic AppFlow
  • Professional, empathic, team player
  • Problem solver, proactive, go getter

We:

  • 100% remote company
  • competitive compensation
  • team of friendly and proficient developers
  • working on cutting edge projects

Looking forward to have you as another great member of the team!

Email: jobs@trueapps.cz

Tomas

1 post - 1 participant

Read full topic

Ionic Capacitor Error occurs sporadically in app with polyfills

$
0
0

I am using Ionic 5 with Capacitor 2.4. Sometimes there are errors at runtime like this when running on android or apple devices:

"@capacitor://localhost/3.008c706ad59f318aa3fd.js:1:3212\n__tryOrUnsub@capacitor://localhost/main.c68298d83b828b6fc082.js:1:286188\nnext@capacitor://localhost/main.c68298d83b828b6fc082.js:1:285417\n_next@capacitor://localhost/main.c68298d83b828b6fc082.js:1:284580\nnext@capacitor://localhost/main.c68298d83b828b6fc082.js:1:284355\n_next@capacitor://localhost/main.c68298d83b828b6fc082.js:1:1180252\nnext@capacitor://localhost/main.c68298d83b828b6fc082.js:1:284355\n_next@capacitor://localhost/main.c68298d83b828b6fc082.js:1:1180252\nnext@capacitor://localhost/main.c68298d83b828b6fc082.js:1:284355\ndispatch@capacitor://localhost/main.c68298d83b828b6fc082.js:1:1266164\n@capacitor://localhost/main.c68298d83b828b6fc082.js:1:1311804\nonInvoke@capacitor://localhost/main.c68298d83b828b6fc082.js:1:1088017\nrunGuarded@capacitor://localhost/polyfills.4ea97ed0da6445bc9427.js:1:2235\n@capacitor://localhost/main.c68298d83b828b6fc082.js:1:1311791\n_execute@capacitor://localhost/main.c68298d83b828b6fc082.js:1:44143\nexecute@capacitor://localhost/main.c68298d83b828b6fc082.js:1:43992\nflush@capacitor://localhost/main.c68298d83b828b6fc082.js:1:707896\nflush@[native code]\nrunTask@capacitor://localhost/polyfills.4ea97ed0da6445bc9427.js:1:2731\ninvokeTask@capacitor://localhost/polyfills.4ea97ed0da6445bc9427.js:1:8369\n@capacitor://localhost/polyfills.4ea97ed0da6445bc9427.js:1:32140"

I do not have any ideas why or when this happens. It is not reproducible and occurs sporadically with some users of my app.

Any ideas?

Thanks, Maik.

1 post - 1 participant

Read full topic

Willing to pay: err_connection_refused android

$
0
0

I am using the cordova in-app-browser plugin to oauth into salesforce. This used to work fine for both android and iOS but it seems to be broken now that I have updated capacitor and android to API 31 I am getting a variety of errors depending on my configuration. The original error was net::ERR_CLEARTEXT_NOT_PERMITTED

Which was solved by adding cleartext: true to my capacitor.config.ts file. But now I am getting ERR_CONNECTION_REFUSED.

Here is my capacitor.config.ts:

import { CapacitorConfig } from '@capacitor/cli';

const config: CapacitorConfig = {
  appId: 'org.myapp.app',
  appName: 'MyApp',
  webDir: 'www',
  bundledWebRuntime: false,
  server: {
    // url: 'http://localhost',
    cleartext: true,
    hostname: '127.0.0.1'
  }
};

export default config;

Here is my ionic info:

Ionic:

   Ionic CLI                     : 6.19.0 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 6.0.9
   @angular-devkit/build-angular : 13.0.4
   @angular-devkit/schematics    : 13.0.4
   @angular/cli                  : 13.0.4
   @ionic/angular-toolkit        : 5.0.3

Capacitor:

   Capacitor CLI      : 3.4.1
   @capacitor/android : 3.4.3
   @capacitor/core    : 3.4.1
   @capacitor/ios     : 3.4.1

Utility:

   cordova-res : 0.15.4
   native-run  : 1.5.0

System:

   NodeJS : v16.13.2 (/usr/local/bin/node)
   npm    : 8.1.2
   OS     : macOS Monterey

And finally the code that creates the browser:

const clientId = this.myDataService.getAppId();
    const redirectUri = 'http://localhost/callback';
    const loginUrl  = 'https://mysforg.force.com/services/oauth2/authorize?display=touch' +
          '&response_type=token&client_id=' + clientId +
          '&redirect_uri=' + redirectUri;
    console.log('### loading login url: ' + loginUrl);
    const options = 'location=no,toolbarposition=top,enableViewportScale=yes,closebuttoncaption=Cancel,' +
      'clearsessioncache=yes,clearcache=yes';
    console.log('### loginUrl: ' + loginUrl);
    const browser = this.iab.create(loginUrl, '_blank', options);

    console.log('### loaded');
    browser.on('loadstart').subscribe(
      (event) => {
        console.log('### got uri: ' + redirectUri);
        // if(event.url.substr(0, redirectUri.length) === redirectUri) {
        //   this.handleLoginEvent(event.url, browser);
        // }
      }, err => {
        console.log('### got an error: ', err);
      }
    );

1 post - 1 participant

Read full topic


Handle swipe gestures on top of each other

$
0
0

I have a modal component with this content inside. The main problem is that when I try to scroll the text inside the “description” div the gesture on the modal gets activated and the modal goes up and down on the screen. Is there a way to isolate these two scroll gestures. ?

<ion-content scrollY="false">
  <ion-card-header>
    <ion-card-subtitle>Subtitle</ion-card-subtitle>
    <ion-card-title>Title</ion-card-title>
  </ion-card-header>

  <ion-card-content>
    <ion-segment style="margin-bottom: 0.5em;" [(ngModel)]="segment" (ionChange)="segmentChanged($event)">
      <ion-segment-button value="description">
        <ion-label>Descrizione</ion-label>
      </ion-segment-button>
      <ion-segment-button value="info">
        <ion-label>Info</ion-label>
      </ion-segment-button>
    </ion-segment>
<div [ngSwitch]="segment">
    <div style="border: solid 2px red; overflow: scroll;" scrollY="true" *ngSwitchCase="'description'">
      text ....
    </div>

    <ion-list *ngSwitchCase="'info'">
        <ion-item>
          <ion-text>www.example.com</ion-text>
        </ion-item>
    </ion-list>
  </div>
</ion-card-content>
</ion-content>

1 post - 1 participant

Read full topic

Alert e Toast não funcionam (Ionic V6 Angular)

$
0
0

Estou tentando utilizar o Alert e o Toast. mas, Quando chamo eles na aplicação, não aparece nada na tela. mas, também não gera nenhum erro.

Print do código:

1 post - 1 participant

Read full topic

Download and view file on android

$
0
0

Hi there !

I would like to know what is the best solution to download and view files (pdf / png / jpg) through native system file viewer (on android device). All by using Ionic 6 and Capacitor 3.

I’ve tested a lot of things but nothing seems really stable… There is always an issue from ionic, capacitor, android build or deprecation error when running on device :confused:

Thank you all :wink:

1 post - 1 participant

Read full topic

Writing a capacitor PluginMethod for Android annotated with returnType=PluginMethod.RETURN_NONE

$
0
0

The documentation for writing Capacitor plugins mentions that for Android, if your plugin method does not return any data, then you can annotate your plugin method with “returnType=PluginMethod.RETURN_NONE”. Capacitor documentation link to this scenario is here: Capacitor - build cross platform apps with the web

To summarize, the Java code in Android to define the method looks like this:

@PluginMethod(returnType = PluginMethod.RETURN_NONE)
public void method1(PluginCall call) {
android.util.Log.i(“method1”,“Inside method1 java code”);
return;
}

And back in TypeScript/JavaScript land, the code to define this same method looks like this:

export interface MyPlugin {
method1(): Promise<void>;
}

So based on the capacitor documentation, for a capacitor plugin method which does not return any data, that method returns a Promise which you should be able to “await” in TypeScript/JavaScript.

The problem is that the promise/await doesn’t work for the above sample code. For example, the following TypeScript/JavaScript code does not work as expected:

async myfunction() {
console.log(“About to call plugin method1”)
await MyPlugin.method1()
console.log(“Finished call to plugin method1”)
}

Given the above Android Java code and the above TypeScript/JavaScript, you would expected the log output to be:

About to call plugin method1
Inside method1 java code
Finished call to plugin method1

However, this is not what happens. Instead you get this:

About to call plugin method1
Finished call to plugin method1
Inside method1 java code

This indicates that the “await” in the TypeScript/JavaScript invocation of the plugin method is not really await-ing the completion of the promise returned by the plugin method. So it seems like this plugin method is not really returning a promise that can be await-ed.

You can solve the above problem by removing the “returnType=PluginMethod.RETURN_NONE” from the declaration of method1 in the Java code. If you remove that annotation and re-run the above example code, then the output is as expected:

About to call plugin method1
Inside method1 java code
Finished call to plugin method1

But this contradicts what the capacitor documentation says in the link at the beginning of my post here. The capacitor documentation claims that for PluginMethod.RETURN_NONE, you still get a JavaScript promise, which should be await-able.

So is the capacitor documentation incorrect, or is capacitor itself not working correctly for me?

1 post - 1 participant

Read full topic

[v6/React] Page reloads despite using `routerLink`

$
0
0

routerLink props are used for switching between pages in an Ionic v6 app (as with <IonBreadcrumb> and <IonCard> where it is supported).

But for some <IonCard>s the page still stubbornly reloads every time.
As the app state is preserved and correctly re-used the reload doesn’t crash the app but it introduces a noticeable delay which isn’t necessary.

What can be the reason for the full reload caused by a routerLink component?
There are no JavaScript errors logged before the page reload.

1 post - 1 participant

Read full topic

Viewing all 70612 articles
Browse latest View live


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