Quantcast
Channel: Ionic Forum - Latest posts
Viewing all 228529 articles
Browse latest View live

Livereload ERR_CLEARTEXT_NOT_PERMITTED

$
0
0

Just Replace this:

<application android:networkSecurityConfig="@xml/network_security_config" />

and Add this:

<application android:usesCleartextTraffic="true" />

Example:

<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android">
    <application android:usesCleartextTraffic="true" />
</edit-config>

I hope to solve your problem.


Ion-icon attribute "name" does not work, "icon" does

$
0
0

I just tried to fix a strange bug:

I have an item with an icon like this:

<ion-item>
      <ion-icon name="{{iconname | icon}}" *ngIf="iconname" slot="start"></ion-icon>
      <ion-label class="ion-text-nowrap more">
        NAME
      </ion-label>
</ion-item>

This does not work, but if I change name to icon it works.

<ion-item>
      <ion-icon icon="{{iconname | icon}}" *ngIf="iconname" slot="start"></ion-icon>
      <ion-label class="ion-text-nowrap more">
        NAME
      </ion-label>
</ion-item>

The app is using Ionic 4 and Angular. Does this happen because of the use of Angular template variables?

iOS file access with @ionic-native/file/ngx/cordova-plugin-file

Change background-color of ion-content

$
0
0

I have tried all the comments,
nothing worked

ionic 4

I found this solution and it’s WORKING

ion-content {
  --ion-background-color: #111d12;
}

Change background-color of ion-content

$
0
0

(post withdrawn by author, will be automatically deleted in 24 hours unless flagged)

Ionic(v4) React Menu controller

$
0
0

thank you it helped to solve my problem

Change background-color of ion-content

$
0
0

In the SCSS:

ion-content{
background-color: red;
}

How to covert website to native mobile app


Capacitor: Plugin Camera

$
0
0

Hi,
After 2 years, I’m back in Ionic development…yeeiiiih! :slight_smile:

I added Capacitor to my Ionic 4 app.

I also created the example with the camera-plugin (Capacitor) -> https://capacitor.ionicframework.com/docs/guides/ionic-framework-app

Now I see some bugs within the Camera-Plugin.
The bug happens within the Camera-UI (installed by the @ionic/pwa-elements).
There is a black screen shown, when I cancel the taken photo on the picture-verify screen.

Questions:

  1. Can I fix the plugin on my own, or do I have to wait for another version?
  2. Can I anyhow change the UI of the camera-plugin
  3. I’m right with the assumption, that if I would create a capacitor-plugin (for the platforms ios, android)
    I need to write specific swift-code (for ios-platform) and java-code (for andoid-platform)?

Thanks for any help.

Regards,
Oliver

Google Analytics - which plugin?

Draw over other Apps

$
0
0

How to draw over other Apps in ionic 4. I want my app will show overall other apps also in ios using ionic 4. please help me. Thanks in Advance

Printer stops printing

$
0
0

Last evening when I was trying to print, all of a sudden my printer starts showing printer driver is unavailable.I had no idea why did this happen.I have even tried several methods to fix it but not able to achieve any success.Can anyone help me with the ways to fix this probem.I need the help asap.

Live update of an app?

WKWebView in Ionic

$
0
0

Hello,

I am brand new to Ionic and app development in general and I am trying to setup my project to use WKWebView. I ran the command ionic cordova plugin add cordova-plugin-ionic-webview --save
to add it to my project and it seemed to go through correctlly, but my question is how would I actually add the webview to one of my pages in the app.

Thanks,

Ionic Camera Restarts App

$
0
0

anyone has tried the background-mode plugin?. there is a FINAL solution?


ERR_CLEARTEXT_NOT_PERMITTED in debug app on Android

$
0
0

It Worked ! ,thanks buddy ,i just signup to say thanks a lot ,wish you all the best

[iOS] Space in ionic app name not showing on home screen

Service not performing as singleton despite provided in root

$
0
0

Hi,

I am having a problem with my service not performing as a singleton. It is shared between a page and another component used in a separate page, however, the constructor within the service is performed when I open both pages, and the data between the two is not the same, presumably because there is a new instance of the service per page. I have looked through all the solutions to this issue but none have worked for me.

My code is below:

import { Injectable } from '@angular/core';

import { Observable, of, Subject, ReplaySubject, BehaviorSubject } from 'rxjs';

import { catchError } from 'rxjs/operators';

import { HttpClient, HttpHeaders } from '@angular/common/http';

import { environment } from 'src/environments/environment';

@Injectable({

providedIn: 'root'

})

export class ContentService { service code }
import { Component, OnInit } from '@angular/core';

import data from '../../data/mock-cons.json';
import { ContentService } from '../services/content.service.js';

@Component({
  selector: 'app-detail',
  templateUrl: './detail.page.html',
  styleUrls: ['./detail.page.scss'],
})
export class DetailPage implements OnInit {
  name: string;
  file: any;
  currentView = 'overview';

  constructor(public contentService: ContentService) {
    // this.name = data[0].name;
  }

  ngOnInit() {
    // this.contentService.returnCurrentFile();
    console.log(this.contentService.selectedFile);
  }

  changeView(view) {
    this.currentView = view;
  }
}

import { Component, OnInit, Input } from '@angular/core';
import { Router } from '@angular/router';
import { LoadingController } from '@ionic/angular';
import { ContentService } from 'src/app/services/content.service';

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

  @Input() data: any;
  currentFile: any;

  constructor(public loadingController: LoadingController, public contentService: ContentService) { }

  ngOnInit() {}

  async navigateToFile() {
    this.contentService.selectedFile = this.data;
    
  }
}

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { RouteReuseStrategy } from '@angular/router';
import { HttpClientModule } from '@angular/common/http';

import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
import { SplashScreen } from '@ionic-native/splash-screen/ngx';
import { StatusBar } from '@ionic-native/status-bar/ngx';

import { AppRoutingModule } from './app-routing.module';
import { AppComponent } from './app.component';
import { ListPageModule } from './list/list.module';
import { ContentService } from './services/content.service';
import { CommonComponentsModule } from './common-components/common-components.module';


@NgModule({
  declarations: [AppComponent],
  entryComponents: [],
  imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule, ListPageModule, HttpClientModule],
  providers: [
    StatusBar,
    SplashScreen,
    ContentService,
    { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
  ],
  bootstrap: [AppComponent]
})
export class AppModule {}

Any help with why my service is not persisting between components would be great!

Thanks

App Update Plugin

$
0
0

I am trying to use the ionic app update plugin in my app.
I have created an update.xml file and put it on the server. the contents of the file are

<update>
	<version>19</version>
	<name>My App Name</name>
	<url>https://my.hosting-site.com/app_updater/app-debug.apk</url>
</update>

In my app’s config.xml file i have set version=“1.1.1” and android-versionCode=“18”.
Now in my app.component.ts file after platform ready is called I put in the following updater code

this.appUpdate.checkAppUpdate(updateUrl).then((update) => {
     console.log('update: ', update);
     console.log('app update available');
 }).catch((error) => {
     console.log('error: ', error);
 });

Whenever I run the app on my device it is always showing the error as

error:  Object { code: 301, msg: "version resolve fail" }

What i am doing wrong ?
Thanks in advance

Need help while trying to run ng serve

$
0
0

hello i bought the ionappfull4pro

i get an issue when trying to run ng serve :

Your global Angular CLI version (6.0.0) is greater than your local

version (1.6.8). The local Angular CLI version is used.

To disable this warning use “ng config -g cli.warnings.versionMismatch false”.

** NG Live Development Server is listening on localhost:4200, open your browser on http://localhost:4200/ **

Date: 2020-01-21T18:05:55.139Z e Hash: 4ee1eb888845e334316a

Time: 26447 ms

chunk { inline } inline.bundle.js (inline) 5.79 kB [entry] [rendered]

chunk { main } main.bundle.js (main) 2.93 kB [initial] [rendered]

chunk { polyfills } polyfills.bundle.js (polyfills) 636 bytes [initial] [rendered]

chunk { styles } styles.bundle.js (styles) 1.17 MB [initial] [rendered]

chunk { vendor } vendor.bundle.js (vendor) 854 kB [initial] [rendered]

ERROR in src/app/config/config.ts(8,3): error TS1005: ‘,’ expected.

webpack: Failed to compile.

please some one can help me tell ?, your sincerely :slight_smile:

Viewing all 228529 articles
Browse latest View live


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