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

Execution failed for task ':app:packageDebug'. Failed to generate v1 signature

$
0
0

@AshleyDerek wrote:

I’m building my ionic app for the android platform using the command

ionic cordova build android

I’m always getting this error.

BUILD FAILED in 11s
/home/ashleypow/Documents/InfoSecDevelopers/Projects/To-Do-App/To-Do-App/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:packageDebug'.
> Failed to generate v1 signature

I tried all the solutions from stackoverflow and ionicforum but nothing seems to work.
Could someone please help. I’m stuck on this for the past 3 days.
Thanks in advance!

Posts: 1

Participants: 1

Read full topic


Ion-button convert text to uppercase in IONIC5

$
0
0

@madhurihotwax wrote:

I am creating an application and I have used an ion-button to create a button but
it will convert my ion-button text to uppercase automatically.

Hi

Display button text : HI
Expected button text : Hi

Does anybody know is this issue fixed ?
Thank you so much in advance!

Posts: 1

Participants: 1

Read full topic

getPicture() fails with Ionic

$
0
0

@Junek wrote:

Bug Report

Problem

What is expected to happen?

I expected camera plugin to return BASE64 data so I can send it and save it on server.

What does actually happen?

On device, this.camera.getPicture(options) fails with error message:

Cannot read property ‘present’ of undefined

Same thing happens if I use CAMERA or PHOTOLIBRARY as sourceType

Command or Code

imported
import { Camera } from '@ionic-native/camera/ngx';

injected in constructor
constructor(public camera: Camera) { }

and then used in my upload() method

let options = {
      quality: 100,
      destinationType: this.camera.DestinationType.DATA_URL,
      encodingType: this.camera.EncodingType.JPEG,
      mediaType: this.camera.MediaType.PICTURE,
      sourceType: this.camera.PictureSourceType.CAMERA,
      saveToPhotoAlbum: false,
      correctOrientation: false
};
this.camera.getPicture(options).then((imageData) => {
let base64Image = 'data:image/jpeg;base64,' + imageData;
      this.sendToServer(base64Image);
    }).catch(err => {
      console.log(err.message);
    });

Environment, Platform, Device

Not depending on device, happened on multiple devices wit different versions, eg.
Xiaomi Mi 8 - Android 10
Samsung Galaxy A3 - Android 6

Version information

Ionic 5.4.16
Cordova: 9.0.0 (cordova-lib@9.0.1)
cordova-plugin-camera 4.1.0 “Camera”

Posts: 1

Participants: 1

Read full topic

Admob work fine in test but Not in Real Admob

$
0
0

@chenreuven wrote:

Hey All,

When I put a test AdMob Banner Ad and Interstitial Ad works as expected. (shown in the simulator and in the device).

when I put a real AdMob Banner and Interstitial Ad (real Ids of app an ads unit) it doesn’t show anything

  • I also add the payment section details in AdMob site
  • I don’t have any property isTesting: true in my code

I don’t really know what can be the issue.

can someone maybe know what can be the issue?

Thanks a lot
Chen

Posts: 1

Participants: 1

Read full topic

Is there a way to tell if an alert needs scrolling to read more?

$
0
0

@doron wrote:

I am using a generic help alert service that has a function that takes a text message as input and displays the alert with an ‘OK’ button to dismiss it.

When the message is too long for the alert window, the user can scroll to read more.

This works perfectly.

However, from a UX perspective, I’d like to tell the user to scroll in order to read more - perhaps I’ll use a subHeader that says ‘(scroll for more)’ or maybe put three dots at the bottom.

But I can’t figure out how to programmatically know if the scroll area is overflowing and needs scrolling by the user or not.

Is there a way to know that within the code?

Thanks for any pointers!

Posts: 1

Participants: 1

Read full topic

IonContent Size incorrect if content contains

$
0
0

@KevinB1 wrote:

Hi everyone,

I looked through the whole Forum & though Stackoverflow and Github, but it seems nobody has ever given an answer to this question, so here I am, maybe someone has an idea :slight_smile:.

When the content of ion-content is played into ng-content, the size of the scrollarea is not calculated correctly.

I tried this on the ionic conference app to demonstrate the issue:

1st, we have the common header+content, which can then be used on any component
MyWrapper

<ion-header>
  <ion-toolbar>
    <ion-buttons slot="start">
      <ion-menu-button></ion-menu-button>
    </ion-buttons>
    <ion-title>Speakers</ion-title>
  </ion-toolbar>
</ion-header>

<ion-content fullscreen="true">

  <ng-content></ng-content>

</ion-content>

2nd we have some content

<my-wrapper>
    <!-- here can be any content that should be on the page-->
</my-wrapper>

Result:
-When the content of mywrapper is played directly in the ion-content, everything works like expected
-When ng-content is used, the ion-content with is incorrect (1 full page height too big on chrome, a few pixels too small on firefox, totally missing (height 0) on IE),
-When resizing the browser, ion-content also does not resize!

Images: 1) Without ng-content 2) with ng-content

This can be easily reproduced in the ion-conference app on every page.

So how can I achieve to have 1 common ion-header + ion-content, on many pages of my application, where only the pagecontent + the footer can be different (which means ion-content cannot be its parent, as ion-footer must not be placed in content)

I have read something about refreshing the ion-content size in ngAfterViewInit(), but this was early 2018 and with ionic 4 & 5 it seems like this is no longer an option?

As always, I appreciate any hint in the right direction!

Posts: 1

Participants: 1

Read full topic

Ion tabs off screen when using slot="bottom"

$
0
0

@imaginecreative wrote:

I am having an issue with the tabs bar not showing on a device when using slot=“bottom”. If I switch the slot to top everything shows without any problems.

I have tried using ionic serve and everything works as expected. The tabs page and children do not have any extra code or CSS and I have removed the global styles to check that nothing is accidentally interfering with it.

Here is my tabs page Html:

<ion-tabs>

    <ion-tab-bar slot="bottom" color="primary">
        <ion-tab-button tab="reasons">
            <ion-icon name="home"></ion-icon>
            <ion-label>Reasons2</ion-label>
        </ion-tab-button>

        <ion-tab-button tab="reasons-user">
            <ion-icon name="apps"></ion-icon>
            <ion-label>Favourites</ion-label>
        </ion-tab-button>

        <ion-tab-button tab="reasons-upload">
            <ion-icon name="settings"></ion-icon>
            <ion-label>Upload</ion-label>
        </ion-tab-button>
    </ion-tab-bar>

</ion-tabs>

My idea is that it’s somehow being pushed off the bottom of the screen as slot=“top” is working fine, but maybe I’m missing something else?

Posts: 1

Participants: 1

Read full topic

Tips for developing my first App

$
0
0

@fc299684 wrote:

I am observing the difference between Córdoba and Capacitor.
Everything seems to indicate that the capacitor will be the most correct.
I am in front of the application code, Angular with Ionic.
But the previous developer ran the app with ng serve, just using the Angular commands.
used < ion- button > and others items in the html.
I must start a new project and develop an application based on my partner’s but with improvements.

Tab template would start already from ionic start.,
Currently the tabs are a component created by us, it was not downloaded in the template and the routing is different.

What would you recommend?

A)
I continue my partner’s code (cordova, ionic weak use)

//

B)
Start an Ionic Capacitor project with official Tabs and reuse my partner’s code

Posts: 1

Participants: 1

Read full topic


Build --prod error: Internal error: unknown identifier []

$
0
0

@ebellempire wrote:

When I run ionic build --prod I get the following error:

ERROR in Error: Internal error: unknown identifier []
    at Object.importExpr$1 [as importExpr] (/Users/me/Documents/Git/myapp/node_modules/@angular/compiler/bundles/compiler.umd.js:25630:27)
    at /Users/me/Documents/Git/myapp/node_modules/@angular/compiler/bundles/compiler.umd.js:20747:37
    at Array.map (<anonymous>)
    at InjectableCompiler.depsArray (/Users/me/Documents/Git/myapp/node_modules/@angular/compiler/bundles/compiler.umd.js:20713:25)
    at InjectableCompiler.factoryFor (/Users/me/Documents/Git/myapp/node_modules/@angular/compiler/bundles/compiler.umd.js:20777:36)
    at InjectableCompiler.injectableDef (/Users/me/Documents/Git/myapp/node_modules/@angular/compiler/bundles/compiler.umd.js:20796:44)
    at InjectableCompiler.compile (/Users/me/Documents/Git/myapp/node_modules/@angular/compiler/bundles/compiler.umd.js:20806:106)
    at /Users/me/Documents/Git/myapp/node_modules/@angular/compiler/bundles/compiler.umd.js:25475:90
    at Array.forEach (<anonymous>)
    at AotCompiler._emitPartialModule2 (/Users/me/Documents/Git/myapp/node_modules/@angular/compiler/bundles/compiler.umd.js:25475:25)
    at /Users/me/Documents/Git/myapp/node_modules/@angular/compiler/bundles/compiler.umd.js:25468:48
    at Array.reduce (<anonymous>)
    at AotCompiler.emitAllPartialModules2 (/Users/me/Documents/Git/myapp/node_modules/@angular/compiler/bundles/compiler.umd.js:25467:26)
    at AngularCompilerProgram._emitRender2 (/Users/me/Documents/Git/myapp/node_modules/@angular/compiler-cli/src/transformers/program.js:336:31)
    at AngularCompilerProgram.emit (/Users/me/Documents/Git/myapp/node_modules/@angular/compiler-cli/src/transformers/program.js:211:25)
    at AngularCompilerPlugin._emit (/Users/me/Documents/Git/myapp/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:1040:49)

Ionic Info

    Ionic:

       Ionic CLI                     : 6.9.1 (/Users/me/.nvm/versions/node/v13.12.0/lib/node_modules/@ionic/cli)
       Ionic Framework               : @ionic/angular 5.0.7
       @angular-devkit/build-angular : 0.803.26
       @angular-devkit/schematics    : 8.3.26
       @angular/cli                  : 8.3.26
       @ionic/angular-toolkit        : 2.2.0

    Capacitor:

       Capacitor CLI   : 2.1.0
       @capacitor/core : 2.1.0

    Utility:

       cordova-res : 0.14.0
       native-run  : 1.0.0

    System:

       NodeJS : v13.12.0 (/Users/me/.nvm/versions/node/v13.12.0/bin/node)
       npm    : 6.14.5
       OS     : macOS Catalina

Capacitor Info

Installed Dependencies:

  @capacitor/cli 2.1.0
  @capacitor/android 2.1.0
  @capacitor/ios 2.1.0
  @capacitor/core 2.1.0

[success] Android looking great! 👌
  Found 3 Capacitor plugins for ios:
    cordova-plugin-google-analytics (1.9.0)
    cordova-sqlite-storage (5.0.0)
    es6-promise-plugin (4.2.2)
[success] iOS looking great! 👌

Posts: 2

Participants: 2

Read full topic

Any API call returns status code 0

$
0
0

@kristofberge wrote:

I’m new to Ionic and will be working on a legacy Android project. As far as I know, I installed everything I need on my machine. I can run the app, when I want to do an API call, it always returns an empty object with status 0. It doesn’t matter which API I use or which http verb. Also, on my colleague’s machine, the same code with the same API works perfectly. Here’s my code:

let options = new RequestOptions({ headers: new Headers({ 'Access-Control-Allow-Origin': '*' }), withCredentials: false});

      this.http.get('http://dummy.restapiexample.com/api/v1/employees', options2).subscribe(

        data => {

        debugger;

        var test = data;

      },

      err => {

        debugger;

        var test = err;

      });

As you can see I’m calling a dummy API and I’m setting the Access-Control-Allow-Origin header. This should simply return a json array, but instead it always falls into the err handler with a status code of 0. Is there something I´m missing? What can I do here, I’m out of options.
Thank you.

PS: here´s my ionic info:

Ionic:

   Ionic CLI          : 5.4.16 (C:\Users\Kristof\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.4

Cordova:

   Cordova CLI       : 8.1.1 (cordova-lib@8.1.0)
   Cordova Platforms : android 7.1.4
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.0.5, cordova-plugin-ionic-webview 1.2.1, (and 14 other plugins)

Utility:

   cordova-res : not installed
   native-run  : 1.0.0

System:

   Android SDK Tools : 26.1.1 (C:\Users\Kristof\AppData\Local\Android\SDK)
   NodeJS            : v12.16.3 (C:\Program Files\nodejs\node.exe)
   npm               : 6.14.4
   OS                : Windows 10

Posts: 1

Participants: 1

Read full topic

Stream video from camera phone and use it in Ionic on Android

$
0
0

@loucif wrote:

I am trying to build a mobile phone app for object detection with tensorFlow Js using Ionic Framework from live stream video captured through phone camera.i searched everywhere but nothing with ionic,i found something similar but with browser. this is what i found and i want to do something like this but with ionic,any help please.

File.js: 

      (async ()=>{
          const stream = await navigator.mediaDevices.getUserMedia({
              audio : false,
              video : {facingMode : 'environment'}
          })

          this.video.nativeElement.srcObject = stream;
      }) ()


File.html :
<div><video #video autoplay muted></video></div>

Posts: 1

Participants: 1

Read full topic

Ionic platform usage

$
0
0

@sakotturi wrote:

I’m struggling with some unexpected behavior using import { Platform } from '@ionic/angular';

I’m using public in my constructor so that I can access it directly in my template
public platform: Platform

<ion-item *ngIf="!platform.is('cordova')" lines="none">
  <ion-label>Select a Photo:</ion-label>
  <ion-input
    type="file"
    accept="image/*"
    multiple="false"
    (change)="fileChangeEvent($event)"
  ></ion-input>
</ion-item>

Because on mobile, I’m using the native photo picker.
On mac, iOS and Android this works but on Windows, the ion-item never displays.

The worst part is that I don’t have a windows computer but a my client says the File Input never shows up.
I tried using Microsoft Edge on my Mac and even setup a Virtual Machine with a Dev copy of Windows 10 but it’s a mess won’t boot. I don’t have $150 to spend on a windows license…

Is the code above ok? Can you safely access platform from the template or should I be doing all the JS checking in my component and just expose booleans in my ngIfs?

Can someone with a windows computer check to see if platform.is() runs properly on windows? (Using Chrome and Edge).

Is there a way I can rent a running windows computer that I can ssh into to run such checks on my own?

Thanks!
-Sante

Posts: 1

Participants: 1

Read full topic

Splash image show twice on android device

$
0
0

@pdj wrote:

as you can see below vid…
it show really well as intended

it show pic as I wrote in config.xml.

but the problem is that after fading away image, it show another second splash image that I can’t locate…(small one)

how can I prevent it from showing splash image twice?
(I can’t locate second splash image at all…)

Posts: 1

Participants: 1

Read full topic

Service continues running even when I close a ion-modal

$
0
0

@JavierMelo1672 wrote:

I am creating a simple chat, I have a chat history and clicking on an item in the chat history opens the chat, this action activates several services one of those is that while it is in the window and the messages are updated, then update my seen status in the message.The problem is that even closing the modal, the service to update the status of seen continues to work.

ionViewWillEnter(){
this.afAuth.authState.subscribe(user => {
  if (!user) {
    this.displayname = null;        
    return;
  }
  console.log(user);
  this.emails=user.email;
  console.log('user',user)
  this.ids=user.uid;    
  console.log('id',this.ids);
  this.key_chat=this.navParams.get('key_chat');
  this.key_cliente=this.navParams.get('key_cliente');
  this.key_servicio=this.navParams.get('key_service');
  console.log(this.key_chat);
  console.log(this.key_servicio);
  this.getchats(this.key_chat);
  this.getchat(this.ids,this.key_cliente)
}); }

cerrar(){
console.log("Cerrand modal");
this.ChatdisponibleColeccion=null;
this.chatdisponible=null;
this.ChatdisponibleColeccion2=null;
this.chatdisponible2=null;
this.chatsobj=null;
this.chatobj=null;
this.chatobj2=null;
this.modalController.dismiss();}

ngOnDestroy(){
this.ChatdisponibleColeccion=null;
this.chatdisponible=null;
this.ChatdisponibleColeccion2=null;
this.chatdisponible2=null;
this.chatsobj=null;
this.chatobj=null;
this.chatobj2=null;}

 getchats(key){
this.ChatdisponibleColeccion=this.dataser.getchathistory(this.key_chat);
this.chatdisponible=this.ChatdisponibleColeccion.valueChanges();
this.ChatdisponibleColeccion.snapshotChanges().subscribe(chats=>{
  console.log("Tamaño",chats.length);
  setTimeout(()=>{
    this.content.scrollToBottom(200);
  });
  this.tamano=chats.length;
  console.log("Sigo actualizando el chat desde star-dinny-chat");
  this.dataser.setmyview(this.key_chat).then().catch();
  this.chatsobj=chats.map(chat=>{
    return{
      key_mensaje:chat.payload.doc.data().key_mensaje,
      key_foto:chat.payload.doc.data().key_foto,
      key_usuario:chat.payload.doc.data().key_usuario,
      fecha_chat:chat.payload.doc.data().fecha_chat,
      fecha_chat_sin_Formato:chat.payload.doc.data().fecha_chat_sin_Formato,
      key: chat.payload.doc.id,
    }
  })
}); }

enviarMensaje(){
this.dates=new Date();
if(this.chatobj.key_foto==null){
  this.chatobj.key_foto="Sin foto";
}
if(this.nuevomensaje==""){
  this.chatobj.key_mensaje="Sin texto";
}
this.chatobj.key_usuario=this.ids;
this.chatobj.key_mensaje=this.nuevomensaje;
this.chatobj.fecha_chat=this.dates;
this.chatobj.fecha_chat_sin_Formato=this.datePipe.transform(this.dates, 'yyyy-MM-dd-hh:mm:ss');
this.dataser.sendmessage(this.key_chat,this.chatobj).then((res)=>{
  console.log(res);
  this.dataser.setview(this.key_chat).then((res)=>{
    this.dataser.setdate(this.key_chat,this.dates);
    this.dataser.unarchivechat(this.key_chat);
    this.dataser.unarchiveclientchat(this.key_chat);
    this.nuevomensaje="";
    this.chatobj.key_foto=null;
    setTimeout(()=>{
      this.content.scrollToBottom(200);
    });

  }).catch((e)=>console.log(e))

}).catch((e)=>console.log(e));}

getchat(id,key){
this.ChatdisponibleColeccion2=this.dataser.getchat(id,key,this.key_servicio);
this.chatdisponible2=this.ChatdisponibleColeccion2.valueChanges();
this.ChatdisponibleColeccion2.snapshotChanges().subscribe(chats=>{
  this.chatobj2=chats.map(chat=>{
    return{
      key_trabajador:chat.payload.doc.data().key_trabajador,
      key_cliente:chat.payload.doc.data().key_cliente,
      nombre_trabajador:chat.payload.doc.data().nombre_trabajador,
      nombre_cliente:chat.payload.doc.data().nombre_cliente,
      visto_cliente:chat.payload.doc.data().visto_cliente,
      visto_trabajador:chat.payload.doc.data().visto_trabajador,
      foto_trabajador:chat.payload.doc.data().foto_trabajador,
      foto_cliente:chat.payload.doc.data().foto_cliente,
      cliente_escribiendo:chat.payload.doc.data().cliente_escribiendo,
      trabajador_escribiendo:chat.payload.doc.data().trabajador_escribiendo,
      archivado_trabajador:chat.payload.doc.data().archivado_trabajador,
      archivado_cliente:chat.payload.doc.data().archivado_cliente,
      ultima_fecha:chat.payload.doc.data().ultima_fecha,
      id_servicio:chat.payload.doc.data().id_servicio,
      nombre_servicio:chat.payload.doc.data().nombre_servicio,
      foto_servicio:chat.payload.doc.data().foto_servicio,
      key: chat.payload.doc.id,
    }
  })
});}

This is the service in the path /services/firebase/data-ser.ts

getmychat(id){
  return this.fs.collection<Chat>("chats",ref=>ref.where('key_trabajador','==',id).where('archivado_trabajador',"==",false).orderBy("ultima_fecha","desc"));
}
getmyarchivechat(id){
  return this.fs.collection<Chat>("chats",ref=>ref.where('key_trabajador','==',id).where('archivado_trabajador',"==",true));
}
archivechat(keychat){
  return this.fs.collection<Chat>("/chats").doc(keychat).update({'archivado_trabajador':true});
}

getchathistory(key){
  return this.fs.collection<Mensajechat>("chats/"+key+"/historial_chat",ref=>ref.orderBy("fecha_chat","asc"));

}
setmyview(keychat){
  return this.fs.collection<Chat>("/chats").doc(keychat).update({'visto_trabajador':true});
}
sendmessage(key,chat:Mensajechat){
  return this.fs.collection<Mensajechat>("/chats/"+key+"/historial_chat").add(chat);
}
setview(keychat){
  return this.fs.collection<Chat>("/chats").doc(keychat).update({'visto_cliente':false})
}
setdate(keychat,date){
  return this.fs.collection<Chat>("/chats").doc(keychat).update({'ultima_fecha':date});
}

unarchivechat(keychat){
  return this.fs.collection<Chat>("/chats").doc(keychat).update({'archivado_trabajador':false});
}
unarchiveclientchat(keychat){
  return this.fs.collection<Chat>("/chats").doc(keychat).update({'archivado_cliente':false});
}
getchat(id,key,id_servicio){
  return this.fs.collection<Chat>("chats",ref=>ref.where('key_cliente','==',key).where('key_trabajador','==',id).where("id_servicio","==",id_servicio));
}

How can i destroy the call to the service when i close the service?, thanks for your help.

Posts: 1

Participants: 1

Read full topic

Setting IonicModule navAnimation per component

$
0
0

@kks21199 wrote:

I have a page transition animation working using ionic 5. Currently this is how I set the animation,

@NgModule({
  declarations: [AppComponent],
  entryComponents: [],
  imports: [BrowserModule,
    IonicModule.forRoot({
      navAnimation: customAnimation
    }),
    AppRoutingModule],
  providers: [
    StatusBar,
    SplashScreen,
    { provide: RouteReuseStrategy, useClass: IonicRouteStrategy }
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }

The problem witht his methid is that all pages are animated the same. How can I set navAnimation per component basis?

I tried adding this to one of my page modules,

NgModule({
  imports: [
    CommonModule,
    FormsModule,
    IonicModule,
    LoginPageRoutingModule,
    IonicModule.forRoot({
      navAnimation: customAnimation
    }),
  ],
  declarations: [LoginPage]
})
export class LoginPageModule {}

But this doesnt do anything at all.

Posts: 1

Participants: 1

Read full topic


Capacitor Angular 8 all requests fail with HttpHeaders

$
0
0

@tharrington1 wrote:

Every API request I try to make with HTTP headers fails with this error:

Failed to load resource: Origin capacitor://localhost is not allowed by Access-Control-Allow-Origin.

However the request works when sending an empty as the header. How can I get around this issue?
Here is the code:

const httpOptions = {
      headers: new HttpHeaders({
        'Access-Control-Allow-Origin' : '*',
        'Access-Control-Allow-Methods' : 'POST, GET, OPTIONS, PUT',
        'Authorization' : 'Bearer ' + this.token,
        'Content-Type': 'application/json'
      })
    };

    return this.http.get(endpoint, httpOptions);

Here is my ionic info:

ionic info

Ionic:

   Ionic CLI                     : 6.9.2 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.0.7
   @angular-devkit/build-angular : 0.803.26
   @angular-devkit/schematics    : 8.3.26
   @angular/cli                  : 8.3.26
   @ionic/angular-toolkit        : 2.2.0

Capacitor:

   Capacitor CLI   : 2.0.1
   @capacitor/core : 2.0.1

Utility:

   cordova-res (update available: 0.14.0) : 0.13.0
   native-run (update available: 1.0.0)   : 0.3.0

System:

   NodeJS : v10.15.1 (/usr/local/bin/node)
   npm    : 6.14.5
   OS     : macOS Catalina

Posts: 1

Participants: 1

Read full topic

Issue while integrating paytm-cordova-plugin with ionic 4

$
0
0

@Subodh18 wrote:

i am trying to integrate this paytm plugin in ionic 4 application .
i have run the command

  1. cordova plugin add cordova-plugin-paytm --variable MERCHANT_ID= --variable INDUSTRY_TYPE_ID= --variable WEBSITE= --save
  2. npm i cordova-plugin-paytm

after installing i have added these lines in config.xml

<plugin name="cordova-plugin-paytm" spec="0.0.10">
    <variable name="MERCHANT_ID" value="ABC12345" />
    <variable name="INDUSTRY_TYPE_ID" value="Retail" />
    <variable name="WEBSITE" value="APPSTAGING" />

when i am referring paytm developer resources .
i got the information to add following line platform build.gradle file
maven {
url “https://artifactory.paytm.in/libs-release-local
}

and in platform/app build.gradle file following line .
implementation 'com.paytm.appinvokesdk:appinvokesdk:1.2’

after adding these lines in build.gradle
i am getting error while building apk .

  • What went wrong:
    A problem occurred evaluating project ‘:app’.

Could not find method implementation() for arguments
[com.paytm.appinvokesdk:appinvokesdk:1.2] on object of type
org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.

in plugins folder paytm-cordova-plugin android build.gradle file giving error like

A problem occurred evaluating root project ‘android’.
Could not find method compile() for arguments [com.paytm:pgplussdk:1.3.3, build_dvdpi277ijw11ql5ew5nm8u9v$_run_closure1$_closure2@7389f3fe] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.Java(0)
Could not run phased build action using Gradle distribution ‘https://services.gradle.org/distributions/gradle-6.3-bin.zip’.
Build file ‘D:\Exel\ionic\homeCart\payment\homeCart\wb\cl\homeCart\plugins\cordova-plugin-paytm\src\android\build.gradle’ line: 2

is there anything i am missing or anything wrong i have done.kindly suggest at the earliest.

Regards,
Subodh

Posts: 1

Participants: 1

Read full topic

Electron - falling at the first hurdle

$
0
0

@paulbutcher wrote:

I’m very new to Ionic, so please forgive me If I’m missing something basic. I’ve got a long way towards getting my app working on web, iOS and Android. I’m now trying to get it to work with Electron, and hitting problems. So I decided to go back to basics and see if I could get a project created by ionic start working. And the answer is no :frowning_face:.

If I run the following:

ionic start MyTestApp --type react blank
cd MyTestApp
ionic build
ionic cap add electron
ionic cap open electron

It fails with:

index.html:1 GET file:///static/css/12.8921c4c4.chunk.css net::ERR_FILE_NOT_FOUND

The problem seems to be that the generated React project is expecting to find files in the root directory, where Electron is loading them using absolute file: URLs. I’ve tried playing around with setting homepage in package.json and removing the <base> tag in index.html with some success (I can get the static files loading initially), but I rapidly run into more problems.

This problem doesn’t seem to be React specific—I see similar issues if I create an Angular project instead.

Should I expect this to work? Are there any examples that I can look at of getting Ionic to play nicely with Electron?

Posts: 2

Participants: 1

Read full topic

Digital Marketing Services

hardwareBackButton not working in ionic5

$
0
0

@madhurihotwax wrote:

For Ionic 4 check out the config option described here: https://ionicframework.com/docs/angular/config
and I have applied hardwareBackButton : true inside my app.module.ts but it will not working in Android device .

Currently : Not exit the Android app on backPressButton pressed (remain on Home page).
Expected : App should be exit as default android app worked.

Thank you in advanced.

Posts: 1

Participants: 1

Read full topic

Viewing all 71274 articles
Browse latest View live


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