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

Inconsistent Access to WebView Contexts in Android App

$
0
0

I’m in the process of automating various test cases using C# (net6.0), and Appium (v5.0.0). I’ve run into some issues with this that has me investigating how the Capacitor app configures the WebView.

When I start an Appium session for our Android build (using the UiAutomator2 driver if it matters) I find that the availble CONTEXTS are extremely inconistant. Some times, there will be both WEBVIEW_com.app.package and WEBVIEW_chrome in addition to the NATIVE_APP context. However, other times there will only be NATIVE_APP.

In my research, I found that Appium will sometimes have issues with context switching when fields “url” & “title” are empty for the WebView target. Natively in Android, you can set these fields fairly easily in a WebView. How are these fields set for a WebView in a Capacitor app?

We are using:

  • Node Version: 14.19.1
  • NPM: 6.14.16
  • @ionic/react: ^6.0.9
    And our capacitor.config.json file contains the following for android:
    "android":{
        "useLegacyBridge": true,
        "appendUserAgent": "android:application",
        "webContentsDebuggingEnabled": true
    },

1 post - 1 participant

Read full topic


How to modify requiresExclusiveTouchType?

$
0
0

I am creating a Notes taking app using Ionic Framework. It is working well and we want to improve hand writing experience.

We are using stylus. Palm rejection works well but not quite to other people that holds a pen differently. Other people lay their hand on the screen, while other people just barely touching the screen while writing. In this case, palm rejection fails to work, and it is recognizing the event as touch as the radius (I guess) is not big enough to be recognize as palm.

So, my solution is to just handle the events in javascript, instead of relying on the device palm rejection feature. The problem is, touch events stylus does not emit when there is an ongoing finger/direct touch event.

Finger (fires one event)
Finger + finger :white_check_mark: (fires two events)
Finger + stylus :x: (fires only finger event)
Stylus + finger :x: (fires only stylus event)

Related topics that I have search unto:

1 post - 1 participant

Read full topic

Determine which storages (SD-Card) are available

$
0
0

Hi,

I’m doing a eBook-Reader and want to give the user full possibillity where his eBooks are located.

tmplist.push({folder: {directory: Directory.Documents, path: ‘’}, label: ‘Internal Storage’});
tmplist.push({folder: {directory: Directory.External, path: ‘’}, label: ‘External’});
tmplist.push({folder: {directory: Directory.ExternalStorage, path: ‘’}, label: ‘SD-Card’});

Of course on an iPad those 3 Directories point to the same folder and on Android there might be SD-Card or not.

=> how to determine which are available? (and are different to each other)

Thank you very much!
grz, Clemens

1 post - 1 participant

Read full topic

Ionic/Capacitor/Nuxt pdf file downloaded from url and saved in local storage by Capacitor Filesystem api not working

$
0
0

In my Ionic/Capacitor/Nuxt project, I am trying to download a pdf file from url and save it to phone local storage using Capacitor Filesystem/blob-writer api. On both the packages I am able to download the file but the file was not opened by the pdf reader. On further investigation I have noticed while opening the pdf file from the Android emulator local storage was blank white, but have exact number of pages to that of the original pdf file.

But, while running it on the browser everything was working fine.

This are the codes and approaches below that I have tried for Capacitor Filesystem.

 const response = await fetch(pdfUrl);
    const data = await response.blob(); // Convert to blob


    const arrayBuffer = await new Promise((resolve, reject) => {
        const reader = new FileReader();
        reader.onloadend = () => resolve(reader.result);
        reader.onerror = (err) => reject(err);
        reader.readAsArrayBuffer(data);
    });


    const base64 = arrayBufferToBase64(arrayBuffer);
    const result = await Filesystem.writeFile({
        path: pdfName,
        data: base64,
        directory: Directory.Documents, // or another directory
        recursive: true
    });

// arrayBufferToBase64 function

function arrayBufferToBase64(buffer) {
let binary = '';
const bytes = new Uint8Array(buffer);
const len = bytes.byteLength;
for (let i = 0; i < len; i++) {
    binary += String.fromCharCode(bytes[i]);
}
 return window.btoa(binary);
}

Any suggestions/help will be highly appreciated.

1 post - 1 participant

Read full topic

Load user language at start

$
0
0

Hi,

I store the language of the user in capacitor preferences.

What is the best way to read it when restarting the app without loading 2 languages?
When the app starts, all texts are in the default language for a short time, and then switches to the user language.

I use ngx-translate

1 post - 1 participant

Read full topic

How to play youtube videos with capacitor-video-player

$
0
0

Hello! I am new in Ionic and I’m trying to implement a video player with capacitor-video-player but it’s not working. I need to play youtube videos in full-screen! if anyone can give me any advice i’d thank you so much! i’ve been working on this too many days already :pray:

I found this tutorial very usefull if somene need it. It works very well but not for youtube videos
tutorial

Thanks a lot!

2 posts - 2 participants

Read full topic

Chinese-bamboo.net

$
0
0

Chinese Bamboo

More than 20 years manufacturing & export worldwide
Bamboo BBQ Skewers
Bamboo Toothpick
Bamboo Wok Brush
Bamboo Sticks For Incese Making
Bamboo Garden Stakes

1 post - 1 participant

Read full topic

Why ionic trying to do taskkill which is not even exist

$
0
0

I am using ionic with angular and trying to build android apk by using ionic cordova build android --verbose but every time i run this it’s giving me ionic:utils-process onBeforeExit handler: error from function: Error: Command failed: taskkill /pid 19848 /T /F ERROR: The process "19848" not found. with a random pid every time

1 post - 1 participant

Read full topic


What is the Mhdflix application that so many people are interested in?

$
0
0

Recently I found this application Mhdflix Modilimitado to quite great as they have and ad-free version and are much cheaper than netflix so should i use them when it has more utilities than netflix

1 post - 1 participant

Read full topic

Pc sistemi kabloları

$
0
0

Alçak gerilim kablo sektörünün öncü markası 2M, kablo üreticisidir. 2M kablo ileri teknolojinin bütün imkanlarına sahip tam donanımlı üretim hatları, modern test ekipmanlarıyla donatılmış laboratuvarları, uzman kadrosu ve karbon ayak izlerini azaltmak konusunda çevreye karşı duyarlı ve sorumluluk sahibi duruşuyla çalışmaktan gurur duyduğumuz çözüm ortaklarımızdan biridir. Alçak gerilim kablolarını 2MKAB® markasıyla üretmekte olup, Ses ve Görüntü kablolarını LOOKAB® markası, yangına dayanıklı kabloları ise FireKab® markası adı altında toplamıştır.

**2M kablo bayileri

Koaksiyel Kablolar

: 50 Ohm, 75 Ohm empedanslı, bina içi CATV, CCTV, kablolu TV, UYDU, Telsiz ve Data iletişim sistemlerinde düşük zayıflama gerektiren yerlerde dağıtım kablosu olarak kullanılırlar. Bina içi, bina dışı, havai hat şebekeleri, yer altı tipleri, zırhlı tipleri ve askeri standartlara göre üretilen tipleri mevcuttur. İki ve üç kat ekranlı tipleri (Trishield) vardır. Ekranlama; dış elektriksel etkilere karşı koruma sağlar. HFFR malzeme ile üretilen tiplerde HFFR malzemeden dolayı yangın anında geç tutuşur ve büyük ölçüde kendiliğinden sönerler. Düşük duman yoğunluğuna sahip olup, zehirli ve aşındırıcı gaz çıkarmazlar.

1 post - 1 participant

Read full topic

Adjusting root element font size for Dynamic Font Scaling for iOS

$
0
0

Hello,

We have build an app using Ionic React (currently v7.5) which runs on iOS, Android and as web app in the browser.

We have followed Ionic’s Dynamic Font Scaling guide (Dynamic Font Scaling | Ionic Documentation) to enable dynamic font scaling for iOS and Android. We have changed all font-sizes and line-heights in our CSS files from px to rem using a conversion rate of 16px to 1rem. After that change, dynamic font scaling on iOS and Android devices works.

What we have noticed is that a conversion rate of 16px to 1rem is pretty common. The exception is iOS, which uses a conversion of 17px (default font size) to 1rem. This is also mentioned in Ionic’s Dynamic Font Scaling guide (last section). This causes layout issues in our app on iOS devices in certain places since our UX designer has designed everything in px units and some texts are included in other graphical components that have a certain height (in px).

The solution would be to change the default font size for iOS to 16px, so the same conversion rate is applied to all target platforms (iOS, Android, web).

We can set the default font size to 16px using the following code in our CSS file:

html {
font-size: 16px;
}

This will change the default font size to 16px on iOS. However, dynamic font sizing is not working after this change.

Question: is there a way to change the default font size to 16px for iOS while keeping the dynamic font sizing feature enabled?

Kind regards,

Ronald

1 post - 1 participant

Read full topic

Best-practice for layouting (IonItem vs IonGrid vs div ...)

$
0
0

Hello,

We have build an app using Ionic React (currently v7.5) that we deploy to iOS, Android and browser.

Our UX designer has designed components that have multiple elements (text, icon, image, etc.) aligned horizontally next to each other. For example:

  • A Card component that has an image on the left, text in the middle and an icon with text on the right.
  • An Explainer component that has a text to the left and a text to the right, divided by a vertical dash

Often these horizontally aligned elements have a specific width (e.g. 50%) or should be the element that fills up the remaining horizontal space. Ideally, this fits in flexbox layout.

Question: we are looking for the best-practice on what component to use for such layouting.

Some options:

Use of IonItem

  • Pro: it can be modified to have the appropriate dimensions.
  • Con: in terms of function, it should be used as a list item (while in this case it is used as structural element outside a list). Accessibility checks flag an IonItem that is not part of a list as a component with a role “listitem” that is not part of a list (critical/severe accessibility issue).

Use of divs (flexbox)

  • Pro: it can be easily configured to have the appropriate dimensions using flexbox.
  • Con: meaningless (non-functional) element that is being discouraged to use from accessibility point-of-view.

Use of IonGrid

  • Pro: it can be easily configured (IonGrid, IonRow, IonCol) to have the appropriate dimensions.
  • Pro: it seems to be in-line with accessibility rules in terms of appropriate roles
  • Question: we don’t know if it is intended for smaller (fine-grained) layouting of components on a page, or only for the main layout of an app? We also have a main grid using IonGrid in our app, so we have different “nested” grids if we use this approach.

Curious to hear about best-practices from other people on this forum.

Thanks,

Ronald

1 post - 1 participant

Read full topic

Ionic angular update from 6 to 7

$
0
0

Hi

I am in the process of updating my Ionic 6 project to 7. This is my current version. Do I need to install Angular 14?

And it seems I have global Ionic Installation; can this be localised? Has i have Ionic CLI and Ionic Framwork.

Ionic:

   Ionic CLI                     : 6.13.1 (C:\Users\advs\AppData\Roaming\npm\node_modules\@ionic\cli)
   Ionic Framework               : not installed
   @angular-devkit/build-angular : 12.2.17
   @angular-devkit/schematics    : 12.2.17
   @angular/cli                  : 12.2.17
   @ionic/angular-toolkit        : 6.1.0

Capacitor:

   Capacitor CLI   : 3.5.1
   @capacitor/core : 3.5.1

Cordova:

   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : none
   Cordova Plugins   : no whitelisted plugins (0 plugins total)

Utility:

   cordova-res : 0.15.4
   native-run  : 1.6.0

System:

   NodeJS : v14.15.1 (C:\Program Files\nodejs\node.exe)
   npm    : 6.14.8
   OS     : Windows 10

1 post - 1 participant

Read full topic

Help! on WebView-accessible native code import error on Ionic Angular

$
0
0

I’m trying to write a basic WebView-accessible native code to IOS by following this.
I created my Swift and Objective C files in Xcode. When I import the plugin, I get ‘Plugins’ is deprecated error.

The whole error:
‘Plugins’ is deprecated.ts(6385)

global.d.ts(5, 4): The declaration was marked as deprecated here.

(alias) const Plugins: PluginRegistry
import Plugins

@deprecated
Provided for backwards compatibility for Capacitor v2 plugins. Capacitor v3 plugins should import the plugin directly. This “Plugins” export is deprecated in v3, and will be removed in v4.

I see that plugin import has changed in cap 3 update here. I don’t have a package created, so I don’t know how to go forward. Sharing what I have so far.

TestPlugin.swift

import Capacitor

@objc(TestPlugin)
public class TestPlugin: CAPPlugin {
      @objc func testCustomPlugin(_ call: CAPPluginCall) {
          let value = call.getString("value") ?? ""
          call.resolve(["value": value])
    }
}

TestPlugin.m

 #import <Foundation/Foundation.h>
  #import <Capacitor/Capacitor.h>

  CAP_PLUGIN(TestPlugin, "Echo",
      CAP_PLUGIN_METHOD(testCustomPlugin, CAPPluginReturnPromise);
)

home.page.ts in Ionic Angular app

import { Component } from '@angular/core';
import { Plugins } from '@capacitor/core';
const { TestPlugin } = Plugins;

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

    doNativeStuff() {
      TestPlugin.testCustomPlugin({ value: 'Hello World!' });
  }
}

1 post - 1 participant

Read full topic

Capacitor google map

$
0
0

Please describe the question in detail and share your code, configuration, and other relevant info.

I’m getting (randomly) a grey screen instead of the google map (see image). It works sometimes (same device, different day) so it is not the API key. The console doesn’t seem to show any errors. This is a web app, and have it tested on Windows Edge, Chrome Android, etc. and

Any help would be much appreciated

async createMap(){
    this.map = await GoogleMap.create({
      id : 'my-map',
      apiKey : "AIzaSyBheHnjfIcknJdwopZ_kz8h8FQ4BY4G4i0",
      config : {
        "center" : this.center,
        "zoom" : 18
      },
      element : this.mapRef.nativeElement,
      forceCreate : true
      
    })
    this.addMarker(this.center.lat, this.center.lng)
    console.log('map is ready')

  }

1 post - 1 participant

Read full topic


TypeError: Failed to fetch. CAPACITOR CORS

$
0
0

I am trying to make a fetch to google maps api

this is my httprequest controller

import { CapacitorHttp, HttpResponse, HttpHeaders } from '@capacitor/core';
import { Preferences } from '@capacitor/preferences';

export interface ApiRequest<T = any> {
  url: string;
  method: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
  data?: T;
  extraHeaders?: { [key: string]: string };
  params?: { [key: string]: string };
  responseType?: 'arraybuffer' | 'blob' | 'json' | 'text' | 'document';
  auth?: boolean;
}

export interface ApiResponse<T = any> {
  data: T;
  status: number;
  headers: HttpHeaders;
}

const request = async (call: ApiRequest): Promise<ApiResponse> => {
  try {
    
    const options : any = {
      url: call.url,
      method: call.method,
     
      params: call.params,
      headers: {
        'Content-Type': 'application/json',
        ...call.extraHeaders,
      },
    };


    
    const response: HttpResponse = await makeCapacitorHttpCall(options);
    console.log(response)
    return {
      data: response.data,
      status: response.status,
      headers: response.headers,
    };
} catch (error: any) {
  console.log(error)
    throw {
      data: error.response?.data,
      status: error.response?.status,
      headers: error.response?.headers,
    };
  }
};

const makeCapacitorHttpCall = async (options: any): Promise<HttpResponse> => {
  switch (options.method) {
    case 'GET':
      return await CapacitorHttp.get(options);
    case 'POST':
      return await CapacitorHttp.post(options);
    case 'PUT':
      return  await CapacitorHttp.put(options);
    case 'PATCH':
      return await CapacitorHttp.patch(options);
    case 'DELETE':
      return await CapacitorHttp.delete(options);
    default:
      throw new Error(`Unsupported HTTP method: ${options.method}`);
  }
};

export default request;

I am calling in this place

export const geoposicionar = async (lat: string, lng: string) => {
  try {

    const response = await request({
      url: 'https://maps.googleapis.com/maps/api/geocode/json',
      method: 'GET',
      // @ts-ignore
      params: {
        latlng: `${lat},${lng}`,
        key: 'MyKey'
      }
    })

    return response.data

  } catch (error) {
    
    console.error('Error al obtener información de la ubicación:', error);
  }
};

and when I make the fetch i get this error


if I use axios, work all well, but when i use capacitor i have this problem.

6 posts - 2 participants

Read full topic

Ionic 7 and Node Js

$
0
0

Hi All

What version of Node JS is recommended for Ionic 7? Could it be run on version less then 16?

2 posts - 2 participants

Read full topic

Ionic Angular build not building with correct styles to android

$
0
0

I have an Ionic V7.2.0 project using capacitor to build to android ionic capacitor build android.
Capcitor config:

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

const config: CapacitorConfig = {
  appId: 'sa.davinci',
  appName: 'S.A. DaVinci',
  webDir: 'www/browser'
};

export default config;

Now when i Build it its all okay no issue, only that once the application starts all core elements such as ion-button, ion-input, ion-list, ion-item, ion-header have lost their styling…

This means any ion-input doesn’t actually function for me, and same for the integrated ion-split for the menu capability it offers. They do all work on ionic serve, and if you run the android build using live reload (As this just loads the URL to your device).

Why when I build it for native use, the styles get messed up?
If any addiontal info is needed feel free to ask me! Not sure what to share.

Some version info:
Test Device: Android 13
Java Environment: Java 17
Gradle: Gradle 8.5
Android Studio: Hedhog
Ionic: 7.2.0
Build using Angular

Ionic config:

{
  "name": "sa-davinci",
  "integrations": {
    "capacitor": {},
    "cordova": {}
  },
  "type": "angular-standalone"
}

Capacitor result on build:

> ng.cmd run app:build

Initial Chunk Files   | Names                            |   Raw Size | Estimated Transfer Size
chunk-HE7GT4XE.js     | -                                |  381.39 kB |                89.97 kB
main-YDI54ZLN.js      | main                             |  196.24 kB |                31.65 kB
chunk-54F6FKE4.js     | -                                |   34.76 kB |                11.42 kB
polyfills-UBOHCPVH.js | polyfills                        |   33.13 kB |                10.79 kB
styles-TNGNYUTJ.css   | styles                           |   27.01 kB |                 4.33 kB
chunk-MXEONTSK.js     | -                                |   23.89 kB |                 8.29 kB
chunk-UPRIBWWW.js     | -                                |   10.99 kB |                 3.94 kB
chunk-467TPZ4A.js     | -                                |    9.97 kB |                 2.57 kB
chunk-QERUKDK6.js     | -                                |    9.93 kB |                 2.56 kB
chunk-5U2FUULQ.js     | -                                |    8.25 kB |                 3.04 kB
chunk-W7MPH5IC.js     | -                                |    6.30 kB |                 2.24 kB
chunk-Z4V4M3ZT.js     | -                                |    5.69 kB |                 2.09 kB
chunk-72ZMTLHO.js     | -                                |    3.98 kB |                 1.48 kB
chunk-WXXWTGDW.js     | -                                |    3.61 kB |                 1.28 kB
chunk-2EOHHFOF.js     | -                                |    3.27 kB |                 1.47 kB
chunk-WVZ2ABIN.js     | -                                |    3.09 kB |                 1.35 kB
chunk-QL7AOM23.js     | -                                |    2.72 kB |                 1.05 kB
chunk-RRNB6ECX.js     | -                                |    2.71 kB |                 1.01 kB
chunk-JXIEZMHN.js     | -                                |    2.47 kB |               735 bytes
chunk-4PGTP63H.js     | -                                |    1.66 kB |               710 bytes
chunk-RJ5GXQEX.js     | -                                |    1.50 kB |               680 bytes
chunk-QPVVTFFW.js     | -                                | 1022 bytes |              1022 bytes
chunk-SVHWGHER.js     | -                                |  979 bytes |               979 bytes
chunk-HC6MZPB3.js     | -                                |  962 bytes |               962 bytes
chunk-FGXSCDI4.js     | -                                |  946 bytes |               946 bytes
chunk-POU3PQSJ.js     | -                                |  876 bytes |               876 bytes
chunk-BAYK5CMB.js     | -                                |  796 bytes |               796 bytes
chunk-FQ65QLOX.js     | -                                |  762 bytes |               762 bytes
chunk-KGZGLNA4.js     | -                                |  686 bytes |               686 bytes
chunk-A73CKFRS.js     | -                                |  686 bytes |               686 bytes
chunk-CVNAKU4L.js     | -                                |  573 bytes |               573 bytes
chunk-J6ICYO4L.js     | -                                |  557 bytes |               557 bytes
chunk-G3CV3VGG.js     | -                                |  240 bytes |               240 bytes
chunk-MM5QLNJM.js     | -                                |  240 bytes |               240 bytes
chunk-4U6PRYVA.js     | -                                |  126 bytes |               126 bytes
chunk-MCRJI3T3.js     | -                                |   99 bytes |                99 bytes
chunk-LF5XB4YN.js     | -                                |   99 bytes |                99 bytes

                      | Initial Total                    |  781.99 kB |               192.03 kB

Lazy Chunk Files      | Names                            |   Raw Size | Estimated Transfer Size
chunk-2WNWRKHP.js     | core-js                          |   91.84 kB |                27.75 kB
chunk-YXYGNERJ.js     | ion-item_8-entry                 |   80.11 kB |                 8.51 kB
chunk-ISXZ46MT.js     | ion-datetime_3-entry             |   71.90 kB |                12.91 kB
chunk-FC5IJWRU.js     | ion-textarea-entry               |   56.17 kB |                 6.02 kB
chunk-N4YUXGRG.js     | ion-input-entry                  |   49.08 kB |                 6.00 kB
chunk-OZCBHLQP.js     | ion-select_3-entry               |   42.68 kB |                 6.96 kB
chunk-HK22U3UB.js     | ion-app_8-entry                  |   38.40 kB |                 8.12 kB
chunk-MWP3O3GJ.js     | ion-alert-entry                  |   35.79 kB |                 5.99 kB
chunk-TYQTF2CF.js     | ion-range-entry                  |   31.49 kB |                 5.58 kB
chunk-2OK25GTO.js     | ion-modal-entry                  |   26.63 kB |                 6.39 kB
chunk-E4LHUVK6.js     | ion-segment_2-entry              |   26.00 kB |                 4.58 kB
chunk-UZ2GJYMH.js     | ion-button_2-entry               |   25.57 kB |                 4.96 kB
chunk-7FYJH3T4.js     | ion-searchbar-entry              |   24.51 kB |                 3.83 kB
chunk-ENTJKBEQ.js     | ion-toggle-entry                 |   24.50 kB |                 3.79 kB
chunk-75SCQLPS.js     | ion-refresher_2-entry            |   24.10 kB |                 4.68 kB
chunk-6NFN5BFS.js     | ion-popover-entry                |   23.22 kB |                 5.50 kB
chunk-M6G5N6LU.js     | ion-menu_3-entry                 |   22.37 kB |                 4.50 kB
chunk-LT6OETHP.js     | ion-tab-bar_2-entry              |   21.72 kB |                 3.00 kB
chunk-PMZUCQYI.js     | ion-fab_3-entry                  |   21.25 kB |                 3.31 kB
chunk-DDSGZRKW.js     | ion-radio_2-entry                |   20.95 kB |                 3.63 kB
chunk-FWJRSYQW.js     | ion-action-sheet-entry           |   20.82 kB |                 3.62 kB
chunk-3CCBQ7LK.js     | ion-toast-entry                  |   20.11 kB |                 4.69 kB
chunk-EDDIIBVX.js     | ion-item-option_3-entry          |   19.07 kB |                 3.40 kB
chunk-SYBO6PC4.js     | ion-progress-bar-entry           |   18.45 kB |                 1.57 kB
chunk-BZZMFO3J.js     | ion-checkbox-entry               |   18.32 kB |                 2.85 kB
chunk-5X4HMWFG.js     | dom                              |   18.04 kB |                 4.98 kB
chunk-ZOKA7NAM.js     | ion-breadcrumb_2-entry           |   12.84 kB |                 2.45 kB
chunk-QCGJQKZZ.js     | -                                |   12.68 kB |                 3.96 kB
chunk-33ZEUQO2.js     | ion-accordion_2-entry            |   12.01 kB |                 2.76 kB
chunk-Z6KIWOAU.js     | ion-nav_2-entry                  |   11.75 kB |                 3.62 kB
chunk-ACH5OTP5.js     | ion-back-button-entry            |   11.08 kB |                 1.95 kB
chunk-FYJP5Z3W.js     | ion-picker-internal-entry        |   10.85 kB |                 2.08 kB
chunk-TVVNZ74L.js     | ion-route_4-entry                |   10.56 kB |                 3.52 kB
chunk-VAUNIME2.js     | ion-card_5-entry                 |   10.25 kB |                 1.83 kB
chunk-X5DMZIDR.js     | ion-loading-entry                |    8.76 kB |                 2.13 kB
chunk-24K3JWIW.js     | ion-col_3-entry                  |    8.51 kB |                 1.33 kB
chunk-7OSZC7LX.js     | ion-picker-column-internal-entry |    7.02 kB |                 1.93 kB
chunk-SBWFF7NH.js     | ion-chip-entry                   |    6.30 kB |               931 bytes
chunk-3AWOY4XV.js     | ion-datetime-button-entry        |    6.02 kB |                 1.73 kB
chunk-ICFSPPOM.js     | -                                |    5.77 kB |               978 bytes
chunk-PI5WIUNY.js     | ion-infinite-scroll_2-entry      |    5.70 kB |                 1.37 kB
chunk-X5YM42F3.js     | ion-spinner-entry                |    5.59 kB |                 1.24 kB
chunk-6E7R7FWS.js     | ion-reorder_2-entry              |    5.46 kB |                 1.89 kB
chunk-3BFTYKZO.js     | ion-split-pane-entry             |    5.43 kB |                 1.21 kB
chunk-3BHRJB3V.js     | input-shims-6539ce13             |    4.85 kB |                 1.87 kB
chunk-SOKS23L6.js     | input-shims                      |    4.83 kB |                 1.85 kB
chunk-MAVLLQCE.js     | shadow-css                       |    4.49 kB |                 1.95 kB
chunk-2HIF6ZEH.js     | card-page                        |    4.04 kB |                 1.54 kB
chunk-KLFJ66E2.js     | ion-tab_2-entry                  |    3.81 kB |                 1.25 kB
chunk-QDVJ7GDG.js     | events-page                      |    3.35 kB |                 1.30 kB
chunk-3GK33O5I.js     | tickets-page                     |    3.20 kB |                 1.24 kB
chunk-GHA7ODF2.js     | ion-avatar_3-entry               |    3.15 kB |               669 bytes
chunk-EBLPDTK3.js     | ion-ripple-effect-entry          |    3.03 kB |               908 bytes
chunk-HKMGSH73.js     | log-in-page                      |    2.99 kB |                 1.19 kB
chunk-KAIZISGW.js     | benefits-page                    |    2.71 kB |                 1.13 kB
chunk-IDKTFHDL.js     | logout-page                      |    1.94 kB |               829 bytes
chunk-JPULQNGN.js     | index-82eeb47f                   |    1.79 kB |               813 bytes
chunk-DLMGSKRN.js     | index9                           |    1.79 kB |               816 bytes
chunk-GONYFC5Q.js     | ion-img-entry                    |    1.70 kB |               669 bytes
chunk-YMBYCOQ3.js     | ion-backdrop-entry               |    1.50 kB |               513 bytes
chunk-I4SRGBFB.js     | -                                |    1.34 kB |               486 bytes
chunk-C6TWYN5N.js     | -                                |    1.32 kB |               421 bytes
chunk-F4M7WZNY.js     | -                                |    1.09 kB |               596 bytes
chunk-3WOICACO.js     | -                                |    1.02 kB |               480 bytes
chunk-JE3FXFC3.js     | -                                | 1022 bytes |              1022 bytes
chunk-CBD5FBXD.js     | focus-visible                    |  952 bytes |               952 bytes
chunk-O43IGWDR.js     | -                                |  949 bytes |               949 bytes
chunk-GJZKZXL4.js     | -                                |  908 bytes |               908 bytes
chunk-UL33PJRA.js     | -                                |  890 bytes |               890 bytes
chunk-N73HJHFS.js     | swipe-back-a6f386fc              |  713 bytes |               713 bytes
chunk-ALMM4EDS.js     | swipe-back                       |  685 bytes |               685 bytes
chunk-UVZK7GXH.js     | -                                |  655 bytes |               655 bytes
chunk-M6VOCRC6.js     | -                                |  640 bytes |               640 bytes
chunk-AM5QOFK7.js     | status-tap-129c01cf              |  567 bytes |               567 bytes
chunk-WA4ZFFPY.js     | status-tap                       |  567 bytes |               567 bytes
chunk-HU6UQ5WL.js     | -                                |  510 bytes |               510 bytes
chunk-G3ZNBEWN.js     | -                                |  505 bytes |               505 bytes
chunk-ASGNNUHY.js     | keyboard-52278bd7                |  432 bytes |               432 bytes
chunk-GOWQWRZR.js     | -                                |  413 bytes |               413 bytes
chunk-ZNTSHO7F.js     | keyboard2                        |  404 bytes |               404 bytes
chunk-HMA5E7UC.js     | ion-text-entry                   |  384 bytes |               384 bytes
chunk-KHZUN65W.js     | ios-transition-62fd50ab          |  254 bytes |               254 bytes
chunk-AUYZAENT.js     | md-transition-7e56966a           |  239 bytes |               239 bytes
chunk-CTHDILOP.js     | ios-transition                   |  226 bytes |               226 bytes
chunk-OZYUQAHZ.js     | md-transition                    |  211 bytes |               211 bytes
chunk-OMB27VJZ.js     | -                                |  205 bytes |               205 bytes
chunk-SXA2UH3I.js     | hardware-back-button-b2bc76db    |  201 bytes |               201 bytes
chunk-RLISJUFA.js     | hardware-back-button             |  201 bytes |               201 bytes
chunk-H6Q4N4JF.js     | -                                |  182 bytes |               182 bytes
chunk-KJEAW3G2.js     | index-2cf77112                   |  155 bytes |               155 bytes
chunk-7VSVCZ7D.js     | -                                |  126 bytes |               126 bytes
chunk-SCFSEHTE.js     | index3                           |  117 bytes |               117 bytes
chunk-WMEG6PAA.js     | -                                |  101 bytes |               101 bytes
chunk-PAOTEET3.js     | focus-visible-dd40d69f           |   95 bytes |                95 bytes

Application bundle generation complete. [4.450 seconds]
▲ [WARNING] The glob pattern import("./**/*.entry.js*") did not match any files [empty-glob]

    node_modules/@stencil/core/internal/client/index.js:3781:2:
      3781 │   `./${bundleId}.entry.js${BUILD.hotModuleReplacement && hmrVers...
           ╵   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


▲ [WARNING] 20 rules skipped due to selector errors:
  :host-context([dir=rtl]) .ion-float-start -> Unknown pseudo-class :host-context([object Object])
  .ion-float-start:dir(rtl) -> Unknown pseudo-class :dir
  :host-context([dir=rtl]) .ion-float-end -> Unknown pseudo-class :host-context([object Object])
  .ion-float-end:dir(rtl) -> Unknown pseudo-class :dir
  :host-context([dir=rtl]) .ion-float-sm-start -> Unknown pseudo-class :host-context([object Object])
  .ion-float-sm-start:dir(rtl) -> Unknown pseudo-class :dir
  :host-context([dir=rtl]) .ion-float-sm-end -> Unknown pseudo-class :host-context([object Object])
  .ion-float-sm-end:dir(rtl) -> Unknown pseudo-class :dir
  :host-context([dir=rtl]) .ion-float-md-start -> Unknown pseudo-class :host-context([object Object])
  .ion-float-md-start:dir(rtl) -> Unknown pseudo-class :dir
  :host-context([dir=rtl]) .ion-float-md-end -> Unknown pseudo-class :host-context([object Object])
  .ion-float-md-end:dir(rtl) -> Unknown pseudo-class :dir
  :host-context([dir=rtl]) .ion-float-lg-start -> Unknown pseudo-class :host-context([object Object])
  .ion-float-lg-start:dir(rtl) -> Unknown pseudo-class :dir
  :host-context([dir=rtl]) .ion-float-lg-end -> Unknown pseudo-class :host-context([object Object])
  .ion-float-lg-end:dir(rtl) -> Unknown pseudo-class :dir
  :host-context([dir=rtl]) .ion-float-xl-start -> Unknown pseudo-class :host-context([object Object])
  .ion-float-xl-start:dir(rtl) -> Unknown pseudo-class :dir
  :host-context([dir=rtl]) .ion-float-xl-end -> Unknown pseudo-class :host-context([object Object])
  .ion-float-xl-end:dir(rtl) -> Unknown pseudo-class :dir


> capacitor.cmd sync android
[capacitor] √ Copying web assets from browser to android\app\src\main\assets\public in 300.75ms
[capacitor] √ Creating capacitor.config.json in android\app\src\main\assets in 1.04ms
[capacitor] √ copy android in 337.40ms
[capacitor] √ Updating Android plugins in 5.05ms
[capacitor] [info] Found 6 Capacitor plugins for android:
[capacitor]        @capacitor/app@6.0.0-beta.1
[capacitor]        @capacitor/device@6.0.0-beta.1
[capacitor]        @capacitor/haptics@6.0.0-beta.1
[capacitor]        @capacitor/keyboard@6.0.0-beta.1
[capacitor]        @capacitor/splash-screen@6.0.0-beta.1
[capacitor]        @capacitor/status-bar@6.0.0-beta.1
[capacitor] √ update android in 87.90ms
[capacitor] [info] Sync finished in 0.428s

[INFO] Ready for use in your Native IDE!

       To continue, build your project using Android Studio!

> capacitor.cmd open android
[capacitor] [info] Opening Android project at: android.

1 post - 1 participant

Read full topic

Impossible to pass JSON parameters with back button

$
0
0

i can’t add JSON parameters to my back button with this code :

constructor(private navCtrl: NavController,private platform: Platform,private route: ActivatedRoute, public formBuilder: FormBuilder,private myStorage: StorageService,private router: Router, private userService: UserCrudService, private dataService: DataService, private authService: AuthService) {
this.formPresence= this.formBuilder.group({
presM: false,
presA: false,
typeAbsence: null // Ajout du nouveau contrôle de formulaire
});
console.log(this.formPresence.value);
// this.token=localStorage.getItem('token');
//let decoded = jwt_decode(this.token);
//console.log(decoded);
try {
  this.backButtonSubscription =this.platform.backButton.subscribeWithPriority(5, () => {
  console.log(this.parameters);
    const param=JSON.stringify(this.parameters);
    console.log(param);
    this.router.navigate(['/accueil', {param}])
  });
}
catch (error :any){
  console.log(error.toString());
}

and

import {Component, ElementRef, OnInit, ViewChild} from '@angular/core';
import {ActivatedRoute, Router} from "@angular/router";
import {ScreenOrientation} from "@ionic-native/screen-orientation/ngx";
import jwt_decode from "jwt-decode";
import {NavController, ToastController} from "@ionic/angular";
import {FormGroup} from "@angular/forms";
import {ExceptionCode} from "@capacitor/core";
import {DataService} from "../services/DataService/data.service.ts.service";
import {AutoUnsubscribe} from "../decorator/auto-unsuscribe.decorator";
import {AuthService} from "../services/AuthService/auth-service.service";

@AutoUnsubscribe()
@Component({
  selector: 'app-accueil',
  templateUrl: './accueil.page.html',
  styleUrls: ['./accueil.page.scss'],
})
export class AccueilPage implements OnInit {
  formPresence: FormGroup ;
  public  date: string;
  public username: string;
  private parameters: any ;
  private selectedDates :[];
  private maDate: Date ;
  private token: string ;
  private parametres: string;

  constructor(
    private navCtrl: NavController,
    private route: ActivatedRoute,
    private router: Router,
    private screenOrientation: ScreenOrientation,
    private toastController: ToastController,
    private dataService: DataService,
    private authService: AuthService // Retirez le point-virgule
  ) {
    this.token = localStorage.getItem('token');
  }

  ngOnInit() {

      console.log(this.authService.isLoggedIn());
      if (this.authService.isLoggedIn()) {
        this.token = localStorage.getItem('token');
        this.username = localStorage.getItem('username')
         try {
         console.log(this.route.snapshot.params.param);
        this.parameters =JSON.parse(this.route.snapshot.params.param);
        }catch (error :any){
              console.error(error.toString())
        }
        console.log(this.parameters);
         try{
        this.username = this.parameters.username;
        }
        catch(error :any){
        console.error(error)
        }
        try{
        this.selectedDates = this.parameters.selectedDates;
        }
        catch (error :any){
                      console.error(error.toString())
        }
        this.maDate = new Date();
        console.log(this.selectedDates);
      } else {
        this.router.navigate(['login']);
      }
  }

Expected Behavior

not to have undefined in my previous view

Steps to Reproduce

read others github

Code Reproduction URL

No response

Ionic Info

lastest version

package.json:

{
  "name": "FacilNdf",
  "version": "0.0.1",
  "author": "Ionic Framework",
  "homepage": "https://ionicframework.com/",
  "scripts": {
    "ng": "ng",
    "start": "ng serve",
    "build": "ng build",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular-devkit/build-angular": "^17.1.0",
    "@angular-devkit/core": "^17.1.0",
    "@angular-eslint/eslint-plugin": "^17.2.0",
    "@angular/animations": "^17.1.0",
    "@angular/cdk": "^17.1.0",
    "@angular/common": "^17.1.0",
    "@angular/core": "^17.1.0",
    "@angular/forms": "^17.1.0",
    "@angular/platform-browser": "^17.1.0",
    "@angular/platform-browser-dynamic": "^17.1.0",
    "@angular/router": "^17.1.0",
    "@auth0/angular-jwt": "^5.2.0",
    "@awesome-cordova-plugins/calendar": "^6.6.0",
    "@babel/runtime": "^7.23.8",
    "@capacitor-community/http": "^1.4.1",
    "@capacitor/app": "^5.0.6",
    "@capacitor/camera": "^5.0.8",
    "@capacitor/core": "^5.6.0",
    "@capacitor/filesystem": "^5.2.0",
    "@capacitor/ios": "5.6.0",
    "@capacitor/keyboard": "^5.0.7",
    "@capacitor/preferences": "^5.0.6",
    "@ionic-native/android-permissions": "^5.36.0",
    "@ionic-native/base64-to-gallery": "^5.36.0",
    "@ionic-native/camera": "^5.36.0",
    "@ionic-native/core": "^5.36.0",
    "@ionic-native/ftp": "^5.36.0",
    "@ionic-native/native-storage": "^5.36.0",
    "@ionic-native/screen-orientation": "^5.36.0",
    "@ionic/angular": "^7.6.5",
    "@ionic/angular-toolkit": "^11.0.0",
    "@ionic/cordova-builders": "^11.0.0",
    "@ionic/storage-angular": "^4.0.0",
    "@jridgewell/sourcemap-codec": "^1.4.15",
    "@npmcli/fs": "^3.1.0",
    "@types/ssh2": "^1.11.18",
    "@types/ssh2-sftp-client": "^9.0.3",
    "@typescript-eslint/parser": "^6.19.0",
    "angular-calendar": "^0.31.0",
    "bcryptjs": "^2.4.3",
    "crypto-js": "^4.2.0",
    "date-fns": "^3.2.0",
    "ion7-calendar": "^3.6.29",
    "ionic-native-sftp-leapfroggr": "^1.0.1",
    "ionicons": "^7.2.2",
    "jwt-decode": "^4.0.0",
    "moment": "^2.30.1",
    "mongodb": "^6.3.0",
    "ngx-toastr": "^18.0.0",
    "npm-check-updates": "^16.14.12",
    "odometer": "^0.4.8",
    "path-exists": "^5.0.0",
    "rxjs-compat": "^6.6.7",
    "rxjs-observable": "^0.0.7",
    "serve": "14.2.1",
    "signature_pad": "^4.1.7",
    "sweetalert2": "^11.10.3",
    "swiper": "^11.0.5",
    "ts-md5": "^1.3.1",
    "tslib": "^2.6.2",
    "uuid": "^9.0.1",
    "zone.js": "^0.14.3"
  },
  "description": "application mobile facile",
  "devDependencies": {
    "@angular/cli": "17.1.0",
    "@capacitor/android": "5.6.0",
    "@capacitor/cli": "^5.6.0",
    "@types/node": "^20.11.5",
    "cordova-android": "^12.0.1",
    "cordova-plugin-device": "2.1.0",
    "cordova-plugin-ionic-keyboard": "^2.2.0",
    "cordova-plugin-ionic-webview": "^5.0.1",
    "cordova-plugin-splashscreen": "6.0.2",
    "cordova-plugin-statusbar": "^4.0.0"
  },
  "cordova": {
    "plugins": {
      "cordova-plugin-statusbar": {},
      "cordova-plugin-device": {},
      "cordova-plugin-splashscreen": {},
      "cordova-plugin-ionic-webview": {},
      "cordova-plugin-ionic-keyboard": {}
    },
    "platforms": [
      "android"
    ]
  }
}

reference to this topic :bug: impossible to pass JSON parameters with back button · Issue #28852 · ionic-team/ionic-framework · GitHub

could you help me ?
Cordially

1 post - 1 participant

Read full topic

IOS Local Notification no notification Sound

$
0
0

I code an app for ios with next js and capacitor how use the local notification plugin to get notification sound on ios please post an example code

2 posts - 2 participants

Read full topic

Viewing all 70900 articles
Browse latest View live


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