Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all 49293 articles
Browse latest View live

Display this to list

$
0
0

@physedo wrote:

test.ts:113 (6) [Status, Status, Status, Status, Status, Status]
test.ts:139 (4) [Array(1), Array(1), Array(1), Array(1)]     // I want to display this first in a list
test.ts:139 (4) [Array(1), Array(1), Array(1), Array(1)]  // then this
test.ts:139 (4) [Array(1), Array(1), Array(1), Array(1)] // then this
test.ts:139 (4) [Array(1), Array(1), Array(1), Array(1)] // then this
test.ts:139 (4) [Array(1), Array(1), Array(1), Array(1)]  // then this
test.ts:139 (4) [Array(1), Array(1), Array(1), Array(1)] //  and the last one

how to do display this to list?

It is a forEach function

I can only display the the last one. the last output

This is an example from https://docs.microsoft.com/en-us/scripting/javascript/reference/foreach-method-array-javascript

// Define the object that contains the callback function.
var obj = {
    showResults: function(value, index) {
        // Call calcSquare by using the this value.
        var squared = this.calcSquare(value);

        document.write("value: " + value);
        document.write(" index: " + index);
        document.write(" squared: " + squared);
        document.write("<br />");
    },
    calcSquare: function(x) { return x * x }
};

// Define an array.
var numbers = [5, 6];

// Call the showResults callback function for each array element.
// The obj is the this value within the
// callback function.
numbers.forEach(obj.showResults, obj);

// Embed the callback function in the forEach statement.
// The obj argument is the this value within the obj object.
// The output is the same as for the previous statement.
numbers.forEach(function(value, index) { this.showResults(value, index) }, obj);

// Output:
//  value: 5 index: 0 squared: 25
//  value: 6 index: 1 squared: 36
//  value: 5 index: 0 squared: 25
//  value: 6 index: 1 squared: 36

I want all this outputs to display in list. I can only display the last one with: This is an example

<ion-item *ngFor="let some of something" ></ion-item>

Posts: 1

Participants: 1

Read full topic


Ionic2 frame work sending empty parameters in http post(400 Badrequest)

$
0
0

@shalini_99 wrote:

Method is working fine in postman but, while sending the same request from ionic2 is generating an error.Get methods were working fine but there is some issue in post.The request is sending empty parameters in post and generating error 400 Bad request.

Login.ts

onlogin()
{

let login_email="vvvv@gmail.com";
let login_password="123456"
this.body={
login_email:login_email,
login_password:login_password
};

this.auth.login(this.body).subscribe(data => {
this.result = data

console.log(data);
});

}

authservice.ts

login(param)
{
let headers = new Headers({ 'Content-Type': 'application/json'});
let options = new RequestOptions({ headers: headers });
return this.http.post(this.apiUrl+'/login',JSON.stringify(param),options)
.map((res: Response) => {
if (res) {
return { status: res.status, json: res.json() }
}
});
}

Posts: 1

Participants: 1

Read full topic

Browser based App - Query Parameters

$
0
0

@hintona wrote:

Hi,

I am building a browser based app using Ionic 3 and would like to use query parameters in the URL or another mechanism if there is one to pass input when opening the web page:

ie http://localhost:8100?id=1234

How can I access these parameters in Ionic 3?

Thanks in advance.

Alex

Posts: 2

Participants: 2

Read full topic

The content scrolls up when tapping on a readonly ion-input

$
0
0

@szily20 wrote:

Hi there,

I'm using the readonly attribute on some inputs to prevent the native keyboard to pop up.(I'm showing custom js component instead.)

When I tap on an input which is readonly the keyboard show is prevented, but the content starts to scroll up as the input was displayed. Is this a bug?

Is there a way to prevent the content scrolling in this case when the keyboard is not displayed?

I'm using ionic 3:

@ionic/cli-utils : 1.4.0
Cordova CLI      : 7.0.1
Ionic CLI        : 3.4.0

local packages:

@ionic/app-scripts              : 1.3.12
@ionic/cli-plugin-cordova       : 1.4.0
@ionic/cli-plugin-ionic-angular : 1.3.1
Cordova Platforms               : none
Ionic Framework                 : ionic-angular 3.5.0

Any help is really apreciated.
Thanks

Posts: 1

Participants: 1

Read full topic

IonicApp or App?

$
0
0

@hanzo2001 wrote:

I don't know the difference between these two components or their intent. I know that App has an entry in the API Docs but IonicApp has none. My IDE (VSCode) tells me that IonicApp has some hidden members (underscored names, sometimes annotated). I've seen code examples using an instance of this class but I still don't understand why there is an injectable IonicApp and App or what should I expect to use them for.

Could anyone clarify intended use? Is there any documentation for IonicApp?

I'll leave a summarized code snippet that I am expected to use below. It is part of the back-button handler registration code

let activePortal = (
	this.ionicApp._loadingPortal.getActive() ||
	this.ionicApp._modalPortal.getActive() ||
	this.ionicApp._toastPortal.getActive() ||
	this.ionicApp._overlayPortal.getActive()
);

if (activePortal) {
	activePortal.dismiss();
	activePortal.onDidDismiss(() => {});
	return;
}

global packages:

@ionic/cli-utils : 1.4.0
Cordova CLI      : 6.5.0
Ionic CLI        : 3.4.0

local packages:

@ionic/app-scripts              : 1.3.7
@ionic/cli-plugin-cordova       : 1.4.0
@ionic/cli-plugin-ionic-angular : 1.3.1
Cordova Platforms               : android 6.1.2
Ionic Framework                 : ionic-angular 3.2.1

Posts: 1

Participants: 1

Read full topic

Service constant property

$
0
0

@SanSolo wrote:

Hi there,

I'm having trouble with a property of one of my service that is getting updated when i dont want to.

I explain myself.

When I open the home view i'm making a GET request that is returning my data. The data is then stored in my service like this.

home.ts

this.currentEdlService.setRoomTypes(this.roomTypes);

currentEdl.service.ts

setRoomTypes(roomTypes) {
        this.roomTypes = roomTypes;
    }

Everything is fine at this point. But later in the app i use the data of roomTypes to create a list of room types that the user can select. In my file "inspection.ts" I have a property "roomTypes" that is set to my service property like this:

inspection.ts

this.roomTypes = this.currentEdlService.getRoomTypes();

I use these roomTypes to create a list in a Popover like this:

  showTypeList(event) {
        console.log(event);
        let popover = this.popOverCtrl.create(TypeListPage, { roomTypes: this.roomTypes });
        console.dir(this.roomTypes);
        popover.present();
        popover.onDidDismiss((popoverData) => {
            if (popoverData) {
                this.selectedPiece.title = popoverData.description;
                this.selectedPiece.typeDefined = true;
                this.selectedPiece.parametres = popoverData.parameters;
                this.currentEdlService.updatePiece(this.selectedPiece);
                this.parameters = this.selectedPiece.parametres;
                console.dir(this.selectedPiece);
            }
        })
    }

As you can see i save informations contained in my popoverData in some properties of my object "selectedPiece".

But that's the probleme now, my object roomTypes is also modified each time i change something in "selectedPiece" and the changes are reported in my original object in currentEdlService. Which I don't want to.

roomTypes are supposed to be constant and never been updated.

Am I missing something ? Because I really can't figure it out. Hope someone can help me on this one. Important to notice is that i never use my function setRoomTypes() in another component.

popOver page

import { Component } from '@angular/core';
import { ViewController, NavParams } from 'ionic-angular';
@Component({
    template: `
    <ion-list>
      <ion-list-header>Type de pièces</ion-list-header>
      <button *ngFor="let type of typesPiece.roomTypes" ion-item (click)="close(type)">{{type.description}}</button>
    </ion-list>
  `
})
export class TypeListPage {

    typesPiece: any;
    typeSelected: any;

    constructor(public viewCtrl: ViewController, public params: NavParams) {
        this.typesPiece = this.params.get('roomTypes');
    }

    close(type) {
        this.typeSelected = type;
        this.viewCtrl.dismiss(this.typeSelected);
    }
}

Posts: 1

Participants: 1

Read full topic

Firebase handle push notification and increase badge

$
0
0

@yajuve wrote:

Hi !

I'm using ionic2 with corodva-plugin-fcm to connect on Firebase

I could handle my notifications correctly using this code

FCMPlugin.onNotification((d) => {
    this.badge.increase(1); // not work (don't increase badge) if app in background
    if (d.wasTapped) {
      // Background recieval (Even if app is closed),
      //   bring up the message in UI
    } else {
      // Foreground recieval, update UI or what have you...
    }

  }, function (msg) {
    // No problemo, registered callback
  }, function (err) {
    console.log("Arf, no good mate... " + err);
});

But i can't increase number of badge, even i tapped on notification
What i want is increase number badge if app in background without clicking on notification

Algorithm example:

If (push notification arrived && app in background) {
  increase badge
}

How can i do that
Thanks

Posts: 1

Participants: 1

Read full topic

Ionic cannot run android

$
0
0

@setsuna304 wrote:

ANDROID_HOME=/usr/local/Caskroom/android-platform-tools/latest
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home
Subproject Path: CordovaLib
Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary configuration failure takes precedence.
java.lang.IllegalStateException: buildToolsVersion is not specified.
at com.google.common.base.Preconditions.checkState(Preconditions.java:173)
at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:645)
at com.android.build.gradle.BasePlugin$10.call(BasePlugin.java:608)
at com.android.build.gradle.BasePlugin$10.call(BasePlugin.java:605)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:156)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:120)
at com.android.build.gradle.BasePlugin.lambda$createTasks$1(BasePlugin.java:603)
at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:93)
at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:82)
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:44)
at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:79)
at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:30)
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy16.afterEvaluate(Unknown Source)
at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:82)
at org.gradle.configuration.project.LifecycleProjectEvaluator.doConfigure(LifecycleProjectEvaluator.java:76)
at org.gradle.configuration.project.LifecycleProjectEvaluator.access$000(LifecycleProjectEvaluator.java:33)
at org.gradle.configuration.project.LifecycleProjectEvaluator$1.execute(LifecycleProjectEvaluator.java:53)
at org.gradle.configuration.project.LifecycleProjectEvaluator$1.execute(LifecycleProjectEvaluator.java:50)
at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:61)
at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:50)
at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:628)
at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:129)
at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:35)
at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:60)
at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:38)
at org.gradle.initialization.DefaultGradleLauncher$1.execute(DefaultGradleLauncher.java:161)
at org.gradle.initialization.DefaultGradleLauncher$1.execute(DefaultGradleLauncher.java:158)
at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:56)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:158)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:119)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:102)
at org.gradle.launcher.exec.GradleBuildController.run(GradleBuildController.java:71)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:75)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:49)
at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:44)
at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:29)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:47)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
at org.gradle.util.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)

FAILURE: Build failed with an exception.

  • Where:
    Script '/Users/qunata/myApp/platforms/android/CordovaLib/cordova.gradle' line: 64

  • What went wrong:
    A problem occurred evaluating root project 'android'.

    No installed build tools found. Install the Android build tools version 19.1.0 or higher.

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

BUILD FAILED

Total time: 1.182 secs
Error: /Users/qunata/myApp/platforms/android/gradlew: Command failed with exit code 1 Error output:
Failed to notify ProjectEvaluationListener.afterEvaluate(), but primary configuration failure takes precedence.
java.lang.IllegalStateException: buildToolsVersion is not specified.
at com.google.common.base.Preconditions.checkState(Preconditions.java:173)
at com.android.build.gradle.BasePlugin.createAndroidTasks(BasePlugin.java:645)
at com.android.build.gradle.BasePlugin$10.call(BasePlugin.java:608)
at com.android.build.gradle.BasePlugin$10.call(BasePlugin.java:605)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:156)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:120)
at com.android.build.gradle.BasePlugin.lambda$createTasks$1(BasePlugin.java:603)
at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:93)
at org.gradle.internal.event.BroadcastDispatch$ActionInvocationHandler.dispatch(BroadcastDispatch.java:82)
at org.gradle.internal.event.AbstractBroadcastDispatch.dispatch(AbstractBroadcastDispatch.java:44)
at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:79)
at org.gradle.internal.event.BroadcastDispatch.dispatch(BroadcastDispatch.java:30)
at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
at com.sun.proxy.$Proxy16.afterEvaluate(Unknown Source)
at org.gradle.configuration.project.LifecycleProjectEvaluator.notifyAfterEvaluate(LifecycleProjectEvaluator.java:82)
at org.gradle.configuration.project.LifecycleProjectEvaluator.doConfigure(LifecycleProjectEvaluator.java:76)
at org.gradle.configuration.project.LifecycleProjectEvaluator.access$000(LifecycleProjectEvaluator.java:33)
at org.gradle.configuration.project.LifecycleProjectEvaluator$1.execute(LifecycleProjectEvaluator.java:53)
at org.gradle.configuration.project.LifecycleProjectEvaluator$1.execute(LifecycleProjectEvaluator.java:50)
at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:61)
at org.gradle.configuration.project.LifecycleProjectEvaluator.evaluate(LifecycleProjectEvaluator.java:50)
at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:628)
at org.gradle.api.internal.project.DefaultProject.evaluate(DefaultProject.java:129)
at org.gradle.execution.TaskPathProjectEvaluator.configure(TaskPathProjectEvaluator.java:35)
at org.gradle.execution.TaskPathProjectEvaluator.configureHierarchy(TaskPathProjectEvaluator.java:60)
at org.gradle.configuration.DefaultBuildConfigurer.configure(DefaultBuildConfigurer.java:38)
at org.gradle.initialization.DefaultGradleLauncher$1.execute(DefaultGradleLauncher.java:161)
at org.gradle.initialization.DefaultGradleLauncher$1.execute(DefaultGradleLauncher.java:158)
at org.gradle.internal.Transformers$4.transform(Transformers.java:169)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:106)
at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:56)
at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:158)
at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:119)
at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:102)
at org.gradle.launcher.exec.GradleBuildController.run(GradleBuildController.java:71)
at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:41)
at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:26)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:75)
at org.gradle.tooling.internal.provider.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:49)
at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:44)
at org.gradle.tooling.internal.provider.ServicesSetupBuildActionExecuter.execute(ServicesSetupBuildActionExecuter.java:29)
at org.gradle.launcher.daemon.server.exec.ExecuteBuild.doBuild(ExecuteBuild.java:67)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.WatchForDisconnection.execute(WatchForDisconnection.java:47)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ResetDeprecationLogger.execute(ResetDeprecationLogger.java:26)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.RequestStopIfSingleUsedDaemon.execute(RequestStopIfSingleUsedDaemon.java:34)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:74)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput$2.call(ForwardClientInput.java:72)
at org.gradle.util.Swapper.swap(Swapper.java:38)
at org.gradle.launcher.daemon.server.exec.ForwardClientInput.execute(ForwardClientInput.java:72)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.LogAndCheckHealth.execute(LogAndCheckHealth.java:55)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.LogToClient.doBuild(LogToClient.java:60)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.EstablishBuildEnvironment.doBuild(EstablishBuildEnvironment.java:72)
at org.gradle.launcher.daemon.server.exec.BuildCommandOnly.execute(BuildCommandOnly.java:36)
at org.gradle.launcher.daemon.server.api.DaemonCommandExecution.proceed(DaemonCommandExecution.java:120)
at org.gradle.launcher.daemon.server.exec.StartBuildOrRespondWithBusy$1.run(StartBuildOrRespondWithBusy.java:50)
at org.gradle.launcher.daemon.server.DaemonStateCoordinator$1.run(DaemonStateCoordinator.java:297)
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:54)
at org.gradle.internal.concurrent.StoppableExecutorImpl$1.run(StoppableExecutorImpl.java:40)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)

FAILURE: Build failed with an exception.

  • Where:
    Script '/Users/qunata/myApp/platforms/android/CordovaLib/cordova.gradle' line: 64

  • What went wrong:
    A problem occurred evaluating root project 'android'.

    No installed build tools found. Install the Android build tools version 19.1.0 or higher.

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

[ERROR] Cordova encountered an error.
You may get more insight by running the Cordova command above directly.

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

ionic info

global packages:

@ionic/cli-utils : 1.3.0
Cordova CLI      : 7.0.1
Ionic CLI        : 3.3.0

local packages:

@ionic/app-scripts              : 1.3.12
@ionic/cli-plugin-cordova       : 1.4.0
@ionic/cli-plugin-ionic-angular : 1.3.1
Cordova Platforms               : android 6.2.3
Ionic Framework                 : ionic-angular 3.5.0

System:

Node       : v6.11.0
OS         : macOS Sierra
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed

thank you

Posts: 5

Participants: 3

Read full topic


Is there any possible way to have multi layer view?

$
0
0

@rsa wrote:

Is there any possible way to show some way to have multi layer view to show UI component independently but both of them could be focused?
for example : showing text box over an image, person could entering text in text box and without closing input box could replace or dragging image under the box.

Posts: 1

Participants: 1

Read full topic

Ionic Deploy. Count of deploys problem

$
0
0

@NyaO wrote:

I use Ionic HTTP API, to get count of deploys in month.

I create 3 requests.
1. auth and it is ok.
2. request to get deploy channel https://api.ionic.io/deploy/channels/dev

Answer is:

array(2) {
  ["meta"]=>
  array(3) {
    ["status"]=>int(200)
    ["version"]=>string(12) "2.0.0-beta.0"
    ["request_id"]=>string(36) "31612bcf-0184-4f02-cfa7-15352a5cecaa"
  }
  ["data"]=>
  array(6) {
    ["pwa"]=>NULL
    ["uuid"]=> string(36) "c8d19f70-91db-4c0d-b5a1-031a6a6ed6dc"
    ["created"]=>string(32) "2017-06-27T15:40:13.323165+00:00"
    ["tag"]=>string(3) "dev"
    ["app_id"]=> string(8) "e24347e3"
    ["deploy"]=>
    array(6) {
       ["user_id"]=>int(578226)
       ["uuid"]=>string(36) "9f0eba5a-b449-48aa-bd99-0b2d6e33a5da"
       ["ios_version"]=>
       array(3) {
          ["max"]=> NULL
          ["min"]=>NULL
          ["eq"]=>NULL
      }
      ["created"]=>string(32) "2017-06-27T15:40:14.869190+00:00"
      ["user_metadata"]=>
      array(0) {}
      ["android_version"]=>
      array(3) {
         ["max"]=>NULL
         ["min"]=>NULL
         ["eq"]=>NULL
      }
    }
  }
}
  1. To get deploy count I request https://api.ionic.io/deploys?channel=c8d19f70-91db-4c0d-b5a1-031a6a6ed6dc&page=1&page_size=10000
    Answer is:

array(2) {
  ["meta"]=>
  array(3) {
    ["status"]=>int(404)
    ["version"]=>string(12) "2.0.0-beta.0"
    ["request_id"]=>string(36) "ce8ce7aa-9212-4a5c-ca0e-7ea505adfa64"
  }
  ["error"]=>
     array(3) {
     ["type"]=>string(8) "NotFound"
     ["link"]=>NULL
     ["message"]=>string(14) "404: Not Found"
  }
}

Why it is Not Found? What is wrong?

Posts: 2

Participants: 2

Read full topic

Running android replaces another app

$
0
0

@matutor wrote:

Hi guys,

for university I've built two different apps with ionic. If I run android, one app replaces the other.
What can I do so both apps get "unique" and are not overwritten by the other anymore?

Kr, MIA

Posts: 2

Participants: 2

Read full topic

Ionic + Firebase + Sidemenu + Tabs template?

$
0
0

@jbaima wrote:

I'm starting a new project and I'd really like a template that works with Firebase and has Sidemenus and Tabs with Firebase auth for FB, Google, etc through Firebase. Ideally it would have some user management. It seems to me that lots of apps will start with a framework like this, but I have not fond one. I would be happy to pay for this since it would require some work to do this. Does anyone know if this exists? I've been poking around in the market and even bought two, but they really don't do what I want. Thanks.

Posts: 2

Participants: 2

Read full topic

Need ShowcaseView

Select grid-cells via drag

$
0
0

@nadavk wrote:

I am a backend dev with rudimentary knowledge of Ionic.
I need to create a grid-like UI-component, let's say 4 col x 50 rows, with the requirement for the user to click-down on one of the cells and drag.
The UI should then select all cells between the first-clicked cell and the drag-point, until user clicks-up.

Can you kindly give me a hint how to start this?

Posts: 1

Participants: 1

Read full topic

Using ng-controller in ionic2 applications

$
0
0

@Madhi wrote:

Can anyone tell how to use ng-controller in ionic2 application . Its shows error when i wrote

 .controller('functionname',function($scope,$timeout){
       //rest of the code
  })

Thanks

Posts: 1

Participants: 1

Read full topic


MediaCapture: More control options to auto-start recording and auto-return?

$
0
0

@loki9182 wrote:

I'm trying to build an "Interview" app which allows a user to record video answers to various questions but my client is very particular about the UI he wants. Unfortunately, when I start recording video with mediaCapture.captureVideo, it starts the native video capture app and the UI varies greatly from one OS to the other, especially when you finish recording. One UI will display the buttons "Retry" and "Save" while another will display "Discard" and "Ok".

1) Is there a way, after pressing "Stop" while recording video, to go straight back to the app with a fileURI so I could display my own custom buttons over the playback?

2) Is there a way to have more control over the MediaCapture so that I could tell it to start recording automatically once it starts?

In sequence, when the user clicks on "Record" in my app, I'd like to popup the front camera preview with an overlaid count-down (3...2...1...) and then switch from the cameraPreview to actually recording video. When the user clicks on stop at the end of his video recording, it would go straight back to the app instead of presenting native retry/save options.

Any ideas?

Posts: 1

Participants: 1

Read full topic

Keyboard "Send" button error

$
0
0

@billnye123 wrote:

Hey guys. Ran into a small problem here and I hope you guys can help me out. I have attached 2 screenshots. In the first screenshot, when I press the send button (->) on the emulator keyboard, the click event for the hidden send button is activated and the message is sent. This is correct.

The problem occurs in the second screenshot, where I add a new disconnect button. In the second screenshot, the send button on the keyboard activates the click event for the disconnect button, instead of the send button.

I have 2 questions:

  1. How can I make sure the send button on the keyboard activates the "send" button click event instead of the disconnect click event?

  2. How can I implement a feature where on click, the words in the "disconnect" button change from "disconnect" to "really?" and then when the user clicks the "really?" button the click event is fired? This is to act as confirmation that the user really wants to disconnect.

<ion-footer>
  <form #f="ngForm">
    <ion-grid>
      <ion-row>
        <ion-col col-4>
          <button ion-button full (click)="onDisconnect()">Disconnect</button>
        </ion-col>
        <ion-col>
          <ion-input [(ngModel)]="chat" name="chatText" required placeholder="Type Here..."></ion-input>
          <button style="position: absolute; left: -9999px; width: 1px; height: 1px;" (click)="chatSend()">Send</button>
        </ion-col>
      </ion-row>
    </ion-grid>
  </form>
</ion-footer>

Posts: 1

Participants: 1

Read full topic

Http Subscribe Error does not work on device

$
0
0

@eduardothiesen wrote:

Hey there!

I'm making a http request and subscribing to it so I can treat the responses. The problem is, when I run my project in the browser, everything works fine. But when I run on the device, if the response has an error, it is never "caught".

Below is my code.

VIEW:
...

userDidClickConnect() {
    if (this.username && this.password) {
      let loader = this.loadingCtrl.create({ content: 'Autenticando...' });
      loader.present();

      this.sfa.register(this.username, this.password).subscribe(
        (data: LoginResponse) => {
          this.loginResponse = data;
          console.log(this.loginResponse.d.ApplicationConnectionId);
          this.sfa.setAppcidValue(this.loginResponse.d.ApplicationConnectionId);
          this.sfa.getPartnerId().subscribe(
            (data: PartnerResponse) => {
              loader.dismiss();
              this.sfa.setPartnerId(data.d.PartnerId);
              this.navCtrl.setRoot('TabControllerPage');
            },
            (err: Response) => {
              loader.dismiss();
              this.error = err;
              let toast = this.toastCtrl.create({
                message: 'Algo deu errado. Tente novamente mais tarde.',
                duration: 3000
              });
              toast.present();
            }
          )
        },
        (err: Response) => {
          loader.dismiss();
          this.error = err;
          let toast = this.toastCtrl.create({
            message: 'Usuário e/ou senha incorretos',
            duration: 3000
          });
          toast.present();
        });
    } else {
      let toast = this.toastCtrl.create({
        message: 'Usuário e/ou senha inválidos.',
        duration: 3000
      });
      toast.present();
    }
  }

...

SERVICE:

register(username: string, password: string): Observable<LoginResponse> {
        this.username = username;
        this.password = password;
        let authString = 'Basic ' + btoa(`${this.username}:${this.password}`);

        let registrationInfo = {
            'DeviceType': this.device.platform,
            'DeviceModel': this.device.model,
            'UserName': this.device.uuid
        };

        let headers = new Headers();
        headers.append('Authorization', authString);
        headers.append('Content-Type', 'application/json');
        headers.append('Accept', 'application/json');

        let options = new RequestOptions({ headers: headers });

        return this.http.post(this.connectionRoot, registrationInfo, options)
            .do(this.logData)
            .map(this.extractData)
            .do(this.logData)
            .catch(this.handleError);
    }

private extractData(response: Response) {
        return response.json();
    }

    private handleError(error: Response) {
        return Observable.throw(error);
    }

    private logData(response: Response) {
        console.log(response);
    }

So, for example, if I type wrong user and password, it never displays the toast and the loader is never dismissed.

Any idea of what I'm doing wrong?

Thanks in advance and sorry for the bad english. :slight_smile:

Posts: 1

Participants: 1

Read full topic

Input controls in sliders are broken

$
0
0

@iamsinghchandan wrote:

I have an ion-slides component which has some ion-input controls in. On RC2 the way the form scrolled when a keyboard displayed on a device was bearable. In RC3 it is completely broken. In latest nightly it's better but still very bad.

When a user touches an input, the input completely flies off the screen or is in the completely wrong position. When the keyboard is dismissed the screen is not returned to it's proper position. I have ion-footer elements in each ion-slide which show how the screen is not aligned after the keyboard is dismissed

Posts: 1

Participants: 1

Read full topic

Mvc ionic injecting dependency

$
0
0

@kumaripriti wrote:

I am trying to implement MVC pattern into my app but the problem I faced is that I am not able to inject dependecy of my service providers into my model.
Below is my code:
import { Injectable } from '@angular/core';
import 'rxjs/add/operator/map';
import {Observable} from 'rxjs/Observable';
import { Http, Headers, RequestOptions } from '@angular/http';

/*
Generated class for the TSUService provider.

See https://angular.io/docs/ts/latest/guide/dependency-injection.html
for more info on providers and Angular 2 DI.
*/
@Injectable()
export class TSUService {
headers: Headers;
options: RequestOptions;
constructor(public http: Http,private config: ConfigService, private userservice:UserService) {
console.log('Hello TSUService Provider');
this.headers = new Headers({ 'Content-Type':'application/x-www-form-urlencoded'});
this.options = new RequestOptions({ headers: this.headers });

}

getSemesters()
{
var user = this.userservice.getUserData();
let dataStr = JSON.stringify({'DEVICE_REQUEST_STRING': user.requestString,'LANGUAGE_ID':user.languageId });
console.log(dataStr);
return this.callService('/course/get_semisters','data='+dataStr,null);
}

//Basic calls
callService(endpoint: string, body: any, opts: RequestOptions) {
let service_url = this.config.getValue('api.url');
let options = opts ? opts : this.options;
let p = this.http.post(service_url + endpoint, body, options)
.map((responseData) => {
return responseData.json();
});

return p;

}

}
}

import {BaseModel} from '../models/base-model';
import {ClassModel} from '../models/class-model';

//services
import { TSUService } from '../providers/tsu-service';
export class SemesterModel extends BaseModel{
private id: string;
private name: string;
private classes: Array;
private thumbnail: string;
private description: string;
private currentClass: ClassModel;
private currentClassIdx: number;
private tsuservice :TSUService;
constructor()
{
super();
}

init(json: any, currentClassIdx: number = -1){
	this.id = json.id
	this.name = json.name;
	this.description = json.desc;
	this.thumbnail = json.image;
	this.currentClass = null;
	this.classes = new Array<ClassModel>();


}

// this throws the error
fetchClasses(){
this.tsuservice.getClasses( this.id ).subscribe(res => {
if(res.RESPONSE_CODE === 1){
this.initClasses(res.CLASSES);
}else{
console.log('err', res.RESPONSE_CODE, res.RESPONSE_TEXT);
}
})
}

}

How I can inject dependency into the model?

Posts: 1

Participants: 1

Read full topic

Viewing all 49293 articles
Browse latest View live


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