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

Style and animate ion-tab-bar

$
0
0

@rubenmiq wrote:

Is there a way to style the tab component and achieve animation/transition similar to this one?

Should i use angular animations, css transitions, or somekind of SVG animation? Can some one give me some tips that would point me on the right direction?

Thanks.

Posts: 1

Participants: 1

Read full topic


Google Maps. Varios mapas en misma página en ionic v4

$
0
0

@djtenssy wrote:

Hola a tod@s.

Estoy intentando crear un mapa pero que según el id que traiga de la página anterior coge los datos de una db para crear dicho mapa. Cuando se visualiza por primera vez va todo perfecto, pero si vuelvo a la página anterior para seleccionar otro enlace (bien desde el menú o con el botón atrás), los siguientes mapas cogen las coordenadas 0,0. Los datos los coge bien de la db porque el nombre y el id aparecen correctamente en la página del mapa.

He intentado eliminar el mapa para que al volver a entrar lo cree de nuevo, pero sigue cogiendo las coordenadas 0,0. Lo he intentado con:

ionViewDidLeave() {
        this.map.remove();
    }

Os dejo el código por si podéis echarme una mano:

import { Component, OnInit, ViewChild } from '@angular/core';
import { Platform, NavController, LoadingController } from '@ionic/angular';
import { ActivatedRoute } from '@angular/router';
import { GoogleMaps, GoogleMap, GoogleMapsEvent, GoogleMapOptions, CameraPosition, LatLng, MarkerOptions, Marker, GoogleMapsMapTypeId } from "@ionic-native/google-maps";
import { mapStyle } from './mapStyle';
import { HttpClient } from '@angular/common/http';

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

    id: any;
    url = 'https://xxxxxxxxxxxx.xxx/getdatafromid.php?id=';
    dataid: any;
    public titulo: any;
    public descripcion: any;
    public direccion: any;
    public telefono: any;
    public imagen: any;
    public logo: any;
    public web: any;
    public latitud: number;
    public longitud: number;
    style = mapStyle;

    map: GoogleMap;

    constructor(public platform: Platform, public navCtrl: NavController, private route: ActivatedRoute, private googlemapas: GoogleMaps, public http: HttpClient, public loadingController: LoadingController) {}

    ngAfterViewInit() {
        this.platform.ready().then(() => {
            this.loadMap();
        });
    }

    ionViewDidLeave() {
        this.map.remove();
    }

    loadMap() {
        let opciones: GoogleMapOptions = {
            mapType: GoogleMapsMapTypeId.HYBRID,
            controls: {
                compass: false,
                zoom: true,
                myLocationButton: true,
                myLocation: true
            },
            styles: this.style
        };

        let map = GoogleMaps.create('map_canvas_' + this.id, opciones);
        map.one(GoogleMapsEvent.MAP_READY).then((data: any) => {
            let coordinates: LatLng = new LatLng(this.latitud, this.longitud);
            let position = {
                target: coordinates,
                zoom: 18
            };
            map.moveCamera(position);
            let markerOptions: MarkerOptions = {
                position: coordinates,
                icon: "assets/mapa/bar.png",
                title: this.titulo
            };
            const marker = map.addMarker(markerOptions)
                .then((marker: Marker) => {
                    marker.showInfoWindow();
                });
        })
    }

    async getDataid() {
        const loading = await this.loadingController.create({
            message: 'Cargando...'
        });
        await loading.present();
        this.http.get(this.url + this.id).subscribe(data => {
            this.dataid = data;
            loading.dismiss();
            this.titulo = this.dataid[0].titulo;
            this.descripcion = this.dataid[0].descripcion;
            this.direccion = this.dataid[0].direccion;
            this.telefono = this.dataid[0].telefono;
            this.imagen = this.dataid[0].imagen;
            this.logo = this.dataid[0].logo;
            this.web = this.dataid[0].web;
            this.latitud = this.dataid[0].latitud;
            this.longitud = this.dataid[0].longitud;
        })
    }

    ngOnInit() {
            this.id = this.route.snapshot.paramMap.get('id');
            this.getDataid();
    }
}

Gracias y salu2.-

Posts: 1

Participants: 1

Read full topic

http request fails in ionic android 8+

$
0
0

@sandeep51480 wrote:

my ionic 4 HTTP request is not working fine in android 9, but in android < 9 it working perfectly. after debug the app it shows fail status in the network tab. I have added.

<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
            <application android:networkSecurityConfig="@xml/network_security_config" />
            <application android:usesCleartextTraffic="true" />
</edit-config>

and

<widget id="io.ionic.starter" version="1.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">

in config.xml file and change the android:targetSdkVersion

<uses-sdk android:minSdkVersion="19" android:targetSdkVersion="29" />

in AndroidManifest.xml file. but these are also not useable .please help me out in this.

Posts: 1

Participants: 1

Read full topic

404 error is displayed at httprequest.

$
0
0

@dauto wrote:

I’m ionic v4 with https://blog.fliche.net/ionic-4-user-registration-login-tutorial/ and https://blog.fliche.net/laravel-rest-api-passport-authentication-for- I am trying to create a login function referring to ionic-app /.

When debugging with google chrome, “POST http://mydomain.com/laravel-auth-passport/auth/register 404 (Not Found)” is displayed and I can not send the text entered in the form.

I am Japanese, so I can not speak English very much, but would you give me some advice?

Posts: 1

Participants: 1

Read full topic

Tutorial for use Google maps and firebase

$
0
0

@JordanoBaluz wrote:

I’m working in a project using google maps api and firebase and i’m trying to get information passed through a form in inforWindow and save it in Firebase. But i’m new in Ionic and don’t know how to do it. So if anyone know some tutorial or know how i can do it, i’m very grateful.

Posts: 1

Participants: 1

Read full topic

Ionic build failure due to Manifest merger failed

$
0
0

@MervejTTT wrote:

I am trying to build using - ionic Cordova build android but getting an error with the following details from today and was running fine until yesterday-

Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91
is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory).
Suggestion: add ‘tools:replace=“android:appComponentFactory”’ to element at AndroidManifest.xml:5:5-76:19 to override.

Here are the details of my ionic project -
Ionic:

ionic (Ionic CLI) : 4.12.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.1

Cordova:

cordova (Cordova CLI) : 7.1.0
Cordova Platforms : android 8.0.0, ios 4.5.5
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 1.2.1, (and 25 other plugins)

System:

Android SDK Tools : 26.1.1 (/Users/mervejraj/Library/Android/sdk)
NodeJS : v10.15.3 (/usr/local/bin/node)
npm : 6.4.1
OS : macOS Mojave
Xcode : Xcode 10.1 Build version 10B61

Cordova Plugins Info-

clevertap-cordova 2.1.1 “CleverTap”
cordova-clipboard 1.2.1 “Clipboard”
cordova-plugin-advanced-http 1.11.1 “Advanced HTTP plugin”
cordova-plugin-android-permissions 1.0.0 “Permissions”
cordova-plugin-app-version 0.1.9 “AppVersion”
cordova-plugin-camera 4.0.3 “Camera”
cordova-plugin-device 2.0.2 “Device”
cordova-plugin-facebook4 2.5.0 “Facebook Connect”
cordova-plugin-file 6.0.1 “File”
cordova-plugin-file-transfer 1.7.1 “File Transfer”
cordova-plugin-gallery-refresh 1.0.55 “GalleryRefresh”
cordova-plugin-googleplus 5.2.1 “Google SignIn”
cordova-plugin-inappbrowser 2.0.2 “InAppBrowser”
cordova-plugin-ionic-keyboard 2.1.3 “cordova-plugin-ionic-keyboard”
cordova-plugin-ionic-webview 1.2.1 “cordova-plugin-ionic-webview”
cordova-plugin-market 1.2.0 “Market”
cordova-plugin-nativeaudio 3.0.9 “Cordova Native Audio”
cordova-plugin-nativestorage 2.3.2 “NativeStorage”
cordova-plugin-screen-orientation 3.0.1 “Screen Orientation”
cordova-plugin-splashscreen 5.0.2 “Splashscreen”
cordova-plugin-statusbar 2.4.3-dev “StatusBar”
cordova-plugin-tts 0.2.3 “TTS”
cordova-plugin-whitelist 1.3.3 “Whitelist”
cordova-plugin-x-socialsharing 5.4.3 “SocialSharing”
cordova-plugin-x-toast 2.7.2 “Toast”
cordova-replay 0.0.4 “CordovaReplay”
cordova-sqlite-storage 2.6.0 “Cordova sqlite storage plugin”
es6-promise-plugin 4.2.2 “Promise”
ionic-plugin-deeplinks 1.0.17 “Ionic Deeplink Plugin”
onesignal-cordova-plugin 2.4.5 “OneSignal Push Notifications”

Sdk versions -

android:minSdkVersion=“21”
android:targetSdkVersion=“26”

Build Gradle dependencies -

dependencies {
implementation fileTree(dir: ‘libs’, include: ‘*.jar’)
// SUB-PROJECT DEPENDENCIES START
implementation(project(path: “:CordovaLib”))
implementation “com.squareup.okhttp3:okhttp-urlconnection:3.10.0”
implementation “com.android.support:support-v4:24.1.1+”
implementation “com.facebook.android:facebook-android-sdk:4.+”
implementation “com.google.android.gms:play-services-auth:+”
implementation “com.google.android.gms:play-services-identity:+”
implementation “com.onesignal:OneSignal:3.10.3”
implementation “com.google.firebase:firebase-messaging:+”
implementation “com.google.android.gms:play-services-base:+”
implementation “com.android.support:support-v4:28.0.0”
implementation “com.clevertap.android:clevertap-android-sdk:3.4.2”
implementation “com.github.bumptech.glide:glide:4.8.0”
implementation “com.android.support:design:28.0.0”
implementation “com.android.support:appcompat-v7:28.0.0”
// SUB-PROJECT DEPENDENCIES END
}

Posts: 1

Participants: 1

Read full topic

Firebase App unable to Compile on Android with AAPT error

$
0
0

@mzepeda wrote:

All of a sudden my App stopped compiling, I didn´t add any packages or anything new to the code, app is working ok on browser.

This is my ionic info:

@ionic/cli-utils  : 1.19.2
    ionic (Ionic CLI) : 3.20.0

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.2.1
    Cordova Platforms  : android 7.0.0 browser 5.0.4
    Ionic Framework    : ionic-angular 3.9.3

System:

    Android SDK Tools : 26.1.1
    Node              : v8.9.1
    npm               : 5.5.1
    OS                : Windows 10

Environment Variables:

    ANDROID_HOME : C:\Development\android-sdk

Misc:

    backend : pro

And this is the error I´m getting:

:app:processDebugResources
C:\Users\mmzep\.gradle\caches\transforms-1\files-1.1\core-1.0.0.aar\73b4a83ab5e76f20c84a66b1c8444d08\res\values\values.xml:133:5-70: AAPT: error: resource android:attr/fontVariationSettings not found.

C:\Users\mmzep\.gradle\caches\transforms-1\files-1.1\core-1.0.0.aar\73b4a83ab5e76f20c84a66b1c8444d08\res\values\values.xml:133:5-70: AAPT: error: resource android:attr/ttcIndex not found.

C:\Users\mmzep\Desktop\mario\Seven\SevenPassengerApp\platforms\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:95: error: resource android:attr/fontVariationSettings not found.
C:\Users\mmzep\Desktop\mario\Seven\SevenPassengerApp\platforms\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:95: error: resource android:attr/ttcIndex not found.
error: failed linking references.

Failed to execute aapt

com.android.ide.common.process.ProcessException: Failed to execute aapt

        at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:796)
        at com.android.build.gradle.tasks.ProcessAndroidResources.invokeAaptForSplit(ProcessAndroidResources.java:551)
        at com.android.build.gradle.tasks.ProcessAndroidResources.doFullTaskAction(ProcessAndroidResources.java:285)
        at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:109)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)

        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:173)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
        at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
        at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
        at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503)
        at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:482)
        at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79)
        at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:794)
        ... 48 more
Caused by: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
        at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503)
        at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:462)
        at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79)
        at com.android.builder.internal.aapt.v2.QueueableAapt2.lambda$makeValidatedPackage$1(QueueableAapt2.java:179)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        ... 1 more
Caused by: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
        at com.android.builder.png.AaptProcess$NotifierProcessOutput.handleOutput(AaptProcess.java:454)
        at com.android.builder.png.AaptProcess$NotifierProcessOutput.err(AaptProcess.java:411)
        at com.android.builder.png.AaptProcess$ProcessOutputFacade.err(AaptProcess.java:332)
        at com.android.utils.GrabProcessOutput$1.run(GrabProcessOutput.java:104)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Failed to execute aapt

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

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

BUILD FAILED in 11s
 FAILED
38 actionable tasks: 36 executed, 2 up-to-date
(node:6288) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: cmd: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
C:\Users\mmzep\.gradle\caches\transforms-1\files-1.1\core-1.0.0.aar\73b4a83ab5e76f20c84a66b1c8444d08\res\values\values.xml:133:5-70: AAPT: error: resource android:attr/fontVariationSettings not found.

C:\Users\mmzep\.gradle\caches\transforms-1\files-1.1\core-1.0.0.aar\73b4a83ab5e76f20c84a66b1c8444d08\res\values\values.xml:133:5-70: AAPT: error: resource android:attr/ttcIndex not found.

C:\Users\mmzep\Desktop\mario\Seven\SevenPassengerApp\platforms\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:95: error: resource android:attr/fontVariationSettings not found.
C:\Users\mmzep\Desktop\mario\Seven\SevenPassengerApp\platforms\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:95: error: resource android:attr/ttcIndex not found.
error: failed linking references.

Failed to execute aapt
com.android.ide.common.process.ProcessException: Failed to execute aapt
        at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:796)
        at com.android.build.gradle.tasks.ProcessAndroidResources.invokeAaptForSplit(ProcessAndroidResources.java:551)
        at com.android.build.gradle.tasks.ProcessAndroidResources.doFullTaskAction(ProcessAndroidResources.java:285)
        at com.android.build.gradle.internal.tasks.IncrementalTask.taskAction(IncrementalTask.java:109)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$IncrementalTaskAction.doExecute(DefaultTaskClassInfoStore.java:173)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:134)
        at org.gradle.api.internal.project.taskfactory.DefaultTaskClassInfoStore$StandardTaskAction.execute(DefaultTaskClassInfoStore.java:121)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter$1.run(ExecuteActionsTaskExecuter.java:122)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeAction(ExecuteActionsTaskExecuter.java:111)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:92)
        at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:70)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:63)
        at org.gradle.api.internal.tasks.execution.ResolveTaskOutputCachingStateExecuter.execute(ResolveTaskOutputCachingStateExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:88)
        at org.gradle.api.internal.tasks.execution.ResolveTaskArtifactStateTaskExecuter.execute(ResolveTaskArtifactStateTaskExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:54)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
        at org.gradle.api.internal.tasks.execution.CatchExceptionTaskExecuter.execute(CatchExceptionTaskExecuter.java:34)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker$1.run(DefaultTaskGraphExecuter.java:248)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:336)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:328)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.execute(DefaultBuildOperationExecutor.java:197)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:107)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:241)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:230)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.processTask(DefaultTaskPlanExecutor.java:124)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.access$200(DefaultTaskPlanExecutor.java:80)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:105)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker$1.execute(DefaultTaskPlanExecutor.java:99)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.execute(DefaultTaskExecutionPlan.java:625)
        at org.gradle.execution.taskgraph.DefaultTaskExecutionPlan.executeWithTask(DefaultTaskExecutionPlan.java:580)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor$TaskExecutorWorker.run(DefaultTaskPlanExecutor.java:99)
        at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
        at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
        at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503)
        at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:482)
        at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79)
        at com.android.builder.core.AndroidBuilder.processResources(AndroidBuilder.java:794)
        ... 48 more
Caused by: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
        at com.google.common.util.concurrent.AbstractFuture.getDoneValue(AbstractFuture.java:503)
        at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:462)
        at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79)
        at com.android.builder.internal.aapt.v2.QueueableAapt2.lambda$makeValidatedPackage$1(QueueableAapt2.java:179)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        ... 1 more
Caused by: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
        at com.android.builder.png.AaptProcess$NotifierProcessOutput.handleOutput(AaptProcess.java:454)
        at com.android.builder.png.AaptProcess$NotifierProcessOutput.err(AaptProcess.java:411)
        at com.android.builder.png.AaptProcess$ProcessOutputFacade.err(AaptProcess.java:332)
        at com.android.utils.GrabProcessOutput$1.run(GrabProcessOutput.java:104)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Failed to execute aapt

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

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

BUILD FAILED in 11s

Posts: 1

Participants: 1

Read full topic

InvalidValueError: not an instance of HTMLInputElement w/ Ionic 4/5


Invalid file url or no viewer for mime type 'application/pdf'

$
0
0

@fabiogoodbooy wrote:

i try to open pdf file on my app , but i have error invalid file url or no viewer for mime type ‘application/pdf’
i use document viewer plugin and this my code

 const options : DocumentViewerOptions={
      title :'My PDF'
    };
    this.document.viewDocument('www/assets/pdf1.pdf','application/pdf',options);

Posts: 1

Participants: 1

Read full topic

Need help with proxies - Ionic4 + Angular

$
0
0

@Cynosure wrote:

In my scenario, I have a mobile app via Ionic4/Angular and an API server on the web. However, via the API server on the web we are receiving CORS and preflight issues. We don’t have access to allow origins from localhost or open the floodgates to all ‘*’ traffic on the server and are required to proxy through another server.

For instance, the API server we will say is api.clientsserver.com. I need my HTTP requests to go from the mobile app, to a proxy server that we own ourserver.com and be forwarded from there to the client server, and have that return the JSON data to the app from ourserver.com. This is allowed because we are able to whitelist an IP address that we own.

I was under the impression that I could use a proxy to do this by setting my proxy target to ourserver.com along with the original request to api.clientserver.com. After testing, this doesn’t seem to be the case–it’s just forwarding any local calls to an external server in the same way if I were just to rename my HTTP request’s target.

Is there a normalized way for me to forward my traffic from the angular app, to server 1, to be forwarded to server 2, and return the information back to server 1, then back to the mobile app? I literally just need a middle-man.

Otherwise, I think my last option is to build out a separate API on server 2 whihc I hit from the app, then have all those requests forwarded and returned manually via PHP. I really want to avoid this extra work/step as it complicates the process.

Any ideas?

Posts: 1

Participants: 1

Read full topic

Ionic/Storage doesn't remove key/value pairs

$
0
0

@ctfrancia wrote:

  public async deleteConversation(user: Contact): Promise<void> {
    this.conversationStorage.remove(user.id);

    const messages = await this.conversationStorage.get('conversations');
    console.log(messages); //<--nothing deleted
  }
    this.conversationStorage.get('conversations').then((conversation: Conversation): void => {
       if (conversation.id === user.id) {
         delete conversation.id;
       }
     });

still nothing deleted

message.service

export class ChatService {
  private conversationStorage: Storage;
   public constructor () {

    this.conversationStorage = new Storage({
      name: 'messageStorage',
      storeName: '_messageStorage',
    });  // note you can't declare Storage in constructor if you want to create an instance

  }
// the function listed above

Posts: 1

Participants: 1

Read full topic

Build issue - Dex Merge issue

$
0
0

@Mahi1010 wrote:

I’m getting issue follow while taking android build.

Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug’

Task :app:compileDebugNdk NO-SOURCE
Task :app:compileDebugSources
Task :app:mergeDebugShaders
Task :app:compileDebugShaders
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Task :app:generateDebugAssets
Task :CordovaLib:mergeDebugShaders
Task :CordovaLib:compileDebugShaders
Task :CordovaLib:generateDebugAssets
Task :CordovaLib:packageDebugAssets
Task :app:mergeDebugAssets
Task :app:validateSigningDebug
Task :app:signingConfigWriterDebug
Task :app:transformClassesWithDexBuilderForDebug

Task :app:transformDexArchiveWithExternalLibsDexMergerForDebug FAILED
D8: Program type already present: android.support.v4.app.INotificationSideChannel

FAILURE: Build failed with an exception.

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

com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: android.support.v4.app.INotificationSideChannel

  • 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 4s
35 actionable tasks: 33 executed, 2 up-to-date
/Users/panmoh/Documents/mobile-app/platforms/android/gradlew: Command failed with exit code 1 Error output:
Note: /Users/panmoh/Documents/mobile-app/platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemCookieManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
D8: Program type already present: android.support.v4.app.INotificationSideChannel

FAILURE: Build failed with an exception.

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

com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
Learn how to resolve the issue at https://developer.android.com/studio/build/dependencies#duplicate_classes.
Program type already present: android.support.v4.app.INotificationSideChannel

  • 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 4s
[ERROR] An error occurred while running subprocess cordova.

    cordova build android exited with exit code 1.
    
    Re-running this command with the --verbose flag may provide more information.

Note : cordova clean android & remove and add android platform also not working.

Posts: 1

Participants: 1

Read full topic

Mobile application using ionic v4 and google vision, how to connect?

$
0
0

@sinerrgy wrote:

hello, I am making a mobile app using ionic and in the app i am trying to use google vision api. When i open my application in my computer, everything works fine but when i try to use it in devapp aplication that is in my mobile phone, it doesn’t connect with api. How can i fix this?

Posts: 1

Participants: 1

Read full topic

About the capacitor category

Social Share Filename issue on iOS

$
0
0

@wekas wrote:

Hey Guys,

I am using the cordova-plugin-x-socialsharing plugin.
When I social share and send to email via android it uses the subject as the filename and works fine.
When I do the same with iOS it does not use the subject as the filename.

Any idea how I can change the filename in iOS? Is there a way to put a filename in the base64 string perhaps?

Code:

socialShareTimeSheetPdf() {
    this.loadingCtrl
    .create({ keyboardClose: true, message: 'Generating PDF...' })
    .then(loadingEl => {
      loadingEl.present();

      const msg = this.currentTimeSheet.name + ' has sent you a Timesheet for week ending: '
        + moment(this.currentTimeSheet.weekEndingDate).format('dddd DD/MM/YY');
      const fileName = 'timesheet-' + this.currentTimeSheet.name + '-' + moment(this.currentTimeSheet.weekEndingDate).format('DD-MM-YYYY');
      this.generatePdfService.createPdf(this.currentTimeSheet);

      this.generatePdfService.getPdfObj().getBase64((data) => {
        const pdfBase64 = 'data:application/pdf;base64,' + data;
        this.socialSharing.share(msg, fileName, pdfBase64, null);
      });

      loadingEl.dismiss();
    });
  }

Posts: 1

Participants: 1

Read full topic


Ionic 3 (iOS) scrolling error

$
0
0

@craidencool wrote:

@ionic/cli-utils : 1.19.1
ionic (Ionic CLI) : 3.19.1

global packages:

cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1) 

local packages:

@ionic/app-scripts : 3.1.8
Cordova Platforms  : android 7.1.4 ios 4.4.0
Ionic Framework    : ionic-angular 3.9.2

When scrolling on iOS device, some part of ion-list is hidden.

Posts: 1

Participants: 1

Read full topic

Ion-buttons with badges for IONIC 4

$
0
0

@pefe wrote:

hello, currently i’m using ion-tab-button like this to have a “proper” badge on the ion-toolbar
image

        <ion-buttons slot="primary">
            <ion-tab-button (click)="showCart()">
                <ion-icon name="cart"></ion-icon>
                <ion-label>Cart</ion-label>
                <ion-badge color="primary">11</ion-badge>
            </ion-tab-button>
        </ion-buttons>

and it doesn’t feel right to use ion-tab-button i tried using a ion-button with css and the badge gets cut off
image

      <ion-button (click)="showCart()">
        <ion-icon slot="icon-only"
                  name="cart">
        </ion-icon>
        <ion-badge color="primary">11</ion-badge>
      </ion-button>


ion-button {
	ion-badge {
		position: absolute;
		top: -0.2rem;
		right: -0.2rem;
		opacity: 0.9;

		& ~ ion-icon {
			margin-right: 1.2rem;
		}
	}
}

anybody have a working badge for ion-buttons in ion-toolbar?

Posts: 1

Participants: 1

Read full topic

Smooth element resizing, doesn't work properly in Ionic 4

App store rejects Ionic 3 app with activity indicator on iPad

$
0
0

@obinnae wrote:

Yo,
My Ionic 3 app uses Firebase’s phone authentication to login a user. After entering the phone number, then entering the verification code in the next screen, the ‘loading’ indicator shows for a few seconds while it authenticates, then it goes to the home screen.

I submitted the app to the App Store for review, and it got rejected, saying the ‘loading’ indicator remained indefinitely. I can’t replicate the issue on any of my test devices!
They even tested it on an iPad, even though it’s for iPhone only!!

I’ve submitted the Android version to the Play Store with no issues.

Anyone encountered such issue before? How do I resolve this??

Posts: 1

Participants: 1

Read full topic

LoadingController synchronous

$
0
0

@vsbschild wrote:

In Ionic 3 I have used the LoadingController after each button got clicked, so that the button was “blocked” for more requests and the app user can see “the process is working…”. In Ionic 4 the LoadingController is asnychronous. So i can’t use it in this way, any tricks what I could do?

  async presentLoading(text) {
   this.loading = await this.loadingCtrl.create({
      message: text,
      duration: 40000
    });
    await this.loading.present();

    const { role, data } = await this.loading.onDidDismiss();

    console.log('Loading dismissed!');
  }

Posts: 1

Participants: 1

Read full topic

Viewing all 70434 articles
Browse latest View live


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