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

defaultHref don't go

$
0
0

@lorenzo96 wrote:

Hi guys, I have a problem with a back button.
When I enter the page and click on a link, pressing after the back button it returns to the home and not the correct page. I read it should be a history problem. Anyone know how to solve? Thanks.

<ion-back-button defaultHref="/"></ion-back-button>

Posts: 1

Participants: 1

Read full topic


Why google custom search is not showing in an ionic project?

$
0
0

@iktanim wrote:

I am want to use Google Custom Search in an Ionic project which is built using Angular . But when I paste code according to the documentation but the google custom search is not showing. I have pasted the script in the head tag. And paste code <div class="gcse-searchbox"></div> in an Ionic page but nothing is showing. Please help me solve this problem.

Posts: 1

Participants: 1

Read full topic

Call function from another page / controller

$
0
0

@dragonivell wrote:

I searched here on the forum for some solution but I found some complicated.
I am learning to use the angular / ionic.

I have a function that updates a list through an event, and I would like to call another function on another page to update that counts the total items in the list.

I will be grateful to anyone who can help me ^^

page1:

 doRefresh(event)
 {
    setTimeout(() => {
     this.sTxt = null;
     this.sTipo = 0;
      this.ngOnInit();
      event.target.complete();
      this.start = 0;
    }, 500);
 }

page2:

carregar()
   {
       let dados = { requisisao: 'hTotal' };
 
       this.provider.Api(dados, 'api.php').subscribe(async data => {
 
         if(data['success'])
         {
           this.hTotal = data['total'];
           console.log(data);
         }
         else { this.hTotal = 0; }
       });
   }

Posts: 1

Participants: 1

Read full topic

Hii! can anyone tell how to install a cordova plugin with capacitor which is not available with ionic native for eg:- cordova-paytm plugin?

$
0
0

@djkhowar wrote:

hello everyone,
I am trying to install the Cordova Paytm plugin with the capacitor. please help me with this and one more thing I want to know is where to put the variable like merchant id and website?

Posts: 1

Participants: 1

Read full topic

How to display 3 buttons at end of leaflet map in ionic app?

$
0
0

@Sweg wrote:

I am trying to display a selection of buttons onto of my leaflet map in my ionic app.

Currently, I’m able to display a button at the bottom of the map:

Here is the HTML & CSS:

<div class="map-container">
    <div class="map-frame">
      <div id="map"></div>
      <ion-button id="refreshButton" color="primary" (click)="findMe()">Find me</ion-button>
    </div>
  </div>

And here is the CSS:

.map-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 30px;
}

.map-frame {
  border: 2px solid black;
  height: 100%;
}

#map {
  height: 100%;
}

#refreshButton {
  position: absolute;
  bottom: 20px;
  right: 2px;
  padding: 10px;
  z-index: 400;
}

But I want to be able to display 3 buttons like so:

Can someone please tell me what changes I need to make so that I can display something like this?

Posts: 1

Participants: 1

Read full topic

Android Usage Stats

Json to Excel

$
0
0

@neerav94 wrote:

Hi,

How can we convert a json data to xlsx file in Ionic 4. I tried using xlsx package but it is not downloading the file in mobile, though it is working fine in browser when we do ionic serve.

Posts: 2

Participants: 2

Read full topic

Where should I put JS & CSS files that I need to reference in my ionic app?

$
0
0

@Sweg wrote:

I am trying to add the leaflet-icon-pulse plugin to my ionic app.

The readme says

Include the CSS and JavaScript files located in \dist directory.

<script src="../L.Icon.Pulse.js" /> 
  <link rel="stylesheet" href="../L.Icon.Pulse.css" />

Here are the 2 things I don’t know:

  1. Where do I put the above scripts? I thought I should put them inside the head tag in index.html

  2. Where should I find the above JS & CSS files mentioned? Do I have to create a folder & copy those in there?

Posts: 1

Participants: 1

Read full topic


Unable to successfully import zoomHome plugin in ionic app

$
0
0

@Sweg wrote:

I am trying to add the zoomHome plugin to my ionic app.

Here are the steps I’ve taken so far:

  1. I added the below links inside the head section of index.html:
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" />
<script src="assets/external-assets/leaflet.zoomhome.min.js"></script>
<link rel="stylesheet" href="assets/external-assets/leaflet.zoomhome.css" />

In my assets folder, I created a sub folder called external-assets, & copied the following files from https://github.com/torfsen/leaflet.zoomhome/tree/master/dist:

  • leaflet.zoomhome.css
  • leaflet.zoomhome.min.js

Here, I set the default zoom as false:

this.map = L.map('map', {
      center: [lat, lng],
      zoomControl: false
    });

Then I add the zoomHome control:

let zoomHome = L.Control.zoomHome({ position: 'topright' });
zoomHome.addTo(this.map);

However, when I run ionic serve, I get this console error:

Uncaught ReferenceError: L is not defined
at leaflet.zoomhome.min.js:5

This error is also printed:

Error: Uncaught (in promise): TypeError: leaflet__WEBPACK_IMPORTED_MODULE_3__.Control.zoomHome is not a function
TypeError: leaflet__WEBPACK_IMPORTED_MODULE_3__.Control.zoomHome is not a function
at HomePage.initMap

Can someone please tell me what I’m doing wrong, & how it can be resolved?

Posts: 1

Participants: 1

Read full topic

Click inside ion-card not working "ionic 5"

Dowload and open pdf file in device

$
0
0

@ashok12 wrote:

i get pdf file from web service and i want to download it and open it in my android device.
using this code

fileTransfer.download(url,this.file.externalDataDirectory+ filename).then((entry) => {
this.localNotifications.schedule({
text: ‘Téléchargement de fichier’+filename+’ est terminé !!’,
led: ‘FF0000’,
sound: null
});

download the pdf file but connot open it because it has been saved as “invalid format” !!!
i have been read a lot about encoding to base64!
is there any idea or example code to save pdf file in the right format??

Posts: 1

Participants: 1

Read full topic

Can't get Sqlite plugin to work in my app

$
0
0

@accron wrote:

I’m using this Sqlite plugin with Capacitor.
I’m running my app on an Android emulator and debug on Chrome devtools.
Any operation I do (e.g. openDatabase()) fails with a Note implemented error.

Am I missing some config?

Posts: 1

Participants: 1

Read full topic

Google Play Services

$
0
0

@Treeman92 wrote:

Hello,

i want to use Google Play Services in my Ionic Project. I want to show a highscore leaderboard.
I found this plugin: https://ionicframework.com/docs/native/google-play-games-services

I installed it like this:
cordova plugin add cordova-plugin-play-games-services --variable APP_ID="XXXX"
npm install @ionic-native/google-play-games-services

Then i removed the platform android:
ionic cordova platform rm android

After that i tried to build the debug apk:
ionic cordova build android

Then i get following error:

error: package com.google.android.gms.games.request
does not exist
import com.google.android.gms.games.request.GameRequest;

Maybe someone can help me?

Best regards,
Lukas :blush:

Posts: 1

Participants: 1

Read full topic

How can i add arbritrary properties to dom objects in the cli?

$
0
0

@alexmehler wrote:

in ionic-cli i cannot just do

div.myProperty = “Hello”;

its works in normal html page with ionic script imports of course …

anyone got a solution ?

Posts: 1

Participants: 1

Read full topic

Tabs bug routing app

$
0
0

@aormontero wrote:

Hello everybody, i am creating a ionic 5 app and having some problems in order to router my app.
When i start a tabs applications the app routing module is this by default and works ok

But if i add another path in order to redirect to this component the app crash.

This is the error

core.js:6014 ERROR Error: Uncaught (in promise): Error: Cannot match any routes. URL Segment: 'tabs/tab1’
Error: Cannot match any routes. URL Segment: 'tabs/tab1’

Posts: 2

Participants: 2

Read full topic


E.target doesnt transport ANY attribute , dom method , or whatever in the cli

Buileding error

$
0
0

@itosoft wrote:

here is the log of my app:

Failed
Running with gitlab-runner 11.3.1 (0aa5179e)
on Ionic Package Android Runner f537d27d
Using Kubernetes namespace: ionic-runners
Using Kubernetes executor with image 319312831725.dkr.ecr.us-west-2.amazonaws.com/ionic-runners/package-android ...
Waiting for pod ionic-runners/runner-f537d27d-project-0-concurrent-08xltv to be running, status is Pending
Waiting for pod ionic-runners/runner-f537d27d-project-0-concurrent-08xltv to be running, status is Pending
Waiting for pod ionic-runners/runner-f537d27d-project-0-concurrent-08xltv to be running, status is Pending
Waiting for pod ionic-runners/runner-f537d27d-project-0-concurrent-08xltv to be running, status is Pending
Waiting for pod ionic-runners/runner-f537d27d-project-0-concurrent-08xltv to be running, status is Pending
Waiting for pod ionic-runners/runner-f537d27d-project-0-concurrent-08xltv to be running, status is Pending
Waiting for pod ionic-runners/runner-f537d27d-project-0-concurrent-08xltv to be running, status is Pending
Waiting for pod ionic-runners/runner-f537d27d-project-0-concurrent-08xltv to be running, status is Pending
Waiting for pod ionic-runners/runner-f537d27d-project-0-concurrent-08xltv to be running, status is Pending
Waiting for pod ionic-runners/runner-f537d27d-project-0-concurrent-08xltv to be running, status is Pending
Waiting for pod ionic-runners/runner-f537d27d-project-0-concurrent-08xltv to be running, status is Pending
Waiting for pod ionic-runners/runner-f537d27d-project-0-concurrent-08xltv to be running, status is Pending
Waiting for pod ionic-runners/runner-f537d27d-project-0-concurrent-08xltv to be running, status is Pending
Waiting for pod ionic-runners/runner-f537d27d-project-0-concurrent-08xltv to be running, status is Pending
Waiting for pod ionic-runners/runner-f537d27d-project-0-concurrent-08xltv to be running, status is Pending
Waiting for pod ionic-runners/runner-f537d27d-project-0-concurrent-08xltv to be running, status is Pending
Waiting for pod ionic-runners/runner-f537d27d-project-0-concurrent-08xltv to be running, status is Pending
Running on runner-f537d27d-project-0-concurrent-08xltv via gitlab-runner-55f5c4f79c-p6f75...
Cloning repository...
Cloning into '/builds/project-0'...
Checking out 7dec6cea as master...
Updating/initializing submodules...
$ run "fetch-updates"
$ run "build-android"
[01:22:44]: ------------------------------
[01:22:44]: --- Step: default_platform ---
[01:22:44]: ------------------------------
[01:22:44]: Driving the lane 'android package_build' 🚀
[01:22:46]: ---------------------------
[01:22:46]: --- Step: build_summary ---
[01:22:46]: ---------------------------

+---------------------+---------------------------+
| Build Summary |
+---------------------+---------------------------+
| Job ID | 6810671 |
| Node.js version | v10.19.0 |
| Cordova CLI version | 9.0.3 (cordova-lib@9.0.2) |
| npm version | 6.13.4 |
+---------------------+---------------------------+

[01:22:46]: ---------------------------------
[01:22:46]: --- Step: add_git_credentials ---
[01:22:46]: ---------------------------------
[01:22:46]: --------------------------------
[01:22:46]: --- Step: detect_native_type ---
[01:22:46]: --------------------------------
[01:22:46]: Checking if cordova or capacitor project
[01:22:46]: Cordova project detected
[01:22:46]: -------------------------
[01:22:46]: --- Step: get_web_dir ---
[01:22:46]: -------------------------
[01:22:46]: webDir is `www`
[01:22:46]: -------------------------------
[01:22:46]: --- Step: modify_config_xml ---
[01:22:46]: -------------------------------
[01:22:46]: No custom native config detected.
[01:22:46]: ---------------------------------
[01:22:46]: --- Step: download_credential ---
[01:22:46]: ---------------------------------
[01:22:46]: No build credential specified
[01:22:46]: ---------------------------
[01:22:46]: --- Step: build_pro_app ---
[01:22:46]: ---------------------------
+----------------------------+-----------------------+
| Lane Context |
+----------------------------+-----------------------+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | android |
| LANE_NAME | android package_build |
| PROJECT_WEB_DIR | www |
| DOWNLOAD_CREDENTIAL_EXISTS | false |
+----------------------------+-----------------------+
[01:22:46]: No package.json file found in root of project.

+------+---------------------+-------------+
| fastlane summary |
+------+---------------------+-------------+
| Step | Action | Time (in s) |
+------+---------------------+-------------+
| 1 | default_platform | 0 |
| 2 | build_summary | 0 |
| 3 | add_git_credentials | 0 |
| 4 | detect_native_type | 0 |
| 5 | get_web_dir | 0 |
| 6 | modify_config_xml | 0 |
| 7 | download_credential | 0 |
| 💥 | build_pro_app | 0 |
+------+---------------------+-------------+

[01:22:46]: fastlane finished with errors
/usr/local/bundle/bin/fastlane: [!] No package.json file found in root of project. (RuntimeError)
/builds/project-0/fastlane/actions/build_pro_app.rb:18:in `run': No package.json file found in root of project. (RuntimeError)
from /usr/local/bundle/gems/fastlane-2.143.0/fastlane/lib/fastlane/runner.rb:261:in `block (2 levels) in execute_action'
from /usr/local/bundle/gems/fastlane-2.143.0/fastlane/lib/fastlane/actions/actions_helper.rb:50:in `execute_action'
from /usr/local/bundle/gems/fastlane-2.143.0/fastlane/lib/fastlane/runner.rb:253:in `block in execute_action'
from /usr/local/bundle/gems/fastlane-2.143.0/fastlane/lib/fastlane/runner.rb:227:in `chdir'
from /usr/local/bundle/gems/fastlane-2.143.0/fastlane/lib/fastlane/runner.rb:227:in `execute_action'
from /usr/local/bundle/gems/fastlane-2.143.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
from /usr/local/bundle/gems/fastlane-2.143.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
from Fastfile:129:in `block (2 levels) in parsing_binding'
from /usr/local/bundle/gems/fastlane-2.143.0/fastlane/lib/fastlane/lane.rb:33:in `call'
from /usr/local/bundle/gems/fastlane-2.143.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
from /usr/local/bundle/gems/fastlane-2.143.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
from /usr/local/bundle/gems/fastlane-2.143.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
from /usr/local/bundle/gems/fastlane-2.143.0/fastlane/lib/fastlane/lane_manager.rb:56:in `cruise_lane'
from /usr/local/bundle/gems/fastlane-2.143.0/fastlane/lib/fastlane/command_line_handler.rb:36:in `handle'
from /usr/local/bundle/gems/fastlane-2.143.0/fastlane/lib/fastlane/commands_generator.rb:108:in `block (2 levels) in run'
from /usr/local/bundle/gems/commander-fastlane-4.4.6/lib/commander/command.rb:178:in `call'
from /usr/local/bundle/gems/commander-fastlane-4.4.6/lib/commander/command.rb:153:in `run'
from /usr/local/bundle/gems/commander-fastlane-4.4.6/lib/commander/runner.rb:476:in `run_active_command'
from /usr/local/bundle/gems/fastlane-2.143.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in `run!'
from /usr/local/bundle/gems/commander-fastlane-4.4.6/lib/commander/delegates.rb:15:in `run!'
from /usr/local/bundle/gems/fastlane-2.143.0/fastlane/lib/fastlane/commands_generator.rb:349:in `run'
from /usr/local/bundle/gems/fastlane-2.143.0/fastlane/lib/fastlane/commands_generator.rb:41:in `start'
from /usr/local/bundle/gems/fastlane-2.143.0/fastlane/lib/fastlane/cli_tools_distributor.rb:119:in `take_off'
from /usr/local/bundle/gems/fastlane-2.143.0/bin/fastlane:23:in `<top (required)>'
from /usr/local/bundle/bin/fastlane:23:in `load'
from /usr/local/bundle/bin/fastlane:23:in `<main>'
Running after script...
$ run "clean-up"
ERROR: Job failed: command terminated with exit code 1


Posts: 1

Participants: 1

Read full topic

Issues with community plugins not being accessible

$
0
0

@dnlgrwd wrote:

I have an Angular Ionic application using Capacitor. I am trying to include the following plugin for voice recording: https://bitbucket.org/tchvu3/capacitor-voice-recorder/src/master/

I followed the steps to npm install --save capacitor-voice-recorder, have the following in my code:

import { Component, OnInit } from '@angular/core';

import { Plugins } from "@capacitor/core";
@Component({
    selector: 'app-my-page',
    templateUrl: './my-page.page.html',
    styleUrls: ['./my-page.page.scss'],
})
export class MyPage implements OnInit {

    constructor() { }

    ngOnInit() { }

    async showData() {
        const { VoiceRecorder } = Plugins;
        console.log(VoiceRecorder);
        console.log(Plugins);
    }
}

I already had android added for the project, but to be sure, I removed the android folder and ran:

npx cap add android
npx cap copy android
npx cap sync
npx cap open android

I could see that the voice recorder plugin was included in the project in Android Studio, however, when showData() method is called, VoiceRecorder is undefined and Plugins does not have the VoiceRecorder on it (I am running the Chrome remote device debugger to see console output).

I normally use the command: ionic capacitor run android -l --external to have live reload, if that makes any difference.

I’m new to mobile development, so I may be missing something obvious. Does anyone know why the voice recorder plugin is not accessible on the Plugins object?

Posts: 1

Participants: 1

Read full topic

Android Build Grandle Error

$
0
0

@zafer4556 wrote:

Hello,
I want to get android build with v1 but it gives error as below.
Do you have any help?

  • What went wrong:
    Failed to capture fingerprint of �nput files for task ‘: app: generateReleaseBuildConfig’ property ‘checkManifestResult’ during up-to-date check.

Resolving this BuildableArtifact can only done during task execution.

İonic İnfo
Ionic:

ionic (Ionic CLI) : 4.5.0 (C:\Users\QUEST-PC\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : ionic1 1.3.4
@ionic/v1-toolkit : 1.0.14

Cordova:

cordova (Cordova CLI) : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : android 8.1.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 2.3.1, (and 11 other plugins)

System:

NodeJS : v12.13.1 (C:\Program Files\nodejs\node.exe)
npm : 6.13.4
OS : Windows 10

Plugin List
com.darktalker.cordova.screenshot 0.1.6 “com.darktalker.cordova.screenshot”
cordova-admob-plus 0.0.0 “@admob-plus/cordova”
cordova-plugin-apprate 1.4.0 “AppRate”
cordova-plugin-device 2.0.2 “Device”
cordova-plugin-dialogs 2.0.1 “Notification”
cordova-plugin-globalization 1.11.0 “Globalization”
cordova-plugin-inappbrowser 3.0.0 “InAppBrowser”
cordova-plugin-ionic-keyboard 2.1.3 “cordova-plugin-ionic-keyboard”
cordova-plugin-ionic-webview 2.3.1 “cordova-plugin-ionic-webview”
cordova-plugin-nativestorage 2.3.2 “NativeStorage”
cordova-plugin-network-information 2.0.1 “Network Information”
cordova-plugin-splashscreen 5.0.2 “Splashscreen”
cordova-plugin-statusbar 2.4.2 “StatusBar”
cordova-plugin-whitelist 1.3.3 “Whitelist”
onesignal-cordova-plugin 2.4.6 “OneSignal Push Notifications”

Posts: 1

Participants: 1

Read full topic

How get current internet speed in kbps or Mbps for ionic 4 angular 6 project

$
0
0

@arunRaj1986 wrote:

Hey guys ,

I’m developing a ionic 4 angular 6 web app (cards game).
i want to stop user action detecting slower internet i.e based on real time internet speed,

I have tried several ionic packages, but they detect only type of network.(ex 2g, 3g, 4g etc)
But i want the code which give real time internet speed like how how other apps detect slower internet.

If anybody cracked it out, will be be much useful.

Thank you

Posts: 2

Participants: 2

Read full topic

Viewing all 70432 articles
Browse latest View live


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