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

Build Failed(Android) when Firebase plugin installed

$
0
0

@ashokInceptive wrote:

When I install Firebase plugin my project build failed. Firebase is creating an issue in my project but I need Firebase DB. Error should be like this -

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not find any version that matches com.google.android.gms:strict-version-matcher-plugin:[15.0.0, 16.0.0).
  Versions that do not match:
    - 1.2.0
    - 1.1.0
    - 1.0.3
    - 1.0.2
    - 1.0.1
    - + 1 more
  Required by:
      project :app > com.google.gms:google-services:4.3.0

* 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 37s
3 actionable tasks: 1 executed, 2 up-to-date

Please help me to find out the solution.

Thanks.

Posts: 1

Participants: 1

Read full topic


What is June 2019 google broad core algorithm update?

$
0
0

@xenelsoft wrote:

broad core algorithm updates is more focused on improving the search result quality by giving users better search result in SERP.

Broad Core Algorithm Update Clues

Google offered few clues. But here is what we know:

  1. The update was focused on providing better search results
  2. There is nothing wrong with sites that lost rankings
  3. There is no way to “fix” sites that lost rankings
  4. The improvements are focused on the content but it is not a “quality” issue

For more information you can visit here: June 2019 Core Update

Posts: 1

Participants: 1

Read full topic

Error: Navigation Problem

Add aar file to cordova plugin

$
0
0

@Moonlight448 wrote:

hi
i want add my custom plugin with java file and aar file
but error “Could not find :testaar2-debug”

the testaar2-debug.gradle is:

 repositories{
   jcenter()
   flatDir{
    dirs 'libs'
   }
   }
  dependencies {
   compile(name:'testaar2-debug', ext:'aar')
   }
 android {
    packagingOptions {
      exclude 'META-INF/NOTICE'
      exclude 'META-INF/LICENSE'
    }
 }

the plugin.xml is:

<?xml version='1.0' encoding='utf-8'?>
<plugin id="cordova-android-toast" version="1.0.0" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
    <name>AndroidToast</name
    <description>Android Toast Plugin</description>
    <license>Apache 2.0</license>
    <keywords>android, toast</keywords>

    <engines>
      <engine name="cordova" version=">=3.0.0" />
    </engines>

    <js-module name="AndroidToast" src="www/AndroidToast.js">
        <clobbers target="AndroidToast" />
    </js-module>

    <platform name="android">
        <config-file target="res/xml/config.xml" parent="/*">
            <feature name="AndroidToast.java">
                <param name="android-package" value="AndroidToast.java" />
            </feature>
        </config-file>
        <source-file src="src/android/AndroidToast.java" target-dir="src/com/android-toast" />
        <framework src="src/android/testaar2-debug.gradle" custom="true" type="gradleReference" />
        <resource-file src="src/android/testaar2-debug.aar" target="libs/testaar2-debug.aar" />
    </platform>

</plugin>

the AndroidToast.java is:

package com.nikolabreznjak;

import org.apache.cordova.CordovaPlugin;
import org.apache.cordova.CallbackContext;
import org.json.JSONArray;
import org.json.JSONObject;
import org.json.JSONException;
import android.content.Context;
import android.widget.Toast;
import com.example.hpz420.testaar.TestAar;


public class AndroidToast extends CordovaPlugin {
    @Override
    public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException {
        if ("show".equals(action)) {
            show(args.getString(0), callbackContext);
            return true;
        }

        return false;
    }

    private void show(String msg, CallbackContext callbackContext) {
          TestAar test = new TestAar();
         try {
             String str = test.showStr(msg);
             Toast.makeText(webView.getContext(), msg  , Toast.LENGTH_LONG).show();
         } catch (JSONException e) {
             e.printStackTrace();
         }
    }
}

please help me

Posts: 1

Participants: 1

Read full topic

Subscribe to hardware backbutton on android does not work anymore

$
0
0

@shorstmann wrote:

Hi,

subscribing to the hardware backbutton seems to not work anymore after i used “npm update” inside my procect. Even the first log that the button was pressed will not be shown in the console.

in my app.component.ts after deviceready i subscribe to it like the following:

this.platform.ready().then(() => {
..some code before
// active hardware back button
        this.backButtonEvent();
});

The function i use for backButton to handle different events

// active hardware back button
    backButtonEvent() {
        console.log('activate backButton...');
        this.platform.backButton.subscribe(async () => {
            console.log('BackButton pressed');

            // close action sheet
            try {
                const element = await this.actionSheetCtrl.getTop();
                if (element) {
                    console.log('actionSheet close');
                    element.dismiss();
                    return;
                }
            } catch (error) {
            }

            // close popover
            try {
                const element = await this.popoverCtrl.getTop();
                if (element) {
                    console.log('popoverCtrl close');
                    element.dismiss();
                    return;
                }
            } catch (error) {
            }

            // close modal
            try {
                const element = await this.modalCtrl.getTop();
                console.log('ChangePasswordModalIsClosable:', this.global.isChangePasswordModalClosable());


                    //wenn true darf jeder Modal geschlossen werden
                    if (element) {
                        if (this.global.isChangePasswordModalClosable()) {
                            console.log('modalCtrl close');
                            element.dismiss({cancelledModal: true});
                            return;
                        }
                        else{
                            console.log('modalCtrl no close');
                            return ;
                        }
                    }
            } catch (error) {
                console.log(error);
            }

            // close side menu
            try {
                const element = await this.menu.getOpen();
                if (element) {
                    console.log('sideMenu close');
                    this.menu.close();
                    return;
                }
            } catch (error) {
            }

            this.routerOutlets.forEach((outlet: IonRouterOutlet) => {
                console.log("routerOutlets");
                console.log(this.router.url);
                if (outlet && outlet.canGoBack()) {
                    console.log('outlet pop');
                    outlet.pop();

                } else if (this.router.url === '/menu/tabs/dashboard' || this.router.url === '/login') {
                    if (new Date().getTime() - this.lastTimeBackPress < this.timePeriodToExit) {
                        navigator['app'].exitApp(); // work in ionic 4
                    } else {
                        this.alertProvider.presentToast('PRESS_AGAIN_TO_EXIT_APP');
                        this.lastTimeBackPress = new Date().getTime();
                    }
                } else {
                    console.log("routerOutlets else")
                    this.navController.pop();
                }
            });
        });
    }

Have there been any changes?

Posts: 2

Participants: 1

Read full topic

Some ui component not work after update

$
0
0

@dfertane wrote:

hi there,

i have updated all my ionic project and i encounter strange render in some component.
i compiled with gradle v5.x, android sdk is 19 from 28.

  • Strange render 1 example with ion-label and ion-input:
    Capture2
// from standard ionic code with angular formcontrol name

<ion-item class="input_type">
      <ion-label floating>type</ion-label>
      <ion-input formControlName="type" type="text" [(ngModel)] {etc ...} </ion-input>
</ion-item>

Notes:

  • no personal css added
  • any input text can be enter, i can’t see them cause they don’t exist :sob:
  • any error and warning in browser


  • Strange render 2 example with ion-select
    Capture
// code from ionic-select documentation
<ion-label>Gender</ion-label>
      <ion-select placeholder="Select One">
      <ion-select-option value="f">Female</ion-select-option>
      <ion-select-option value="m">Male</ion-select-option>
</ion-select>

Notes:

  • no personal css added except border, width and height
  • without this fiew css it’s just the same render but it’s mini-small
  • any error and warning in browser


  • Other Informations :

I think angular version don"t match the newer but i don"t really know :grimacing: it’s juste a (bad) supposition

Like said i have tried to update all and i don’t really know if versions match together, this is my ionic info and my package.json.

  • IONIC INFO :

Ionic:

ionic (Ionic CLI) : 4.1.2 (\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : ionic-angular 3.9.8
@ionic/app-scripts : 3.2.4

Cordova:

cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.0.0, browser 5.0.4
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.0.0, (and 22 other plugins)

System:

Android SDK Tools : 26.1.1 (\android-sdk)
NodeJS : v10.11.0 (nodejs\node.exe)
npm : 6.4.1
OS : Windows 10


  • PACKAGE.JSON

“dependencies”: {
@angular/animations”: “5.2.11”,
@angular/common”: “5.2.11”,
@angular/compiler”: “5.2.11”,
@angular/compiler-cli”: “5.2.11”,
@angular/core”: “5.2.11”,
@angular/forms”: “5.2.11”,
@angular/http”: “5.2.11”,
@angular/platform-browser”: “5.2.11”,
@angular/platform-browser-dynamic”: “5.2.11”,
@ionic-native/status-bar”: “^5.10.0”,
@ionic/lab”: “^1.0.11”,
@ionic/storage”: “^2.2.0”,
“async”: “^2.6.1”,
“cordova-android”: “^7.0.0”,
“cordova-browser”: “5.0.4”,
“cordova-plugin-ionic-webview”: “^2.0.0”,
“cordova-plugin-statusbar”: “^2.4.2”,
“ionic-angular”: “3.9.8”,
“ionicons”: “3.0.0”,
“rxjs”: “5.5.11”,
“sw-toolbox”: “3.6.0”,
“ts-md5”: “^1.2.4”,
“zone.js”: “0.8.26”
},
“devDependencies”: {
@ionic/app-scripts”: “3.2.4”,
“typescript”: “~2.6.2”
},


  • Could u confirm me if these versions(ionic, cordova, angular) work together please ?

  • Maybe do u have some indication about UI bug i encounter please too ?

have a nice day,

Didier.f

Posts: 1

Participants: 1

Read full topic

Unique forms url

$
0
0

@jschneiderPatinfo wrote:

Hi,

It’s not really related to Ionic but i’m using ionic/angular to develop a survey. I’m looking for a solution to create a unique url access to this survey (with user credentials) to allow the user to access this form only once.

Does anybody know a good way to achieve this?

Thanks for your help.

Posts: 1

Participants: 1

Read full topic

Addaptive Icons with cordova-res

$
0
0

@fortunella wrote:

I used cordova-res v0.6.0 to generate adaptive icons. I have an icon.png in /resources and an icon-foreground.png and an icon-background.png in /resources/android.

I create the icons with cordova-res without any parameters. After it is run there are a lot of generated icons in /resources/android/icon:
*-background.png
*-foreground.png
drawable-*-icon.png

And these icons are correctly referenced in config.xml. But when I build my app and install it on my Google Pixel 3 phone (Andorid 9) it still has such a small launcher icon.

Are there any special requirements for icon-foreground.png and icon-background.png for getting a launcher icon that fills the whole icon? I used the “old” icon as foreground icon and a completely white icon in the same size as background icon.

Posts: 1

Participants: 1

Read full topic


Build app for ios

$
0
0

@Pirlo wrote:

Hello, I have develop an app that works perfect in android. But now, I want to build the ios version. I have my developper account for ios. But I dont know how to continue and what to do.

IS there any way of doing without a mac?
anyway. any of you guys, have a tutorial to do it?

thanks.

Posts: 1

Participants: 1

Read full topic

How to create shared modal in ionic 4

How to not build Webpack in Ionic 4

$
0
0

@jmkim wrote:

Hi.
I am developing a hybrid app using Ionic 4.
However, due to the webpack configuration, I do not get the build result file I want to contact.

Is there any way I can turn off the webpack setting when Ionic build starts?

Thank you for your reply.

Posts: 1

Participants: 1

Read full topic

Why geolocation.getCurrentPosition hangs on some devices?

$
0
0

@ioclaudio wrote:

Hi,
I have an Ionic 4 app that uses Geolocation.
On same Android devices (for example One Plus One with Android9) when I call the geolocation.getCurrentPosition() the device asks for the permission to use Geolocation, but when I click on “confirm” it seems that the plugin hangs.
Launching the app in debug mode on the device I can see that, with the following code, on the Chrome console only the first log “Print1”.

	console.log('Print1')
	
    const result = await this.geolocation.getCurrentPosition()
      .then((resp) => {
        console.log('@@@1 Print2', resp);
		.....
    }, (err) => {
      console.log('@@@ Err Print3');
	  ....
	}
	console.log('Print4')

The app doesn’t print the log “Print2” or the log “Prin3” or the log “Print4”.
On the device settings, I can see that the geolocation permission for the app is active.
I can’t see other errors on the Chrome console.

So what could be the problem?

Ionic version:

Ionic:
   Ionic CLI                     : 5.2.1 
   Ionic Framework               : @ionic/angular 4.3.0
   @angular-devkit/build-angular : 0.13.9
   @angular-devkit/schematics    : 7.2.4
   @angular/cli                  : 7.3.8
   @ionic/angular-toolkit        : 1.5.1
Cordova:
   Cordova CLI       : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms : android 8.0.0, ios 5.0.1
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.0, (and 11 other plugins)
Utility:
   cordova-res : 0.6.0
   native-run  : 0.2.2
System:
   Android SDK Tools : 26.1.1 
   NodeJS            : v10.15.3 
   npm               : 6.9.0
   OS                : Windows 10

Installed plugin:

C:\ProveElectron\bitsharingapp>cordova plugin list   
cordova-plugin-camera 4.0.3 "Camera"
cordova-plugin-geolocation 4.0.1 "Geolocation"
cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
cordova-plugin-insomnia 4.3.0 "Insomnia (prevent screen sleep)"
cordova-plugin-ionic-keyboard 2.1.3 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 4.1.0 "cordova-plugin-ionic-webview"
cordova-plugin-ios-disableshaketoedit 1.0.0 "iOS Disable Shake to Edit"
cordova-plugin-mauron85-background-geolocation 3.0.3 "CDVBackgroundGeolocation"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-statusbar 2.4.2 "StatusBar"
cordova-plugin-whitelist 1.3.3 "Whitelist"
phonegap-plugin-barcodescanner 8.0.1 "BarcodeScanner"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-file 6.0.1 "File"

Posts: 1

Participants: 1

Read full topic

Swipe an Drag and drop Ionic react item

Failed to load resource: net::ERR_CLEARTEXT_NOT_PERMITTED

$
0
0

@Harikag wrote:

Hi am facing Failed to load resource: net::ERR_CLEARTEXT_NOT_PERMITTED for my application my target SDK version is 28, whenever am trying to install in latest devices, I am facing this problem. so please help me out. I added this to my network_security_config.xml file

<?xml version="1.0" encoding="utf-8"?> <network-security-config> <debug-overrides> <trust-anchors> <certificates src="user"/> </trust-anchors> </debug-overrides> <base-config cleartextTrafficPermitted="true"> <trust-anchors> <certificates src="system" /> </trust-anchors> </base-config> <domain-config cleartextTrafficPermitted="true"> <domain>localhost</domain> <domain includeSubdomains="true">103.244.230.154:2017</domain> </domain-config> </network-security-config>

Posts: 1

Participants: 1

Read full topic

Amazon Fire OS with ionic4 + capacitor

$
0
0

@cfcosta wrote:

Hi all,

Does anyone has experience on pushing ionic v4 + Capacitor apps to Amazon’s FireOS?

If so did it work?

Posts: 1

Participants: 1

Read full topic


Display: flex has no effect on some (all?) Ionic-elements

$
0
0

@tantebootsy wrote:

Hi there,

setting display:flex for e.g. ion-toolbar or ion-item in V5 doesn’t has an effect. Chrome says the property has been set properly but that seems not the be the case. I think I know how to deal with styling web components and tried different approaches (including ::ng-deep) but with no success. I also can’t override any CSS-variables dealing with “display” as Ionic doesn’t offer one. And btw. I know that there are “slots” but sometimes their not enough for styling some layouts.

Has anybody found a solution for this and/or can explain why this happens?

Cheers,
Michael

Posts: 1

Participants: 1

Read full topic

Ionic Cordova run Android and… Go Store?

$
0
0

@acruma wrote:

My question is basically the title.

Suppose that I already have the application that I have programmed, finished and tested. I just run this command line

ionic cordova run android

then… I’m going to

platforms \ android \ app \ build \ outputs \ apk \ debug \

Rename app-debug.apk and … Ready? Can I upload this APK to Google Store? Or is it necessary to do something else? Or is there any additional good practice that you need?

Posts: 2

Participants: 2

Read full topic

Ionic search filter

$
0
0

@champion007 wrote:

Hi ,

I am looking to build a search for the array list, below is the code used.
The search should be based on po_no used in *ngFor of ion-card, it should only show me the result for po_no search text entered into ion-searchbar if does not match it should hide that ion-card.

<ion-searchbar (ionInput)="filterResult($event)"></ion-searchbar>

<ion-card (click)="orderDetails(p)" *ngFor="let p of posts">
    <ion-card-content>
      <h1 color="primary">{{p.po_no}}</h1>
      <ion-buttons class="arrow-forward">
        <ion-button style="height: 18px;" color="secondary">
          <ion-icon name='arrow-forward'></ion-icon>
        </ion-button>
      </ion-buttons>
      <ion-label>{{p.reference_no}}</ion-label>
      <h2>{{p.invoice_amount}}</h2>
    </ion-card-content>
</ion-card>
async filterResult(event) {
    const searchText = event.target.value.toLowerCase();
    requestAnimationFrame(() => {
      this.posts.forEach((element, index) => {
        const shouldShow = element.po_no.toLowerCase().indexOf(searchText) > -1;
        element[index].style.display = shouldShow ? 'block' : 'none';
      });
    });
}

Posts: 1

Participants: 1

Read full topic

Disable Access To Old Versions Of App

$
0
0

@jonathangrm wrote:

Hi,
I’m currently looking into using Appflow for a new iOS/Android app our development team are working on.
From a release management/configuration management perspective, what would be the best way to remove end user access to an old build? e.g. if we had a major bug in an old release

Maybe there are two aspects to this? 1. Updates made though Appflow hot code updates 2. Update required to the native app within the App Store/Play Store.

Apologies for what I am sure has a simple solution.
Thanks
Jonny

Posts: 1

Participants: 1

Read full topic

Cannot find symbol import com.google.firebase.iid.FirebaseInstanceIdService; ^ symbol: class FirebaseInstanceIdService location: package com.google.firebase.iid

$
0
0

@Harikag wrote:

cannot find symbol
import com.google.firebase.iid.FirebaseInstanceIdService;
^
symbol: class FirebaseInstanceIdService
location: package com.google.firebase.iid

So please help me out, while building apk am getting this issue

Posts: 1

Participants: 1

Read full topic

Viewing all 70435 articles
Browse latest View live


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