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

Chooser plugin not working on iOS

$
0
0

@Thilo1992 wrote:

Hello,

I’m using the Ionic Native Chooser plugin to select files. It’s working great on android but on iOS the chooser opens, but all files are grayed out and I can’t select any of the files.

I don’t have specified any MIME-type, so the problem isn’t the file type.

What could I have done wrong?

Thanks in advance

Thilo

Posts: 1

Participants: 1

Read full topic


ionic SyntaxError: Unexpected number in JSON at position 4

Ionic Data Storage and the Webkit Intelligent Tracking Prevention enhancements (iPadOS/iOS 13.4 and Safari 13.1 on macOS)

Ionic iOS large title background

$
0
0

@felixliu wrote:

Hi, I’m creating an iOS App with ionic 5. I’d like to use the large title that introduced in ionic 5 (https://ionicframework.com/docs/api/title#collapsible-large-titles). What I want to do is to set a background color for the title part (both ion-header and the header in the top of ion-content), and for ion-content background it’s another color.

I set background for ion-header, and it looks okay for static page. The problem I’m facing is that as the iOS page have a bounce effect, when the page is pulled a little bit down, there will be a space between the fixed ion-header and the second header bar, which will show the color of content background, as the image suggested.

What I want is that the white space becomes the same color as the the title background and the ion-content keep using white. I just tried to put a layer under it to prevent it looks normal, I’d like to ask does any know some better solution? Any suggestion is welcomed, thanks in advance.

Posts: 1

Participants: 1

Read full topic

Ionic Gestures

$
0
0

@Mmadzharov wrote:

Hey Guys. Now that there is Ionic Gestures. Is there event for holding ? Or we still have to do it on our own ?

Posts: 2

Participants: 2

Read full topic

Wheel selector inside content

$
0
0

@nicobytes wrote:

Hello!
Is there a chance for using a wheel selector like date picker in a content?

The wheel selector works right in an overlay but if I want this selector in content?

The goal is to include that selector like this.

Posts: 2

Participants: 2

Read full topic

Hide scroll bar

"Type 'HealthOriginal' is not a constructor function type." when extending native-plugin Health

$
0
0

@dansolhan wrote:

I’m following these instructions on how to mock native-plugins. Trying this leads to the error in the title.

I am using Ionic 5. Has the way to mock native plugins changed dramatically?

Posts: 1

Participants: 1

Read full topic


Question regarding the Ionic Natvie Printer

$
0
0

@alanmontgomery19 wrote:

Hi all,

I’m utilising the ionic native printer.

I’ve got a modal with some styled content (external SCSS file) and 2 images in here.

When i use the printer plugin like:

LocalPrinter.print(document.getElementById("print-modal").innerHTML, LocalPrintOptions);

I obviously lose the styling and also the images don’t come through to the Print Preview popup on the native dialog.

My question is - How can i include the CSS and images so they also appear?

Thanks,
Alan

Posts: 1

Participants: 1

Read full topic

Modal: ERROR Error: Uncaught (in promise): overlay does not exist

$
0
0

@error264 wrote:

Hi All,

I have tried to find a solution to a common problem which i have realised a few people have had regarding the dismiss of the modal.

As for my modal structure, i have a page which calls a modal and a button within that which calls another modal

Page 1 --> Modal A --> Modal B

The issue is that Modal B closes without a problem If i use a function on the ion-item which then returns the correct parameter. However, with router link embedded in my HTML the modal does not redirect - maybe router link only works with pages?

When the category is selected and returns to Modal A and an attempt is made to close it, this returns ‘ERROR Error: Uncaught (in promise): overlay does not exist’ if the close button is clicked.

selling-tab.module.ts

import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule } from '@angular/forms';
import { Routes, RouterModule } from '@angular/router';

import { IonicModule } from '@ionic/angular';

import { SellingTabPage } from './selling-tab.page';
import { AddProductComponent } from './add-product/add-product.component';
import { CategoryComponent } from './category/category.component';

const routes: Routes = [
  {
    path: '',
    component: SellingTabPage
  }
];

@NgModule({
  imports: [
    CommonModule,
    FormsModule,
    IonicModule,
    RouterModule.forChild(routes),
  ],
  declarations: [SellingTabPage,
    AddProductComponent,
    CategoryComponent,
    ],
    entryComponents: [AddProductComponent, CategoryComponent,]
})
export class SellingTabPageModule {}

category.component.ts

import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { ModalController } from '@ionic/angular';
import { NgModule } from '@angular/core';


@Component({
  selector: 'app-category',
  templateUrl: './category.component.html',
  styleUrls: ['./category.component.scss'],
})
export class CategoryComponent implements OnInit {

 categoryOptions = [
    'Item 1',
    'Item 2',
    'Item 3',];

constructor(
    private route: Router,
    private modalCtrl: ModalController
  ) { }

ngOnInit() {
  }
  
  async close() {
    await this.modalCtrl.dismiss();
  }

  async getCategory(event){

    let selected: any;

    try {
       selected = event.detail.value;
       console.log(selected + ' has been selected');

    } catch (error) {
      console.log(error.message);
    }

  }

}

category.component.html

<ion-header>
  <ion-toolbar>
    <ion-title>Select Category</ion-title>
    <ion-buttons slot="end">
      <ion-button (click)="close()">
        <ion-icon slot="icon-only" name="close"></ion-icon>        
      </ion-button>
    </ion-buttons>
  </ion-toolbar>
</ion-header>
<ion-content>

  <ion-list>
    <ion-radio-group (ionChange)="getCategory($event)">
      <ion-item *ngFor="let category of categoryOptions" [routerLink]="['/add-product']" [queryParams]="{ type: category }" routerDirection="back">
        <ion-label>{{category}}</ion-label>
        <ion-radio value={{category}} slot="end"></ion-radio>
      </ion-item>
    </ion-radio-group>
  </ion-list>


</ion-content>

More code can be showed if needed or if any files are missing

Thanks in Advance

Posts: 1

Participants: 1

Read full topic

Array of Array

$
0
0

@RobeNogueira145 wrote:

Hello, I´m beginner at Ionic and I´m doing an app.
I need 4 arrays in array and I have this code:

tudo = {

divisao: [],

figura: [],

tempo: [],

quantidade: []

}

And this give me a error, what I should do?

Posts: 1

Participants: 1

Read full topic

QR Scan not working

$
0
0

@ocooldi wrote:

Hello, everyone. I am new to ionic native and building the qr-scan page now. Actually I followed https://ionicframework.com/docs/native/qr-scanner

here is my code snippets,

  • qr-scanner.page.ts
    import { Component, OnInit } from ‘@angular/core’;

import { NavController } from ‘@ionic/angular’;

import { Router } from ‘@angular/router’;

import { QRScanner, QRScannerStatus } from ‘@ionic-native/qr-scanner/ngx’;

// import services

import { AuthService } from ‘…/services/auth.service’;

import { StorageService } from ‘…/services/storage.service’;

@Component({

selector: ‘app-qr-scanner’,

templateUrl: ‘./qr-scanner.page.html’,

styleUrls: [’./qr-scanner.page.scss’],

})

export class QrScannerPage implements OnInit {

scanSubscription: any;

constructor(

public navCtrl: NavController, 

private router: Router,

public qrScanner: QRScanner,

public authService: AuthService,

public storageService: StorageService

) { }

ngOnInit() {

}

scan() {

(window.document.querySelector('ion-app') as HTMLElement).classList.add('cameraView');

this.qrScanner.prepare()

.then((status: QRScannerStatus) => {

  if (status.authorized) {

    this.qrScanner.show();

    let self = this;

    this.scanSubscription = this.qrScanner.scan().subscribe((text:string) => {

      let splittedAry = text.split('qr_code?');

      let saAray = splittedAry[1].split('&');

      let saaText = saAray[0];

      saaText.replace('payload=', '');

      let saatAry = saaText.split(';');

      

      self.authService.signin('register', saatAry[0], saatAry[1]);

    });

  } else if (status.denied) {

    console.log("Camera permission permanently denied");

    this.authService.dynamicSuccess("Denied", "Camera permission permanently denied");

  } else {

    console.log("Camera permision temporarily denied");

    this.authService.dynamicSuccess("Denied", "Camera permision temporarily denied");

  }

})

.catch((e: any) => {

  console.error('Error', e);

  this.authService.dynamicSuccess("Error", "Sth went wrong");

});

}

stopScanning() {

(this.scanSubscription) ? this.scanSubscription.unsubscribe() : null;

this.scanSubscription=null;

(window.document.querySelector('ion-app') as HTMLElement).classList.remove('cameraView');

this.qrScanner.hide();

this.qrScanner.destroy();

}

goLogin() {

this.storageService.clearStorage();

this.router.navigateByUrl(this.storageService.step);

}

ionViewWillEnter() {

this.scan();

}

ionViewWillLeave() {

this.stopScanning();

}

}

  • qr-scanner.page.html

    Qr Scanner

    <ion-button color=“dark” class=“qrscs-close” (click)=“goLogin()”>Close

  • app.component.scss
    ion-app.cameraView, ion-app.cameraView ion-content, ion-app.cameraView .nav-decor {

    background: transparent none !important;

}

  • app.module.ts
    import { QRScanner } from ‘@ionic-native/qr-scanner/ngx’;


providers: [

StatusBar,

SplashScreen,

FCM,

QRScanner,

{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }

],

It`s so urgent and anybody can help me ?

Posts: 1

Participants: 1

Read full topic

Ionic 5: ion-header turns black in iOS using ionic lab

$
0
0

@ebellempire wrote:

I’ve created a new app using ionic start appname blank --type=angular and made a few very small changes. For some reason, the header area appears to be in dark mode, but only in iOS, and only most of the time (if I make an edit to the HTML it will sometimes go back to normal).

The only changes I’ve made to the blank template were to create a few pages using ionic g and create a split-pane menu. (See code below.)

discover.page.html

// discover.page.html (my default page)
<ion-header [translucent]="true">
  <ion-toolbar>
    <ion-buttons slot="start">
      <ion-menu-button></ion-menu-button>
    </ion-buttons>
    <ion-title>Discover</ion-title>
  </ion-toolbar>
</ion-header>

<ion-content [fullscreen]="true">
  <ion-header collapse="condense">
    <ion-toolbar>
      <ion-title size="large">Discover</ion-title>
    </ion-toolbar>
  </ion-header>

  <div id="container">
    <strong>Ready to create an app?</strong>
    <p>
      Start with Ionic
      <a
        target="_blank"
        rel="noopener noreferrer"
        href="https://ionicframework.com/docs/components"
        >UI Components</a
      >
    </p>
  </div>
</ion-content>

app.component.html

// app.component.html
<ion-app>
  <ion-split-pane contentId="main">
    <ion-menu contentId="main">
      <ion-header>
        <ion-toolbar>
          <ion-title>Menu</ion-title>
        </ion-toolbar>
      </ion-header>
    </ion-menu>

    <ion-router-outlet id="main"></ion-router-outlet>
  </ion-split-pane>
</ion-app>

ionic info


Ionic:

   Ionic CLI                     : 6.2.1 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.0.5
   @angular-devkit/build-angular : 0.803.25
   @angular-devkit/schematics    : 8.3.25
   @angular/cli                  : 8.3.25
   @ionic/angular-toolkit        : 2.2.0

Capacitor:


   Capacitor CLI   : 1.5.1
   @capacitor/core : 1.5.1

Utility:

   cordova-res (update available: 0.11.0) : 0.8.1
   native-run                             : not installed

System:

   NodeJS : v13.2.0 (/usr/local/Cellar/node/13.2.0/bin/node)
   npm    : 6.13.6
   OS     : macOS Catalina

Any help or insights would be appreciated. Thanks! --E

Posts: 1

Participants: 1

Read full topic

Detect device rotation/orientation in Ionic 4 without rotating app

$
0
0

@sshipsey wrote:

Is it possible to detect rotation in an Ionic4 app without actually rotating the entire app?
I’m using this:


I’d like to enter some callback on device rotation, not necessarily rotating the entire app. If I lock orientation, i lose the screenOrientation.onChange() emits. If I unlock rotation, my screenOrientation.onChange() emits, but the app also rotates. Attempting something like this:

this.screenOrientation.unlock();
this.screenOrientation.onChange().subscribe(ev => {
        this.screenOrientation.lock(
          this.screenOrientation.ORIENTATIONS.PORTRAIT_PRIMARY
        );
        // Do other stuff
});

makes the rotation jump between the two which looks bad. Been fighting this for a while, any ideas are appreciated :confused:

Posts: 1

Participants: 1

Read full topic

Debugger in chrome dose not paused app

$
0
0

@anton_klochko wrote:

Hi all ! Could anyone suggest please, what I need to do to debug app in browser ? I try to do like this, but app dose not paused.

function myBrokenFunction() {
debugger;
// do other stuff
}

Posts: 1

Participants: 1

Read full topic


App not performing same on Android device as desktop after running npx cap open anroid

$
0
0

@Sweg wrote:

I am trying to run my ionic app on an Android device using npx cap open android.
When I run on my desktop (npm serve), it displays fine, but the app is not performing the same on my Android device (i.e. parts of the home component aren’t being displayed)

Here is my console output, can someone please tell me why this is happening:

03/25 17:32:00: Launching ‘app’ on samsung SM-G965F.
$ adb shell am start -n “io.ionic.starter/io.ionic.starter.MainActivity” -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Connected to process 22381 on device ‘samsung-sm_g965f-2410169c6d0c7ece’.
Capturing and displaying logcat messages from application. This behavior can be disabled in the “Logcat output” section of the “Debugger” settings page.
E/Zygote: isWhitelistProcess - Process is Whitelisted
E/Zygote: accessInfo : 1
I/SELinux: SELinux: seapp_context_lookup: seinfo=untrusted, level=s0:c130,c258,c512,c768, pkgname=io.ionic.starter
I/o.ionic.starte: Late-enabling -Xcheck:jni
E/o.ionic.starte: Unable to peek into adb socket due to error. Closing socket.: Connection reset by peer
D/ConnectivityManager_URSP: Ursp sIsUrsp=false, sIsCheckUrsp=false, uid=10642
D/Proxy: urspP is null: 10642
W/FirebaseApp: Default FirebaseApp failed to initialize because no default options were found. This usually means that com.google.gms:google-services was not applied to your gradle project.
I/FirebaseInitProvider: FirebaseApp initialization unsuccessful
D/libEGL: loaded /vendor/lib64/egl/libGLES_mali.so
W/o.ionic.starte: Accessing hidden method Landroid/graphics/drawable/Drawable;->getOpticalInsets()Landroid/graphics/Insets; (light greylist, linking)
Accessing hidden field Landroid/graphics/Insets;->left:I (light greylist, linking)
W/o.ionic.starte: Accessing hidden field Landroid/graphics/Insets;->right:I (light greylist, linking)
Accessing hidden field Landroid/graphics/Insets;->top:I (light greylist, linking)
Accessing hidden field Landroid/graphics/Insets;->bottom:I (light greylist, linking)
E/o.ionic.starte: Invalid ID 0x00000000.
W/o.ionic.starte: Accessing hidden method Landroid/view/View;->getAccessibilityDelegate()Landroid/view/View$AccessibilityDelegate; (light greylist, linking)
W/o.ionic.starte: Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (light greylist, reflection)
W/o.ionic.starte: Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (light greylist, reflection)
I/WebViewFactory: Loading com.android.chrome version 80.0.3987.149 (code 398714932)
E/o.ionic.starte: Invalid ID 0x00000000.
E/o.ionic.starte: Invalid ID 0x00000000.
I/cr_LibraryLoader: Loaded native library version number “80.0.3987.149”
W/o.ionic.starte: Accessing hidden method Landroid/content/Context;->bindServiceAsUser(Landroid/content/Intent;Landroid/content/ServiceConnection;ILandroid/os/Handler;Landroid/os/UserHandle;)Z (light greylist, reflection)
D/ConnectivityManager: requestNetwork; CallingUid : 10642, CallingPid : 22381
D/ConnectivityManager: requestNetwork; CallingUid : 10642, CallingPid : 22381
D/Capacitor: Starting BridgeActivity
D/Capacitor: Registering plugin: App
D/Capacitor: Registering plugin: Accessibility
D/Capacitor: Registering plugin: BackgroundTask
D/Capacitor: Registering plugin: Browser
D/Capacitor: Registering plugin: Camera
D/Capacitor: Registering plugin: Clipboard
D/Capacitor: Registering plugin: Device
D/Capacitor: Registering plugin: LocalNotifications
D/Capacitor: Registering plugin: Filesystem
D/Capacitor: Registering plugin: Geolocation
D/Capacitor: Registering plugin: Haptics
D/Capacitor: Registering plugin: Keyboard
D/Capacitor: Registering plugin: Modals
D/Capacitor: Registering plugin: Network
D/Capacitor: Registering plugin: Permissions
D/Capacitor: Registering plugin: Photos
D/Capacitor: Registering plugin: PushNotifications
D/Capacitor: Registering plugin: Share
D/Capacitor: Registering plugin: SplashScreen
D/Capacitor: Registering plugin: StatusBar
D/Capacitor: Registering plugin: Storage
D/Capacitor: Registering plugin: Toast
D/Capacitor: Registering plugin: WebView
E/Capacitor: Unable to read file at path public/plugins
D/Capacitor: Loading app at http://localhost
W/o.ionic.starte: Accessing hidden method Landroid/media/AudioManager;->getOutputLatency(I)I (light greylist, reflection)
W/cr_media: Requires BLUETOOTH permission
I/ConfigStore: android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasWideColorDisplay retrieved: 0
android::hardware::configstore::V1_0::ISurfaceFlingerConfigs::hasHDRDisplay retrieved: 0
W/AudioCapabilities: Unsupported mime audio/ac4
W/AudioCapabilities: Unsupported mime audio/x-ima
W/AudioCapabilities: Unsupported mime audio/x-ape
W/AudioCapabilities: Unsupported mime audio/eac3-joc
W/AudioCapabilities: Unsupported mime audio/mpeg-L1
W/AudioCapabilities: Unsupported mime audio/mpeg-L2
W/AudioCapabilities: Unsupported mime audio/x-ms-wma
D/Capacitor/Plugin/LN: LocalNotification received: null
Activity started without notification attached
D/Capacitor: App started
D/Capacitor/Plugin/App: Firing change: true
V/Capacitor/Plugin/App: Notifying listeners for event appStateChange
D/Capacitor/Plugin/App: No listeners found for event appStateChange
W/VideoCapabilities: Unrecognized profile 4 for video/hevc
D/Capacitor: App resumed
W/VideoCapabilities: Unsupported mime video/mp43
D/OpenGLRenderer: Skia GL Pipeline
D/EmergencyMode: [EmergencyManager] android createPackageContext successful
W/VideoCapabilities: Unrecognized profile/level 1/32 for video/mp4v-es
Unrecognized profile/level 32768/2 for video/mp4v-es
Unrecognized profile/level 32768/64 for video/mp4v-es
W/VideoCapabilities: Unsupported mime video/wvc1
W/VideoCapabilities: Unsupported mime video/wvc1
W/VideoCapabilities: Unsupported mime video/x-ms-wmv7
W/VideoCapabilities: Unsupported mime video/x-ms-wmv8
D/InputTransport: Input channel constructed: fd=131
D/ViewRootImpl@edef802[MainActivity]: setView = DecorView@80c6513[MainActivity] TM=true MM=false
D/ConnectivityManager: requestNetwork; CallingUid : 10642, CallingPid : 22381
D/ConnectivityManager: requestNetwork; CallingUid : 10642, CallingPid : 22381
I/VideoCapabilities: Unsupported profile 4 for video/mp4v-es
D/Capacitor: Handling local request: http://localhost/
D/ViewRootImpl@edef802[MainActivity]: dispatchAttachedToWindow
D/ViewRootImpl@edef802[MainActivity]: Relayout returned: old=[0,0][1080,2220] new=[0,0][1080,2220] result=0x7 surface={valid=true 493865160704} changed=true
I/OpenGLRenderer: Initialized EGL, version 1.4
D/OpenGLRenderer: Swap behavior 2
D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
D/OpenGLRenderer: eglCreateWindowSurface = 0x72f573a180, 0x72fca85010
D/InputTransport: Input channel constructed: fd=145
D/ViewRootImpl@528b903[MainActivity]: setView = android.widget.ImageView{607e080 V.ED… …ID 0,0-0,0} TM=true MM=false
D/InputTransport: Input channel constructed: fd=146
D/ViewRootImpl@84a84ac[MainActivity]: setView = android.widget.ProgressBar{52f1575 I.ED… …ID 0,0-0,0} TM=true MM=false
V/Capacitor/Plugin/Network: Notifying listeners for event networkStatusChange
D/Capacitor/Plugin/Network: No listeners found for event networkStatusChange
D/ViewRootImpl@528b903[MainActivity]: dispatchAttachedToWindow
D/ViewRootImpl@528b903[MainActivity]: Relayout returned: old=[0,0][1080,2220] new=[0,0][1080,2220] result=0x7 surface={valid=true 493745364992} changed=true
D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
D/OpenGLRenderer: eglCreateWindowSurface = 0x72f5898280, 0x72f5846010
D/ViewRootImpl@84a84ac[MainActivity]: dispatchAttachedToWindow
D/ViewRootImpl@84a84ac[MainActivity]: Relayout returned: old=[0,0][1080,2220] new=[477,1047][603,1173] result=0x1 surface={valid=false 0} changed=false
D/ViewRootImpl@edef802[MainActivity]: MSG_RESIZED: frame=Rect(0, 0 - 1080, 2220) ci=Rect(0, 63 - 0, 39) vi=Rect(0, 63 - 0, 39) or=1
D/ViewRootImpl@edef802[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager: prepareNavigationBarInfo() DecorView@80c6513[MainActivity]
getNavigationBarColor() -855310
D/InputMethodManager: prepareNavigationBarInfo() DecorView@80c6513[MainActivity]
getNavigationBarColor() -855310
V/InputMethodManager: Starting input: tba=io.ionic.starter ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
D/InputMethodManager: startInputInner - Id : 0
I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
D/ViewRootImpl@528b903[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager: prepareNavigationBarInfo() android.widget.ImageView{607e080 V.ED… …ID 0,0-1080,2220}
getNavigationBarColor this view is not DecorView or null
getNavigationBarColor() Fail
D/InputMethodManager: prepareNavigationBarInfo() android.widget.ImageView{607e080 V.ED… …ID 0,0-1080,2220}
getNavigationBarColor this view is not DecorView or null
getNavigationBarColor() Fail
V/InputMethodManager: Starting input: tba=io.ionic.starter ic=null mNaviBarColor Fail mIsGetNaviBarColorSuccess false , NavVisible : true , NavTrans : false
D/InputMethodManager: startInputInner - Id : 0
I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
D/InputTransport: Input channel constructed: fd=150
D/InputTransport: Input channel constructed: fd=154
D/ViewRootImpl@528b903[MainActivity]: MSG_RESIZED: frame=Rect(0, 0 - 1080, 2220) ci=Rect(0, 63 - 0, 39) vi=Rect(0, 63 - 0, 39) or=1
W/InputMethodManager: Ignoring onBind: cur seq=41878, given seq=41877
D/InputTransport: Input channel destroyed: fd=150
D/ViewRootImpl@edef802[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 0 1
D/InputMethodManager: prepareNavigationBarInfo() DecorView@80c6513[MainActivity]
getNavigationBarColor() -855310
D/Capacitor: Handling local request: http://localhost/runtime-es2015.js
D/Capacitor: Handling local request: http://localhost/polyfills-es2015.js
D/Capacitor: Handling local request: http://localhost/styles-es2015.js
D/Capacitor: Handling local request: http://localhost/vendor-es2015.js
D/Capacitor: Handling local request: http://localhost/main-es2015.js
I/Capacitor/Console: File: http://localhost/vendor-es2015.js - Line 69837 - Msg: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
D/Capacitor: Handling local request: http://localhost/common-es2015.js
D/Capacitor: Handling local request: http://localhost/5-es2015.js
D/Capacitor: Handling local request: http://localhost/home-home-module-es2015.js
I/Capacitor/Console: File: http://localhost/vendor-es2015.js - Line 117994 - Msg: Ionic Native: deviceready event fired after 525 ms
W/Capacitor/Console: File: http://localhost/vendor-es2015.js - Line 118299 - Msg: Native: tried calling StatusBar.styleDefault, but the StatusBar plugin is not installed.
W/Capacitor/Console: File: http://localhost/vendor-es2015.js - Line 118311 - Msg: Install the StatusBar plugin: ‘ionic cordova plugin add cordova-plugin-statusbar’
File: http://localhost/vendor-es2015.js - Line 118299 - Msg: Native: tried calling SplashScreen.hide, but the SplashScreen plugin is not installed.
File: http://localhost/vendor-es2015.js - Line 118311 - Msg: Install the SplashScreen plugin: ‘ionic cordova plugin add cordova-plugin-splashscreen’
D/Capacitor: Handling local request: http://localhost/swipe-back-d2cdbf9a-js-es2015.js
V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 95296127, pluginId: Geolocation, methodName: watchPosition
V/Capacitor: callback: 95296127, pluginId: Geolocation, methodName: watchPosition, methodData: {}
V/Capacitor/Plugin: To native (Capacitor plugin): callbackId: 95296128, pluginId: App, methodName: addListener
V/Capacitor: callback: 95296128, pluginId: App, methodName: addListener, methodData: {“eventName”:“backButton”}
D/Capacitor: Handling local request: http://localhost/tap-click-606f325e-js-es2015.js
D/Capacitor: Handling local request: http://localhost/status-tap-2ec46489-js-es2015.js
D/Capacitor: Handling local request: http://localhost/focus-visible-70713a0c-js-es2015.js
D/Capacitor: Handling local request: http://localhost/assets/icon/favicon.png
D/TcpOptimizer: TcpOptimizer-ON
D/NetworkSecurityConfig: No Network Security Config specified, using platform default
I/Capacitor/Console: File: http://localhost/home-home-module-es2015.js - Line 2740 - Msg: new position: [object Object]
D/Capacitor: SplashScreen was automatically hidden after the launch timeout. You should call SplashScreen.hide() as soon as your web app is loaded (or increase the timeout).Read more at https://capacitor.ionicframework.com/docs/apis/splash-screen/#hiding-the-splash-screen
W/libEGL: EGLNativeWindowType 0x72f5846010 disconnect failed
D/OpenGLRenderer: eglDestroySurface = 0x72f5898280, 0x72f5846000
D/ViewRootImpl@528b903[MainActivity]: Relayout returned: old=[0,0][1080,2220] new=[0,0][1080,2220] result=0x5 surface={valid=false 0} changed=true
D/ViewRootImpl@528b903[MainActivity]: dispatchDetachedFromWindow
D/ViewRootImpl@528b903[MainActivity]: Surface release. android.view.ViewRootImpl.doDie:7954 android.view.ViewRootImpl$ViewRootHandler.handleMessage:4955 android.os.Handler.dispatchMessage:106 android.os.Looper.loop:214 android.app.ActivityThread.main:6986 java.lang.reflect.Method.invoke:-2 com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run:494 com.android.internal.os.ZygoteInit.main:1445
D/InputTransport: Input channel destroyed: fd=145
D/ViewRootImpl@edef802[MainActivity]: MSG_WINDOW_FOCUS_CHANGED 1 1
D/InputMethodManager: prepareNavigationBarInfo() DecorView@80c6513[MainActivity]
getNavigationBarColor() -855310
D/InputMethodManager: prepareNavigationBarInfo() DecorView@80c6513[MainActivity]
getNavigationBarColor() -855310
V/InputMethodManager: Starting input: tba=io.ionic.starter ic=null mNaviBarColor -855310 mIsGetNaviBarColorSuccess true , NavVisible : true , NavTrans : false
D/InputMethodManager: startInputInner - Id : 0
I/InputMethodManager: startInputInner - mService.startInputOrWindowGainedFocus
D/InputTransport: Input channel constructed: fd=147
Input channel destroyed: fd=154
E/ViewRootImpl: sendUserActionEvent() returned.
I/Capacitor/Console: File: http://localhost/home-home-module-es2015.js - Line 2740 - Msg: new position: [object Object]

Posts: 1

Participants: 1

Read full topic

Ionic React Course

$
0
0

@mirkonasato wrote:

Hey all, I’m preparing a new course on Ionic React. The following sections are available now on YouTube:

  1. From React to Ionic (47m)
    Introduces some initial Ionic 5 concepts by building a simple “Hello World” app. We start with a regular React project as generated by Create React App, then add some Ionic features step by step. We’ll use some simple UI components such as a button and a toast message, look at the Ionicons icon pack, learn to customise the default theme colours, and finally turn it into a full Ionic app.
  2. Biorhythm Calculator App (1h 50m)
    By building a “Biorhythm Calculator” app we’ll learn how to use input fields with Ionic, style components, write unit tests, and integrate additional JavaScript libraries for date manipulation and charting.

Enjoy!

Posts: 1

Participants: 1

Read full topic

How to set coordinates of Google Map when ionic app loads using Geolocation?

$
0
0

@Sweg wrote:

am trying to load Google Maps into my Ionic app, & center the map on my current coordaintes using Geolocation.

Below I am retrieving the long & lat of my current location, & assigning the values to local variables:

constructor(private afAuth: AngularFireAuth, private afs: AngularFirestore) {
    this.anonLogin();
  }

  anonLogin() {
    this.afAuth.auth.signInAnonymously().then(res => {
      this.user = res.user;
      this.isTracking = true;
      this.watch = Geolocation.watchPosition({}, (position, err) => {
        if (position) {
          this.lat = position.coords.latitude;
          this.lng = position.coords.longitude;
        }
      });
    });
  }

And here is where I’m creating the map:

ionViewWillEnter() {
    this.loadMap();
  }

  loadMap() {
    let latLng = new google.maps.LatLng(this.lng, this.lat);
    let mapOptions = {
      center: latLng,
      zoom: 5,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    this.map = new google.maps.Map(this.mapElement.nativeElement, mapOptions);
  }

In loadMap() . this.lng & this.lat are null. But in anonLogin() , they’re the correct values.

How can I center my map on these co-ordinates when the app / map loads?

Posts: 1

Participants: 1

Read full topic

Capacitor on iOS: POST request fails

$
0
0

@muffin.blue wrote:

I’m using Ionic (v5) + React + Capacitor to create an app for iOS and I recently got stuck with a really strange error: fetch() and axios successfully perform GET requests to the backend while POST requests are always failing.

fetch() returns "cancelled" which tells me nothing but a failure meanwhile axios generates a more descriptive error:

{
  "message": "Network Error",
  "name": "Error",
  "stack": "capacitor://localhost/static/js/8.98344607.chunk.js:2:168604\ncapacitor://localhost/static/js/8.98344607.chunk.js:2:167548",
  "config": {
    "url": "auth",
    "method": "post",
    "data": "{\"email\":\"email-here\",\"password\":\"111111\"}",
    "headers": {
      "Accept": "application/json",
      "Content-Type": "application/json"
    },
    "baseURL": "https://website.com/api/1.3/",
    "transformRequest": [
      null
    ],
    "transformResponse": [
      null
    ],
    "timeout": 0,
    "xsrfCookieName": "XSRF-TOKEN",
    "xsrfHeaderName": "X-XSRF-TOKEN",
    "maxContentLength": -1
  }
}

Already checked Apache’s CORS settings, it should be OK. Could anyone suggest a fix for this?

Part of my code that performs all api requests

const axConf: AxiosRequestConfig = {
    url: query, // string
    method: m, // string
    baseURL: global.base_uri + 'api/' + global.api_version + '/',
    headers: {
        Accept: 'application/json',
        'Content-Type': 'application/json'
    },
    data: r, // object
    validateStatus: function (status) { return status >= 200 && status < 300; }
};
return new Promise(resolve => {
    axios(axConf)
        .then(response => resolve(successRes(r, i, response.data)))
        .catch(function (error) {
                console.log(error);
                if (error.response) {
                    resolve(errorRes(i, error.response));
                } else if (error.request) {
                    resolve(errorRes(i, error.request));
                } else {
                    resolve(errorRes(i, error.message));
                }
            }
        );
});

Originally posted on SO by me

Posts: 1

Participants: 1

Read full topic

'ng-select' is not a known element

$
0
0

@leonardofmed wrote:

I’m trying to use the select component for angular, but after I followed the instruction to configure the module this error is throw.

Error

Uncaught Error: Template parse errors:
‘ng-select’ is not a known element:

  1. If ‘ng-select’ is an Angular component, then verify that it is part of this module.
  2. If ‘ng-select’ is a Web Component then add ‘CUSTOM_ELEMENTS_SCHEMA’ to the ‘@NgModule.schemas’ of this component to suppress this message.
    [ERROR ->] <ng-select placeholder="Select city"></ng-select>

How my app.module.ts is:

...
import { NgSelectModule } from '@ng-select/ng-select';
import { FormsModule } from '@angular/forms';

@NgModule({
	declarations: [AppComponent],
	entryComponents: [...],
	imports: [..., NgSelectModule, FormsModule],
	providers: [
		...
	],
	bootstrap: [AppComponent]
})
export class AppModule {}

I tried to follow the solution for this post, which has the same error, but even if I do this I get this error. I also tried to import and add the NgSelectModule to my page module, but nothing changes. I even tried to add the module to app-routing.module.ts because I read someone mentioning that, but don’t worked either.

Additional information:

Ionic CLI                     : 5.4.16 
Ionic Framework               : @ionic/angular 4.11.7
@angular-devkit/build-angular : 0.801.2
@angular-devkit/schematics    : 8.1.3
@angular/cli                  : 8.1.3
@ionic/angular-toolkit        : 2.0.0
Cordova CLI                   : 9.0.0 (cordova-lib@9.0.1)

Posts: 1

Participants: 1

Read full topic

Viewing all 70433 articles
Browse latest View live


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