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

SQLIte doesn't fully remove items after remove is called

$
0
0

@ctfrancia wrote:

cross post.

private async removeItem(key = 'foo'): Promise<void> {
  await this.storage.remove(key);
}

then later:

private async getItems(key = 'foo'): Promise< string[] | null> { 
  return await this.storage.get(key);
}

the return value is a partial array of what was previously in foo. I have to call remove() twice for it to be completely removed…
for example:

private async removeItem(key = 'foo'): Promise<void> {
  await this.storage.remove(key);
  await this.storage.remove(key);
}

only then will all items be deleted.

Posts: 1

Participants: 1

Read full topic


Execution failed for task ':app:compileDebugJavaWithJavac'. > Compilation failed; see the compiler error output for details

$
0
0

@RanaPratap wrote:

error: cannot find symbol
.getSystemService(this, KeyguardManager.class);
^
symbol: method getSystemService(BiometricActivity,Class)
location: class ContextCompat
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:compileDebugJavaWithJavac’.

Compilation failed; see the compiler error output for details.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get
    full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 5s

Task :app:compileDebugJavaWithJavac FAILED
24 actionable tasks: 1 executed, 23 up-to-date
E:\IONIC\Walkin\platforms\android\gradlew: Command failed with exit code 1 Error output:
E:\IONIC\Walkin\platforms\android\app\src\main\java\de\niklasmerz\cordova\biometric\BiometricActivity.java:89: error: cannot find symbol
.getSystemService(this, KeyguardManager.class);
^
symbol: method getSystemService(BiometricActivity,Class)
location: class ContextCompat
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:compileDebugJavaWithJavac’.

Compilation failed; see the compiler error output for details.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get
    full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 5s
[ERROR] An error occurred while running subprocess cordova.

    cordova.cmd build android --device exited with exit code 1.

    Re-running this command with the --verbose flag may provide more information.

I need help for this

Posts: 1

Participants: 1

Read full topic

Read capacitor config

$
0
0

@Clickaplicaciones wrote:

Hello,
I am testing capacitor and I find that with the Device plugin you can access important data of the device and the version of the app but I cannot access the name or the package name of the app.
Could someone tell me how to access the capacitor.config.json or how to get the name and package name?

Thanks in advance

Posts: 1

Participants: 1

Read full topic

Cannot use firebase plugin

$
0
0

@srterry wrote:

Hi everyone, I’m using Ionic5 and trying to use firebase. I’ve followed more than 10 tutorials about how to do it, without success(eg: https://www.freecodecamp.org/news/how-to-get-push-notifications-working-with-ionic-4-and-firebase-ad87cc92394e/). I can run project but when I try to generate the apk, stops building.

 What went wrong:
Failed to capture fingerprint of input files for task ':app:preDebugBuild
> In project 'app' a resolved Google Play services library dependency dep
  1]", but isn't being resolved to that version. Behavior exhibited by th

  Dependency failing: com.google.firebase:firebase-messaging:19.0.1 -> co
  base-iid version was 20.0.2.

  The following dependencies are project dependencies that are direct or 
  ifact with the issue.
  -- Project 'app' depends onto com.google.firebase:firebase-messaging@19
  -- Project 'app' depends onto com.google.android.gms:play-services-meas
  -- Project 'app' depends onto com.google.android.gms:play-services-tagm
  -- Project 'app' depends onto com.google.firebase:firebase-perf@18.+
  -- Project 'app' depends onto com.google.firebase:firebase-iid@20.0.2
  -- Project 'app' depends onto com.google.firebase:firebase-core@17.+
  -- Project 'app' depends onto com.google.firebase:firebase-core@17.2.3

I’ve used ionic cordova plugin add cordova-plugin-firebase, ionic cordova plugin add cordova-plugin-firebase-lib. Can’t get it work. Any help?

Posts: 1

Participants: 1

Read full topic

How to go full-screen for electron and Android builds

$
0
0

@sikfreeze wrote:

Hi there,

I just started to dig in to capacitor to create my application for Android and Windows Desktop. However, I need my application to start full-screen on both platforms, 100% no status bar, tool bar, etc. Is that possible with capacitor?

Thanks

Posts: 1

Participants: 1

Read full topic

How to display particular row of Json Data in ionic 4

$
0
0

@PrasanthPFA wrote:

I have a JSON Data like below:

items=[{“1”:20,“2”:10,“3”:15,“4”:11,“5”:9,“6”:10,“7”:6,“8”:8,“9”:12,“10”:0,“11”:0,“12”:0,“13”:0,“14”:0},{“1”:18,“2”:11,“3”:11,“4”:3,“5”:11,“6”:18,“7”:10,“8”:5,“9”:7,“10”:0,“11”:0,“12”:0,“13”:0,“14”:0},{“1”:12,“2”:13,“3”:13,“4”:25,“5”:15,“6”:12,“7”:29,“8”:17,“9”:15,“10”:0,“11”:0,“12”:0,“13”:0,“14”:0},{“1”:51,“2”:27,“3”:23,“4”:26,“5”:28,“6”:57,“7”:39,“8”:41,“9”:24,“10”:0,“11”:0,“12”:0,“13”:0,“14”:0},{“1”:15,“2”:22,“3”:19,“4”:14,“5”:13,“6”:20,“7”:15,“8”:22,“9”:24,“10”:0,“11”:0,“12”:0,“13”:0,“14”:0},{“1”:0,“2”:0,“3”:0,“4”:0,“5”:0,“6”:0,“7”:0,“8”:0,“9”:0,“10”:0,“11”:0,“12”:0,“13”:0,“14”:0}]

I want to show like this below

image

But only the first two rows data I can show from that. I want to show the remaining data in the second and third card.
I have used Pipe for this.

keys.pipe.ts:

import { Pipe, PipeTransform } from '@angular/core';

@Pipe({
  name: 'keys'
})
export class KeysPipe implements PipeTransform {
  transform(value: any, ...args: any[]): any {
    return Object.keys(value);
  }
}

This is my code:


<ion-card *ngFor="let machine of userMcData">
        <ion-card-header>
          <div>
              <span class="alignleft">{{machine.MCNAME}}</span>
            </div>
       </ion-card-header>
        <ion-card-content>
          <ion-grid>
            <ion-row *ngFor="let item of items">
              <ion-col *ngFor="let list of item | keys">
                {{item[list]}}
              </ion-col>
            </ion-row>
          </ion-grid>
        </ion-card-content>
      </ion-card>

Kindly someone help. Thnaks in Advance.

Posts: 1

Participants: 1

Read full topic

[ionic 4] ion-item change with two color dynamicaly

$
0
0

@victorsosa wrote:

HI, I found that cannot overwrite the ionic color property, for example:
[color]="odd ? ‘next’ : ‘light’ "
Ones this is set I cannot have a class selector for example:
[class.selected]=“factura.selected”
To set a second color to the Item base on the status.

By default it start with the color property but ones selected should change to the second color background; It use to work in Ionic 3 and 2.

  <ion-list lines='none'>
    <ion-item *ngFor="let factura of filteredItems | balanceCero; let odd = odd" [color]="odd ? 'next' : 'light' " (click)='select(factura)' [class.selected]="factura.selected">

    </ion-item>

Any ideas on how I can achieve this logic?

Posts: 4

Participants: 2

Read full topic

Why ionic 4 app runs on localhost on device


Accessibility plugin

$
0
0

@pokkertilulv wrote:

I’m having trouble using “Accessibility.speak()” function in Capacitor. It’s supposed to speak a string with a connected screen reader but only works sometimes. I’ve tried it in all sort of ways. It seems to me it gets cut of when the app changes or sets focus to html elements and reads that out instead. One workaround is to use setTimeout but that feels very hacky and equally unpredictable. Any suggestions?

Example code in a test page:

ngOnInit() {
    Accessibility.speak({value: 'This never gets spoken'});
    setTimeout(()=> { 
        Accessibility.speak({value: 'Set time out of 2 seconds. This works!'});
    }, 2000);
}

Tested on an Iphone 7, in a brand new project, running the latest Ionic and Capacitor to date.

Ionic:

Ionic CLI : 5.4.16 (/usr/local/lib/node_modules/ionic)
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 : not installed
native-run (update available: 0.3.0) : 0.2.6

System:

NodeJS : v10.16.0 (/usr/local/bin/node)
npm : 6.9.0
OS : macOS Mojave

Posts: 1

Participants: 1

Read full topic

Ionic modal when app is offline - possible?

$
0
0

@piotrpotera wrote:

Hi,
simple question - is there a way to prepare modal instance ad-hoc and display it via present() method later?

I got situation where user can loose a network connection and then I want to display proper message using modal component but it seems, some additional script is being injected then via WebPack and everything fails when user is offline. :frowning:

Posts: 1

Participants: 1

Read full topic

How to add default values to ion-range with dual knobs

Ionic 5 Segment Button Width not adjusting with label width

$
0
0

@yusac wrote:

<ion-segment value="bookmarks" scrollable>        
    <ion-segment-button value="bookmarks">
      <ion-label>Bookmarks</ion-label>
    </ion-segment-button>
    <ion-segment-button>
      <ion-label>Reading List</ion-label>
    </ion-segment-button>
    <ion-segment-button>
      <ion-label>Shared Links</ion-label>
    </ion-segment-button>
    <ion-segment-button>
      <ion-label>Bookmarks</ion-label>
    </ion-segment-button>
    <ion-segment-button>
      <ion-label>Reading List</ion-label>
    </ion-segment-button>
    <ion-segment-button>
      <ion-label>Shared Links</ion-label>
    </ion-segment-button>                
  </ion-segment>

Screenshot Segment

I have the same code in ionic 4 and it is fine, the segment width adjusting with content.
Is there a solution of this?
Thank you.

Posts: 1

Participants: 1

Read full topic

Ionic White SCreen WebView failed provisional navigation Error: Could not connect to the server

$
0
0

@boazyaarii wrote:

Iam running this command:

ionic cap run ios -l —host=0.0.0.0

Iam getting this:

:zap: WebView failed provisional navigation

:zap: Error: Could not connect to the server.

with a white screen

Any Help?

Posts: 1

Participants: 1

Read full topic

Integrate firebase in ionic/native

$
0
0

@ginilf wrote:

I am trying to build by native app using ionic appFlow in the cloud… howerver i get the following error.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:processDebugGoogleServices’.

File google-services.json is missing. The Google Services Plugin cannot function without it.
Searched Location:
/builds/Henryisthebest/giving/android/app/src/nullnull/debug/google-services.json
/builds/Henryisthebest/giving/android/app/src/debug/nullnull/google-services.json
/builds/Henryisthebest/giving/android/app/src/nullnull/google-services.json
/builds/Henryisthebest/giving/android/app/src/debug/google-services.json
/builds/Henryisthebest/giving/android/app/src/nullnullDebug/google-services.json
/builds/Henryisthebest/giving/android/app/google-services.jso

How do i make by google-services.json file copy into the android/app folder?

Posts: 3

Participants: 2

Read full topic

Ionic + spring build

$
0
0

@Lahur wrote:

Greetings,
I am working on Spring Boot + Maven + Ionic + Cordova project. My Spring project is multi-module and I was wondering if I can somehow connect my Ionic/Cordova project with Spring Boot/Maven project in a way that when I run mvn clean install that it somehow builds Ionic aplication or runs it or anything like that. Im very familiar with both Spring Boot and Ionic and I really dont know if there is any way in which Maven can handle Ionic/Cordova project.
Many thanks🙂

Posts: 2

Participants: 2

Read full topic


Existing React Web Apps to Desktop

$
0
0

@mandolyte wrote:

Based on what I’ve read, it looks like Ionic is not intended to take existing React web apps and re-target them to be a desktop (and offline) application.

To say another way, it appears that an app must be developed using Ionic UI components in order support multiple platform targets. Thus we would have to re-write our apps to take advantage of the Ionic framework.

Can someone just confirm my assessment?

Any links I might have missed are welcomed.

Posts: 1

Participants: 1

Read full topic

[ionic 4] ion-range slider to programatically change all element sizes globally

$
0
0

@Simbaclaw wrote:

What I want to achieve is the following:

Have a settings page where there is an ion-range slider that allows the user to change the size of all elements inside of the app globally. Meaning the entire app will become bigger and thus easier to read for people with bad eyesight.

Meaning if the slider is on the right the size of all elements become bigger.

I’ve tried doing this in ionic 3 with font-size on the html element, which worked there, however when I try to do this in ionic 4 for some reason all the elements stay the same size.

Does this have something to do with the shadow dom?

How would I be able to achieve this same effect in ionic 4?

Please let me know what I can do to achieve this.

Posts: 1

Participants: 1

Read full topic

Visible @interface for 'HWPHello'

$
0
0

@brambati wrote:

Hello, when I try to build on ios the following error appears

can help me, since already thank you

No visible @interface for ‘HWPHello’ declare the selector ‘success: callbackId:’

Ionic:

Ionic CLI : 6.2.1 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 4.11.10
@angular-devkit/build-angular : 0.803.23
@angular-devkit/schematics : 8.1.3
@angular/cli : 8.1.3
@ionic/angular-toolkit : 2.0.0

Cordova:

Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : browser 6.0.0, ios 5.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 21 other plugins)

Utility:

cordova-res (update available: 0.10.0) : 0.9.0
native-run (update available: 0.3.0) : 0.2.8

System:

ios-sim : 8.0.2
NodeJS : v10.16.3 (/usr/local/bin/node)
npm : 6.13.7
OS : macOS Catalina
Xcode : Xcode 11.3.1 Build version 11C504

Posts: 1

Participants: 1

Read full topic

Auto redirect on no activity from a page

$
0
0

@drippinjunkies wrote:

This one has me scratching my head. I am building a menu app to sit on my shop counter so customers can browse when I am busy. I need to redirect all pages to the main start page when there has been no activity on the app for 5 minutes.

I have the redirect working on a page with the following code in my ts file (short timeout just for testing).

I am struggling to find a way to clear the timeout when a user is still using the app but has left the page where this code is sitting. Everything I do seems to be either throwing an error or just not working. Any ideas? Or is there a better way of achieving this?

ngOnInit() {
setTimeout(() => {
this.router.navigate([‘start’]);
}, 10000); //5s
}

Posts: 1

Participants: 1

Read full topic

Ionic + electron, how can I store my data?

$
0
0

@Rihivi wrote:

Hello,
I need to dev an app crossplatform android(tablette)/Windows(PC). To do that I choose to use Ionic framework with Electron. My problem is about the storage of my data, I tryed to use sqlite but it doesn’t work with electron.
Error : (Native: tried accessing the SQLite plugin but Cordova is not available.).
This app needs to work offline without server, so I need to store data in local.

My question : How can I do that ?
With Json file maybe ? But Im not sure its a good idea.

Thanks !

Posts: 1

Participants: 1

Read full topic

Viewing all 70429 articles
Browse latest View live


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