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

How to set setWebContentsDebuggingEnabled to true

$
0
0

@flavio_b wrote:

Hello,

I developed a Ionic (v3) app and I’m now starting a test automation process using Appium.
So far, I was facing lots of issues because I cannot find any element after launching the app on Android.
As far as I understand from Appium docs, I have to set the following property to true

There is an additional step necessary within your app build, unfortunately. As described in the Android remote debugging docs it is necessary to set to true the setWebContentsDebuggingEnabled property on the android.webkit.WebView element.

Those instructions are for native development. What is the corresponding setting in Ionic?

Posts: 1

Participants: 1

Read full topic


Function declared as capable of handling request of type 'json' but called with a request of type 'http'

$
0
0

@MustafaLokhandwala wrote:

I had tried an Ionic v4 and tried to communicate with odoo server v10. So i had used an advanced http plugin. and make a request to server like this.

home.page.ts

this.http
    .post(
      "http://10.42.0.63:8877/web/database/list",
      {
        jsonrpc: "2.0",
        method: "call",
        id: 1,
        csrf_token: "CSRF_TOKEN",
        params: {}
      },
      {
        "Content-Type": "application/json; charset=utf-8",
        "x-csrf-token": "CSRF_TOKEN"
      }
    )
    .then((res: any) => {
      console.log("---------------res--------------" + JSON.stringify(res));
    })
    .catch((err: any) => {
      console.log("---------------err--------------" + JSON.stringify(err));
    });

I had faced the error like this.

<function list at 0x7f99c50005f0>, /web/database/list: Function declared as capable of handling request of type 'json' but called with a request of type 'http'

I googled everything about it but can’t find expected result. Please guide me how to solve this. Thanks in advance.

Posts: 1

Participants: 1

Read full topic

Build Apk in ionic

Ionic 3 install

Download file in ios for ionic 3 not showing in files folder

$
0
0

@tanujlight wrote:

I am using #cordova-plugin-file-transfer, to download the file from url in android and ios. For Android it is working fine. But for ios app, i am facing a problem.

The file is downloading successfully, but i am not able to see downloaded file on ios device.

Here is my code for ios =>

const transfer = this.transfer.create();
transfer.download(url, cordova.file.documentsDirectory + fileName).then(
          entry => {
            console.log(entry);
            this.apiService.showError("Download Succeeded.");
            this.commonService.dismissLoading();
          },
          error => {
            console.log(error);
            this.apiService.showError("Download Failed.");
            this.commonService.dismissLoading();
          }
        )

is there any one who can help me in this.

Posts: 1

Participants: 1

Read full topic

BackgroundGeolocation - not working

$
0
0

@rajeshvs wrote:

import { BackgroundGeolocation, BackgroundGeolocationConfig, BackgroundGeolocationResponse } from '@ionic-native/background-geolocation/ngx';

Basically I am having the issue when I do

this.backgroundGeolocation.configure(config)

Native: tried calling BackgroundGeolocation.configure, but the BackgroundGeolocation plugin is not installed.

Did some research and landed into the doubts.
Look at the code node_modules@ionic-native\background-geolocation\ngx\index.d.ts

There is
export interface BackgroundGeolocation {

There is also a
export declare class BackgroundGeolocation extends IonicNativePlugin {

Is there a problem on what gets imported. Is it the interface or the class?

Posts: 1

Participants: 1

Read full topic

Auto send sms using twillo etc

$
0
0

@lunneyd wrote:

Is it possible using twillo or a 3rd party api like it to send an sms automatically under a certain condition.

So basically I have in app and it creates a message and it goes to the messaging app when u press a button on the app with the message auto generated and number filled in too. But you have press the button on the app and also send button in the messenger default on the phone and android intent needs certain permissions I believe so I can’t do it in the app anymore. I could be wrong on this.

What I want is to send this message without pressing button. I want a sms to auto send when say a person falls etc.

Posts: 3

Participants: 2

Read full topic

How to get the date and time of the device (i.e. the device on which the app is running)


Integrate a new Paypal Javascript SDK in ionic

$
0
0

@alfanet wrote:

Hello

Has anyon already use the new Paypal Javascript SDK and can help me with an example code?
I need add a simple Button PayPal that send to PayPal Page.

I tried to insert the code that I found in the topic PayPal Donate With Ionic but it does’t work and I don’t understand witch is the problem.

I read a note, in the PayPal site, that from feb 2019 the old script, “”, is deprecate, and it should be used the new PayPal sdk is it true?

TIA
Giovanni

Posts: 2

Participants: 2

Read full topic

--prod --release causes application to not correctly display information

$
0
0

@joseph7 wrote:

Hey folks,

So I have my application almost ready for App store release, I decided to release a beta program for it but when I started to build it with --prod and --release flags things started to get weird. Firstly there was a white screen after splash and nothing more, turned out it was wrong typescript version, problem solved. But right now, I have another problem, let me present you with an example.
item-detail.html

<button ion-button large block outline icon-end clear="true" color="dark" (click)="unfold($event)" id="Second" *ngIf="hasProperty('unfold_title2')">
      <span class="button-text" [ngStyle]="{'font-size': font_size}" innerHTML="{{item.unfold_title2}}"></span>
      <ion-icon [name]="isUnfolded.Second? 'arrow-dropup-circle':'arrow-dropdown-circle'"></ion-icon>
    </button>

focus on the button please, because it is not being correctly displayed. And yes, the item has the property of ‘unfold_title2’, triple checked.

my ionic info output:

Ionic:

   ionic (Ionic CLI)  : 4.10.3 (C:\Users\user\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.9.4
   @ionic/app-scripts : 3.2.1

Cordova:

   cordova (Cordova CLI) : 8.1.2 (cordova-lib@8.1.1)
   Cordova Platforms     : android 7.1.4, browser 5.0.4, ios 4.5.5
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.2.5, (and 13 other plugins)

System:

   Android SDK Tools : 26.1.1 (C:\Users\user\AppData\Local\Android\Sdk)
   NodeJS            : v10.14.1 (C:\Program Files\nodejs\node.exe)
   npm               : 6.4.1
   OS                : Windows 10

I tried with both --prod and --release separately, and it is not working. I found similair issue on the forums (Building With --release --prod Styling Issues) and last comment there suggested to update ionic-angular, which I did, but it didn’t help.

Posts: 1

Participants: 1

Read full topic

Community & Enterprise and the alternative Flutter

$
0
0

@rajeshvs wrote:

Looks like there is a big difference for developer to use the plugins with the community editions. We don’t know when the plugins get fixed.
Plugins are the heart of the ionic apps, and the plugins are differentiated for community and enterprise edition
Not fair.

I am stuck with BackgroundGeolocation plugin not working.

Should we see an alternative like Flutter in the future?

Posts: 1

Participants: 1

Read full topic

Ionic Native Image Picker is not working it is asking permissions after that app is crashing

$
0
0

@shravanshra1 wrote:

Commands Installed

ionic cordova plugin add cordova-plugin-telerik-imagepicker && npm install @ionic-native/image-picker

Code
const options = {
quality: 20,
outputType: 1,
maximumImagesCount: 10
};
this.imagePicker.getPictures(options).then( results => {

});
Ionic Info
ionic%20info

Error
52%20PM

Posts: 1

Participants: 1

Read full topic

[Ionic 4 using Vue] Ionic/Vue Tab icons not working without a CDN

$
0
0

@Imaginativeone wrote:

I’m learning to use Ionic/Vue, and I’m at the part of my journey that has me making a demo app that uses tabs.

My problem is similar to this. My tabs show up on a tab bar at the bottom of my screen, but the icons do not display.

Regrettably, I don’t know where “the font files” are, so that I can move them to the “www” folder.

I very, very, vehemently do not want to use a CDN to utilize my Ionicons, and they stubbornly won’t load without using a CDN; that is, they don’t automatically load from a node_modules location.

Thanks for your help.

Posts: 1

Participants: 1

Read full topic

Ionic select selected not working

$
0
0

@gaiapuffo wrote:

Hi,

I have a ionic select that i fill with for cycle

<ion-select value="" ok-text="Ok" cancel-text="Annulla" formControlName="skill_level_id"
                       style="white-space: pre-line !important" value="7">
      <ion-select-option *ngFor="let skill_level of skill_levels" value="skill_level['id']">{{ skill_level['tcode'] }}</ion-select-option>
  </ion-select>

After I fill the select in my ts fill i make

this.skillForm.controls[“skill_level_id”].setValue(skill_level_id);

The problem is that if I open the select the value is selected but is not showing in the UI if I not open the select…
The are too many bugs…

Posts: 1

Participants: 1

Read full topic

Change humans hairstyle or face color

$
0
0

@yogesh1988 wrote:

Hi all,
I want to create one app in which i want to apply different hairstyles or skin tones to human face image,
if any one make the same things or if any one have idea about how to do that using ionic 3 then please help me.
Thanks In Advance.

Posts: 1

Participants: 1

Read full topic


Apk build Error(ionic)

How to create fadeIn animate scroll item in ionic 1.5?

$
0
0

@gokujy wrote:

0

I want scroll like data to this on ionic: video Link

i want make scroll like this video. i tried few things but dose’t work.

please help :slight_smile:

Posts: 1

Participants: 1

Read full topic

Please help me to solve

$
0
0

@ApproTechnologies wrote:

You have been opted out of telemetry. To change this, run: cordova telemetry on.
Android Studio project detected
ANDROID_HOME=C:\Users\mr\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files (x86)\java\jdk1.8.0_201
studio
Subproject Path: CordovaLib
Subproject Path: app
Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

  • What went wrong:
    Unable to start the daemon process.
    This problem might be caused by incorrect configuration of the daemon.
    For example, an unrecognized jvm option is used.
    Please refer to the user guide chapter on the daemon at https://docs.gradle.org/4.1/userguide/gradle_daemon.html
    Please read the following process output to find out more:

Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

  • 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
    cmd: Command failed with exit code 1 Error output:
    FAILURE: Build failed with an exception.

  • What went wrong:
    Unable to start the daemon process.
    This problem might be caused by incorrect configuration of the daemon.
    For example, an unrecognized jvm option is used.
    Please refer to the user guide chapter on the daemon at https://docs.gradle.org/4.1/userguide/gradle_daemon.html
    Please read the following process output to find out more:


Error occurred during initialization of VM
Could not reserve enough space for 2097152KB object heap

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

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

Posts: 1

Participants: 1

Read full topic

Ionic mobile issue

$
0
0

@sureshvgp wrote:

Hi,

We created the application using ionic 3.0. We are not building through Cordova but just running the app by ionic serve, like a web application.

Able to access the application in the browser but having an issue when access through a mobile browser.

Request and Response details:

URL: http://demo.test.com:8081/accounts/api/authentication/token
Request Method: POST
Request Header as : X-Api-Key=b4dbbd20-d3ab-11e8-a63f-4b1153c47651
Response (Laptop): Able to get the response
Response (Mobile): Getting error: Response with Status:0 for URL:null

Sample code:

In service class:

public anonymouslogin(apiKey):Observable {

let body = {
};
if (apiKey === null) {
  return Observable.throw("Please insert account.");
} else {
    let url = AuthServiceProvider.LOGIN_URL_APIEY;
    let headers = new Headers(
        {
            "X-Api-Key": localStorage.getItem("apikey")
        });
    
    let options = new RequestOptions({ headers: headers });
	alert("Initiated Post Request (in mobile not seeing any alert after this");
    return this.http.post(url, body, options)
        .map(response => {
			alert('success');//This alert not coming desktop but not in mobile.
            var temp = response.json();
            return true;
        },
        (error) => 
        {
			alert('Failure');//This alert not coming in mobile even if get error.
            return false;
        }
    );

}
}

In component:

this.auth.anonymouslogin(localStorage.getItem(“apikey”))
.subscribe(allowed => {
alert(‘Login success’);
},
(error) =>
{
alert(“This is error displaying in the mobile only”+error);
//Error objct as like this. ‘Response with Status:0 for URL:null’

        }
);

Not sure about the reason why this breaking in mobile.Same issue in both Android and IOS device.

Posts: 1

Participants: 1

Read full topic

Login/logout

$
0
0

@ImadEL wrote:

hi everybody, im new to this forum but not very very new to ionic, i worked with angular and its very similar,
my question is that,
when im logged in and the url is like this => http://localhost/ => then it has to redirect to home ONLY if im logged in.
if im not logged in and the url is like this => http://localhost/ => then you have go back to the login page, and the side-menu only has to appear when im logged in.

i can’t continue becaus im stuck with this and i dont know what to do, with this project im not using database with this one first i wanna do it without database.

loginpage.ts
Login(){
if (this.username == “admin” && this.password == “admin”) {
this.navCtrl.navigateRoot("/home")
}else{
this.ErrorMessage();
}
}

loginpage.html
<ion-content padding>

<ion-item>

<ion-label>Username:</ion-label>

<ion-input [(ngModel)]=“username”></ion-input>

<ion-icon name=“person” item-right></ion-icon>

</ion-item>

<ion-item>

<ion-label>Password:</ion-label>

<ion-input [(ngModel)]=“password” [type]=“passwordType”></ion-input>

<ion-icon [name]=“passwordIcon” (click)=“ShowHidden()” item-right></ion-icon>

</ion-item>

<div>

<ion-button expand=“block” (click)=“Login()”>Login</ion-button>

</div>

thanks in advance

Posts: 1

Participants: 1

Read full topic

Viewing all 70443 articles
Browse latest View live


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