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

Attribute application@allowBackup value=(false) from AndroidManifest.xml:4:18-45 is also present at [:barcodescanner:] AndroidManifest.xml:12:9-35 value=(true)

$
0
0

@sumitmanna wrote:

Hi,

I’m trying to set the allowBackup attribute in my app manifest to false but gradle complains with the following error:

Attribute application@allowBackup value=(false) from AndroidManifest.xml:4:18-45 is also present at [:barcodescanner:] AndroidManifest.xml:12:9-35 value=(true). Suggestion: add 'tools:replace="android:allowBackup"' to element at AndroidManifest.xml:4:5-11:19 to override.

To Set allowBackup=false using below line in config.xml file

<platform name="android"> <edit-config file="AndroidManifest.xml" target="/manifest/application" mode="merge"> <application android:allowBackup="false"/> </edit-config> </platform>

I use Barcode Scanner in my app.(Repo: [https://github.com/phonegap/phonegap-plugin-barcodescanner] recommended in https://ionicframework.com/docs/native/barcode-scanner/])

Thanks!

Posts: 1

Participants: 1

Read full topic


Error: Uncaught (in promise): Error: No provider for AngularFireAuth!-----------------

$
0
0

@mahaveer08 wrote:

I am creating an login registration app using AngularFire2 but I am getting Error: Uncaught (in promise): Error: No provider for AngularFireAuth!

Runtime Error
Uncaught (in promise): Error: No provider for AngularFireAuth! Error: No provider for AngularFireAuth! at injectionError (http://localhost:8100/build/vendor.js:1526:90) at noProviderError (http://localhost:8100/build/vendor.js:1564:12) at ReflectiveInjector_.throwOrNull (http://localhost:8100/build/vendor.js:3006:19) at ReflectiveInjector.getByKeyDefault (http://localhost:8100/build/vendor.js:3045:25) at ReflectiveInjector.getByKey (http://localhost:8100/build/vendor.js:2977:25) at ReflectiveInjector.get (http://localhost:8100/build/vendor.js:2846:21) at resolveNgModuleDep (http://localhost:8100/build/vendor.js:9846:25) at NgModuleRef_.get (http://localhost:8100/build/vendor.js:10934:16) at resolveNgModuleDep (http://localhost:8100/build/vendor.js:9846:25) at NgModuleRef_.get (http://localhost:8100/build/vendor.js:10934:16)

What is this error all about?

Posts: 1

Participants: 1

Read full topic

Change ANDROID_PATH on Windows

$
0
0

@magik wrote:

Hello,

I have a problem with build an Android App on windows, when I start ionic cordova build android my console display ANDROID_HOME=C:\Program Files\Android\Android Studio but I want to change a ANDROID_PATH for ANDROID_HOME=C:\Android/Android-sdk

I change this path with my Environnement Variables on a System windows, I change a path on Android Studio, but not is change after start my command :frowning:

It’s possible to change this path ?

Thanks

cyp

Posts: 1

Participants: 1

Read full topic

Error with emulate

$
0
0

@godefroid wrote:

Hi I just create a blank project I didn’t change anything,
I add platform android, and when I run the command
ionic cordova emulate android I get this message
[ERROR] An error occurred while running cordova emulate android (exit code 1).

All the messages on the terminal are

Running app-scripts build: --platform android --target cordova
[07:55:12]  build dev started ...
[07:55:13]  clean started ...
[07:55:13]  clean finished in 3 ms
[07:55:13]  copy started ...
[07:55:13]  deeplinks started ...
[07:55:13]  deeplinks finished in 19 ms
[07:55:13]  transpile started ...
[07:55:15]  transpile finished in 2.33 s
[07:55:15]  preprocess started ...
[07:55:15]  preprocess finished in less than 1 ms
[07:55:15]  webpack started ...
[07:55:15]  copy finished in 2.46 s
[07:55:22]  webpack finished in 7.43 s
[07:55:22]  sass started ...
[07:55:23]  sass finished in 985 ms
[07:55:23]  postprocess started ...
[07:55:23]  postprocess finished in 7 ms
[07:55:23]  lint started ...
[07:55:23]  build dev finished in 10.88 s
> cordova emulate android
[07:55:26]  lint finished in 2.36 s
ANDROID_HOME=/Users/gillesgodefroid/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home
Starting a Gradle Daemon (subsequent builds will be faster)

:wrapper


BUILD SUCCESSFUL

Total time: 8.299 secs
Subproject Path: CordovaLib
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details

The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
	at build_8kqdndo9vqvve12axgld7tbu6.run(/Users/gillesgodefroid/Documents/Ionic2Do/platforms/android/build.gradle:141)
Download https://jcenter.bintray.com/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.pom

Download https://jcenter.bintray.com/xerces/xercesImpl/2.9.1/xercesImpl-2.9.1.jar

The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.

Incremental java compilation is an incubating feature.

The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.

:preBuild

UP-TO-DATE
:preDebugBuild
 UP-TO-DATE
:checkDebugManifest

:CordovaLib:preBuild

UP-TO-DATE
:CordovaLib:preDebugBuild

UP-TO-DATE
:CordovaLib:checkDebugManifest

:CordovaLib:prepareDebugDependencies

:CordovaLib:compileDebugAidl

:CordovaLib:compileDebugNdk

UP-TO-DATE
:CordovaLib:compileLint

:CordovaLib:copyDebugLint
 UP-TO-DATE
:CordovaLib:mergeDebugShaders

:CordovaLib:compileDebugShaders

:CordovaLib:generateDebugAssets

:CordovaLib:mergeDebugAssets

:CordovaLib:mergeDebugProguardFiles

:CordovaLib:packageDebugRenderscript

UP-TO-DATE
:CordovaLib:compileDebugRenderscript

:CordovaLib:generateDebugResValues

:CordovaLib:generateDebugResources

:CordovaLib:packageDebugResources

:CordovaLib:processDebugManifest

:CordovaLib:generateDebugBuildConfig

:CordovaLib:processDebugResources

:CordovaLib:generateDebugSources

:CordovaLib:incrementalDebugJavaCompilationSafeguard

:CordovaLib:compileDebugJavaWithJavac

:CordovaLib:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
Note: Some input files use or override a deprecated API.

Note: Recompile with -Xlint:deprecation for details.
:CordovaLib:processDebugJavaRes
 UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForDebug

:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug

:CordovaLib:mergeDebugJniLibFolders

:CordovaLib:transformNative_libsWithMergeJniLibsForDebug

:CordovaLib:transformNative_libsWithSyncJniLibsForDebug

:CordovaLib:bundleDebug

:prepareOrgApacheCordovaCordovaLib630DebugLibrary

:prepareDebugDependencies

:compileDebugAidl

:compileDebugRenderscript

:generateDebugBuildConfig

:generateDebugResValues

:generateDebugResources

:mergeDebugResources

:processDebugManifest

:processDebugResources

:generateDebugSources
:incrementalDebugJavaCompilationSafeguard

:compileDebugJavaWithJavac

:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:compileDebugNdk
 UP-TO-DATE
:compileDebugSources
:mergeDebugShaders

:compileDebugShaders

:generateDebugAssets

:mergeDebugAssets

:transformClassesWithDexForDebug

:mergeDebugJniLibFolders

:transformNative_libsWithMergeJniLibsForDebug

:processDebugJavaRes

UP-TO-DATE
:transformResourcesWithMergeJavaResForDebug

:validateSigningDebug

:packageDebug

:assembleDebug

:cdvBuildDebug


BUILD SUCCESSFUL


Total time: 38.614 secs
Built the following apk(s):
	/Users/gillesgodefroid/Documents/Ionic2Do/platforms/android/build/outputs/apk/android-debug.apk

ANDROID_HOME=/Users/gillesgodefroid/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home
Error: Cannot read property 'replace' of undefined

[ERROR] An error occurred while running cordova emulate android (exit code 1).

the ionic info is

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.15.0
ionic (Ionic CLI) : 3.15.0

global packages:

cordova (Cordova CLI) : 7.1.0

local packages:

@ionic/app-scripts : 3.0.1
Cordova Platforms  : android 6.3.0 ios 4.5.2
Ionic Framework    : ionic-angular 3.7.1

System:

ios-sim : 6.1.2
Node    : v8.7.0
npm     : 5.4.2
OS      : macOS Sierra
Xcode   : Xcode 9.0.1 Build version 9A1004

Environment Variables:

ANDROID_HOME : not set

Misc:

backend : pro

Posts: 1

Participants: 1

Read full topic

Push new value to an existing storage object in ionic 3

$
0
0

@luden wrote:

I’d like to add/push a new value to an existing storage object in Ionic 3.

Is there a specific update storage function or do i have to make it myself ?

Regards

Frank

Posts: 1

Participants: 1

Read full topic

ngOnInit is not invoked when tab is clicked

$
0
0

@schmidy wrote:

I have a tabs app. When I click on a tab, is does not invoked the ngOnInit on the page associated with that tab.

I think this relates to:

but I don’t understand how to implement the fix in that post.

Please help.

Posts: 1

Participants: 1

Read full topic

My ionic app is taking too long (nearly 47sec) to load

$
0
0

@siva0409 wrote:

my ionic info is and plugins used are:

cli packages: (C:\Users\DELL\AppData\Roaming\npm\node_modules)

@ionic/cli-utils  : 1.12.0
ionic (Ionic CLI) : 3.12.0

global packages:

cordova (Cordova CLI) : 7.0.1

local packages:

@ionic/app-scripts : 2.1.4
Cordova Platforms  : android 6.2.3
Ionic Framework    : ionic-angular 3.6.1

System:

Node : v6.11.3
npm  : 5.4.2
OS   : Windows 8.1

Misc:

backend : legacy

cordova-plugin-compat 1.0.0 "Compat"
cordova-plugin-device 1.1.4 "Device"
cordova-plugin-geolocation 2.4.3 "Geolocation"
cordova-plugin-splashscreen 4.0.3 "Splashscreen"
cordova-plugin-statusbar 2.2.2 "StatusBar"
cordova-plugin-whitelist 1.3.1 "Whitelist"
ionic-plugin-keyboard 2.2.1 “Keyboard”

help me to reduce the loading time
am testing on moto x play with 7.1.1 android version with 2GB RAM

Posts: 2

Participants: 2

Read full topic

Ionic slides loop does not refresh properly when going from last to first or first to last

$
0
0

@mvrm wrote:

I want to make a “continuous” slider in Ionic 3.

I use 3 slides and update the content on each slide action. This works, though when swiping the last slide and looping back to the first, the content of the newly shown slide is not correct: all static data is shown, but all dynamic (bound) data is not shown. You need to initiate a new swipe action (just drag the page a tiny bit) to get the data shown.

This issue is not solved by Ion-slides loop (slideChangeStart) doesn't work on first slide from last slide.

See this plunker as an example of the issue:

This is the view:

<ion-content padding>
    slides:
    <ion-slides loop="true" (ionSlideDidChange)="slideChanged($event)">
        <ion-slide>
            0 {{data[0]?.title}}
        </ion-slide>
        <ion-slide>
            1 {{data[1]?.title}}
        </ion-slide>
        <ion-slide>
           2 {{data[2]?.title}}
        </ion-slide>
    </ion-slides>
</ion-content>

This is the controller:

import { Component } from '@angular/core'; import { NavController } from 'ionic-angular';

@Component({
  selector: 'page-home',
  templateUrl: 'app/home.page.html'
})
export class HomePage {

  appName = 'Ionic App';

    slides: Slides;

    public data: MonthViewData[] = [];

    public date = new Date(Date.now());

    monthNames = ["January", "February", "March", "April", "May", "June",
        "July", "August", "September", "October", "November", "December"
    ];

    constructor() {
        this.data.push({title:'t0'});
        this.data.push({title:'t1'});
        this.data.push({title:'t2'});
    }

    slideChanged(slides: Slides) {
        this.slides = slides;
        return new Promise((resolve, reject) => {
            let scrollToNext = this.slides.getActiveIndex() > this.slides.getPreviousIndex();
            console.log(this.slides.getActiveIndex(), this.slides.getPreviousIndex());
            let currentSlideIndex: number = this.slides.getActiveIndex() - 1;
            if (currentSlideIndex > 2) {
                currentSlideIndex = 0;
            }
            if (currentSlideIndex < 0) {
                currentSlideIndex = 2;
            }
            let previousSlideIndex = currentSlideIndex - 1;
            let nextSlideIndex = currentSlideIndex + 1;
            if (previousSlideIndex < 0) {
                previousSlideIndex = 2;
            }
            if (nextSlideIndex > 2) {
                nextSlideIndex = 0;
            }
            if (this.slides.getActiveIndex() == 1 && this.slides.getPreviousIndex() == 0) {
                this.date = new Date(Date.now());
            } else {
                if (scrollToNext) {
                    this.date.setMonth(this.date.getMonth() + 1);
                } else {
                    this.date.setMonth(this.date.getMonth() - 1);
                }
            }
            console.log('active month', this.date);
            console.log('indexes', previousSlideIndex, '->', currentSlideIndex, '->', nextSlideIndex);
            this.data[currentSlideIndex].title = this.monthNames[this.date.getMonth()] + ' ' + this.date.getFullYear();
            this.data[previousSlideIndex].title = this.monthNames[this.date.getMonth() - 1] + ' ' + this.date.getFullYear();
            this.data[nextSlideIndex].title = this.monthNames[this.date.getMonth() + 1] + ' ' + this.date.getFullYear();
        })
    }
}

How can I get this right?

Thanks!

Posts: 1

Participants: 1

Read full topic


Support for IE11?

$
0
0

@mingzwork wrote:

We are trying use one code base for both mobile app and web app, but we need to support IE 11 and up. I understand phone native features will not work, but many of the IONIC UI component are also not working in IE 11, is there any polyfill we can use to make it all the component run in IE11? Is there future plan to support IE browsers? What about stencil? Would stencil built component support IE11 in the future?

Thanks.

Posts: 1

Participants: 1

Read full topic

How read the extensions .ts in ionic

Ionic sqlite db acess globally

Error in senderID angularfire notification

$
0
0

@harniel1 wrote:

HI everyone, i want to make push notif in my ionic 2 project and when i follow the instruction, i get this error.
in adding the senderID in my app.component.ts

app.component.ts
image

error!:

what should i do, any suggestions? or advice? is a great help thanks :slight_smile:

Posts: 1

Participants: 1

Read full topic

Add new item on second page in ionic

$
0
0

@valentinay wrote:

i want it to take the value from the when I click the add button and add a new in another page. I don’t know if what if want is clear but this my first time using ionic and desperately need .
i have a page “addmedicationPage” in this page the user adds info about a new medication, if the user choose to add the medication in the morning i want it to create a div in morning containing the info added in addmedicationPage . i’m sorry these confusing i’m just new to thihelp

  <ion-item>
    <ion-label>When to Take</ion-label>
    <ion-select [(ngModel)]="whentotake" multiple="true">
      <ion-option value="morning">Morning</ion-option>
      <ion-option value="noon">Noon</ion-option>
      <ion-option value="evening">Evening</ion-option>
      <ion-option value="night">Night</ion-option>
    </ion-select>
  </ion-item>

button :

 <button ion-button block outline large (click)="showAlert()" class="button">Add</button>

button ts :

 showAlert() {
    let alert = this.alertCtrl.create({
        title: 'Medicine has been added ',
        buttons: [
            {
                text: 'Okay Go Back to Main',
                handler: () => {
                    console.log('Okay Go Back to Medication');
                    this.navCtrl.push(medicationPage);
                }
            },

        ]
    });
    alert.present();

}

Posts: 3

Participants: 2

Read full topic

Debugger Breakpoint not correct in Chrome - mapping wrong?

$
0
0

@NickWallbridge wrote:

I have been trying to debug the flow of an app. Initially I was using Webstorm debugging, but I have now reduced down to using “debugger” statements in Chrome. The problem is when it hits the breakpoint the line highlighted in chrome is incorrect it is about 5-6 lines above where it should be. So for example:

The debugger statement it has hit is (I believe) the first line in function “signup” as I just tapped “Create an Account”, but the highlighted line is in the middle of the validator above. This will continue to occur for each of the debugger statements in this code. Note: debugger in some of the other files hit the breakpoint correctly.

My research suggests that this is a mis-match between the ts file the js file and js.map file. - but how do I correct it?

I have tried deleting the .js and .js.map files and re-running Ionic Servre. As expected the .js and .js.map files get recreated, but the error persists.

I have updated everything I can - current ionic info is below.

I have built the project again in a new directory. Also ensuring it is never touched by Webstorm - thus eliminating that as a possible issue.

But the problem persists.

I don’t know what I am fighting here? Is the map file being created incorrectly by Ionic? Is Chrome reading it wrong? Can I correct the offset somehow?

Help!

Thanks
Nick

cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.15.0
ionic (Ionic CLI) : 3.15.0

local packages:

@ionic/app-scripts : 3.0.1
Ionic Framework    : ionic-angular 3.7.1

System:

Node : v6.11.3
npm  : 3.10.10
OS   : macOS Sierra

Misc:

backend : legacy

Chrome is Version 61.0.3163.100 (Official Build) (64-bit)

Posts: 3

Participants: 2

Read full topic

Google Maps doesn't update

$
0
0

@leondroidgeeks wrote:

Hi there. I’ve built an app with lists of places. If you click on a place it displays the Infopage for this place. I included Google Maps on this page. My problem is that once I clicked on a place and the map is loaded, the map doesn’t change accordingly and displays another place if I click on the Infopage from another place. I hope this makes sense and you can understand.
I already call map.remove() at the beginning but it doesn’t change anything.
I would really appreciate your help.

Posts: 1

Participants: 1

Read full topic


Ionic 2 trigger animation when element is in visible on phone

$
0
0

@notsure wrote:

Hi Folks,

I have tried various plugins out there but none of them seem to work.


Here is what I want to achieve:

I have multiple charts on my page. Each of them has some very nice animation (fancy pie chart animation and so on). Now I face the problem, that my content is to large to display on a mobile display. Yes a common problem. So to improve the user experience I want to trigger the animation when the user scrolls down to the specific chart.

Some of those plugins simple do not registerer any scroll event and therefore do not work. Some only get triggered once (once the page is loaded)

What I need:

I do not want you guys to write my code, but I really need some fresh input how to resolve this problem. Maybe there is some “ionic” way to do this or a plugin someone is already using in his project.

Please let me know if anyone of you have some great input.

If there is no better way I would consider to implement this with pure javascript / jquery but not knowing if this works for each platform. (eg https://www.sitepoint.com/scroll-based-animations-jquery-css3/)

Thanks a lot folks!
Cheers Phil

Posts: 1

Participants: 1

Read full topic

Face recognition and Face detection in ionic

Issue with Detail page

$
0
0

@Annalisape wrote:

I’m working to develope my first mobile app, I have home.html

<ion-item *ngFor=“let post of postList | search:‘title,body’:query”>
{{post.title}}
<p [innerHtml]=“post.body”>


<button ion-button clear item-end (click)=“openItem(postList)”>Leggi
</ion-item>

home.ts

openItem(post : RemoteServiceProvider){
this.navCtrl.push(AnnuncioPage);

}


annuncio.ts

export class AnnuncioPage {
postList = [];
constructor(public navCtrl: NavController, public navParams: NavParams, private remoteService : RemoteServiceProvider) {
this.postList = navParams.get(‘postList’);

}

annuncio.html


{{post.title}}

Then, when I click on the button in home page I have the issue:
Runtime Error
Uncaught (in promise): TypeError: Cannot read property ‘item’ of undefined TypeError: Cannot read property ‘item’ of undefined at Object.eval [as updateRenderer]
Where is my error? Thank you!

Posts: 1

Participants: 1

Read full topic

Cordova sms plugin not working

$
0
0

@coolbeatz71 wrote:

im actualy developping an app using ionic in which i must send sms to the new user containing an activation code in order to confirm his registration.

im using cordova sms plugin, and i tested it into many android version and also in windows phone 8 using phonegap developper but nothing is happening. My code is this one:

document.addEventListener(“deviceready”, function(){
//trying sms
$scope.smsTry = function(loginForm){

    if(loginForm.$valid){

        //CONFIGURATION
        var options = {
            replaceLineBreaks: true, // true to replace \n by a new line, false by default
            android: {
                intent: '' // send SMS without open any other app
            }
        };

        $cordovaSms.send($scope.signUpInfo.phoneNumber, 'This is some dummy text', options)
        .then(function(){
            $ionicPopup.alert({
                title: "Ok",
                template: "Xa a marcher"
            });
        }, function(error){
            $ionicPopup.alert({
                title: "Error",
                template: "putain"+error
            });

        });
    }
}

});

Posts: 1

Participants: 1

Read full topic

Button 'myLocationButton' ionic 3

$
0
0

@MoreFlores wrote:

Does anyone know how to move the google maps ‘myLocationButton’, down to the highlighted location?

This image shows the desired location of the button.

loadMap() {
//let location = new LatLng(-34.9290, 138.6010);

this.map = new GoogleMap('map', {
  'controls': {
    'compass': true,
    'myLocationButton': true,
    'indoorPicker': true
  },
  'gestures': {
    'scroll': true,
    'tilt': true,
    'rotate': true,
    'zoom': true
  },
  'camera': {
    target: {
      lat: 43.0741904,
      lng: -89.3809802
    },
    'tilt': 30,
    'zoom': 15,
    'bearing': 50
  }
});

this.map.on(GoogleMapsEvent.MAP_READY).subscribe(() => {
  console.log('Map is ready!');
});
}

Posts: 1

Participants: 1

Read full topic

Viewing all 70920 articles
Browse latest View live


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