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

Firebase plugin generates gradle error

$
0
0

@liviubaws wrote:

Hello.
I have a problem with cordova-plugin-firebase.
At first the problem appeared while I was working on a project, but now, even if I create a new project and just add the plugin from the command line, then I try to emulate the project or build, it fails.

Failed to capture fingerprint of input files for task ':app:preDebugBuild' property 'compileManifests' during up-to-date check.
> Task :app:preDebugBuild FAILED
3 actionable tasks: 1 executed, 2 up-to-date
> The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[16.5.0,16.5.0], [16.4.0,16.4.0]], but resolves to 16.5.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.

Any ideas?

Posts: 1

Participants: 1

Read full topic


--prod build- app stuck after splash screen

$
0
0

@Rbanis92 wrote:

Ionic:

ionic (Ionic CLI) : 4.11.0
Ionic Framework : @ionic/angular 4.0.0
@angular-devkit/build-angular : 0.13.8
@angular-devkit/schematics : 7.2.4
@angular/cli : 7.2.4
@ionic/angular-toolkit : 1.3.0

Cordova:

cordova (Cordova CLI) : 9.0.0
Cordova Platforms : android 8.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 20 other plugins)

System:

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

Hi, my app runs well in normal build. but in --prod build it stucks after splash screen. in chrome inspect i got the error:

Unhandled Promise rejection: StaticInjectorError(ne)[t -> t]:
StaticInjectorError(Platform: core)[t -> t]:
NullInjectorError: No provider for t! ; Zone: ; Task: Promise.then ; Value: Error: StaticInjectorError(ne)[t -> t]:
StaticInjectorError(Platform: core)[t -> t]:
NullInjectorError: No provider for t!

Posts: 1

Participants: 1

Read full topic

How to calculate total distance between origin and current location when vehicle is moving

$
0
0

@tomucidi wrote:

Previously i am using ionic geolocation and google distance matrix api. But when the vehicle moving total distance calculation vale is increases suddenly.

Posts: 1

Participants: 1

Read full topic

Bluetooth Printer does not printing arabic in good format

$
0
0

@ishaquemujtaba wrote:

I am working on Honeywell Bluetooth Printer, I have printed text using cordova-plugin-detect plugin but facing problem while printing arabic dear seniors kindly help…

Posts: 1

Participants: 1

Read full topic

Default value of an input field not passed after form submission

$
0
0

@ioclaudio wrote:

Hi,
I have a form built with an input field, called device_id, that has a pre-filled value.
It happens that, if the user doesn’t modify the field, in the submit function the values is empty.
If the user writes something, then the right value is passed.

This is the field of the form:

            <ion-input type="text" formControlName="device_id"  value="56" required>
            </ion-input>

This is the form definition:

    this.reportForm = this.formBuilder.group({
        device_id: ['', Validators.compose([])
....

If I submit the form without modifying the content of the field device_id:

  onSubmit(values) {
    console.log('@@ REPORT submit: ', values);

The Chrome console shows:

 {device_id: "", msg_text: "dasdasd",...}

How is it possible?

Thank you

cld

Posts: 1

Participants: 1

Read full topic

Translate (Storage) Problem

$
0
0

@LacOniC wrote:

Here is my code in app.component.ts. When i start app, initTranslate() works but code in this.storage.get(‘lang’).then(val => section does not work. So culture, htmlLanguage etc. does not change. Do you see any wrong that i can’t see?

Ps: It does not work in device (iPhone 5) or simulator. No problem in browser.

Posts: 1

Participants: 1

Read full topic

Ionic 4: Platform.is returns wrong value when installed apk in android 4.4.4

$
0
0

@dvtopiya wrote:

I have created an app using Ionic 4 and built android app with below code .

alert('desktop ' + this.platform.is('desktop'));

When I installed an app in android 4.4.4 version device and emulator, it is showing the alert value as true whereas In other higher OS version device it is showing as false .

I have used platform condition at so many places in my code. Because of the above issue code is breaking in android 4.4.4 devices.

I am not able to understand why it is showing desktop platform as true in android kitkat device?

ionic info :

Ionic:

   ionic (Ionic CLI)             : 4.12.0 (C:\Users\user1\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework               : @ionic/angular 4.4.2
   @angular-devkit/build-angular : 0.13.9
   @angular-devkit/schematics    : 7.3.9
   @angular/cli                  : 7.3.9
   @ionic/angular-toolkit        : 1.5.1

Cordova:

   cordova (Cordova CLI) : 9.0.0 (cordova-lib@9.0.1)
   Cordova Platforms     : android 8.0.0
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.0.1, (and 4 other plugins)

System:

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

Can anyone please provide any solution to this issue?

Posts: 1

Participants: 1

Read full topic

AppFlow - Live Deploy not working

$
0
0

@fanis wrote:

I followed the instructions for the Live Update as seen here https://ionicframework.com/docs/appflow/quickstart/deploy and it doesn’t work.

The steps I am following are as follows:

  • ionic cordova run android --device (I have the application on my mobile)
  • I do a simple change on the UI and push the change
  • From the commits page in the AppFlow, I select the commit and click the Start Web Build
  • I assign the build to Production channel
  • I open the application in my mobile and expect to see the UI changes
  • no luck. It doesn’t work.

This is the configuration I have

    <plugin name="cordova-plugin-ionic" spec="5.3.0">
        <variable name="APP_ID" value="******" />
        <variable name="CHANNEL_NAME" value="Production" />
        <variable name="UPDATE_METHOD" value="auto" />
        <variable name="UPDATE_API" value="https://api.ionicjs.com" />
        <variable name="MAX_STORE" value="2" />
        <variable name="MIN_BACKGROUND_DURATION" value="30" />
    </plugin>

Any help is more than welcome

Thanks

Posts: 1

Participants: 1

Read full topic


[IONIC 4] toggle menu button in one page

$
0
0

@NurGuz wrote:

Hi guys,

i want to create an toggle menu only in one tab page, but i don’t know how.

It doesn’t work:



  <ion-header>
 <ion-toolbar>
    <ion-title>Right side menu toggle</ion-title>
    <ion-buttons slot="end">
      <ion-menu-button autoHide="false"></ion-menu-button>
    </ion-buttons>
  </ion-toolbar>
  </ion-header>
  <ion-content>
    <ion-list>
      <ion-item>Menu Item</ion-item>
      <ion-item>Menu Item</ion-item>
      <ion-item>Menu Item</ion-item>
      <ion-item>Menu Item</ion-item>
      <ion-item>Menu Item</ion-item>
    </ion-list>
  </ion-content>


<ion-content></ion-content>

Any ideas?

Thanks a lot

Posts: 1

Participants: 1

Read full topic

White areas when scrolling over virtualScroll with image grid

$
0
0

@codiqa100078139 wrote:

Hi all ,

I am working with Ionic for along time and made most of my applications with Ionic 3 framework.

Now I am developing an application for image selection.
In this application I have a list of tabs. each tab is a alum library on the device.
And the first tab is for a list of all images from all albums.

So when a user clicks on a tab I show a virtualScroll list with a grid of the images in that tab the images are taken from the device.

The problem is that when I scroll/swipe quickly up and and down I see a white area for a 1-3 seconds and only after that I see the images.

I am stuck with this problem for a week now !

What is the problem with that and how can I fix it?

You can see a demonstration of what I am talkink about in this screen video I made
https://www.youtube.com/watch?v=CsacKtyKcpA

And a screen shot:

Here is my HTML code for showing the images:

<ion-header>
  <ion-navbar>
    <ion-title>images: {{pageTitle}}</ion-title>
  </ion-navbar>
</ion-header>

<ion-content>
  <div class="wrapper-div">
    <ion-grid [virtualScroll]="albumImages" [approxItemHeight]="'100px'" bufferRatio="5">
      <ion-row>
        <ion-col col-4 *virtualItem="let image">
          <div class="image" [style.height.px]="imageHeight">
            <img-loader [src]="image.url" useImg></img-loader>
          </div>
        </ion-col>
      </ion-row>
    </ion-grid>
  </div>
</ion-content>

Posts: 1

Participants: 1

Read full topic

Write mp3 from url to system

$
0
0

@lieuweberg wrote:

I’ve been at this for too long, and can’t get it to work at all. I tried a lot of different things too.

How am I supposed to write an mp3 from a download prompt (from an api) to the file system?

    constructor(private transfer: FileTransfer, private platform: Platform, private file: File) {
        platform.ready().then(() => {
            if (platform.is('android')) this.fileLocation = file.documentsDirectory;
            else this.fileLocation = file.dataDirectory;

            console.log(this.fileLocation);
        })
    }

    fileLocation: string;

    download(id: string) {   
        const fileTransfer : FileTransferObject = this.transfer.create();
        
        fileTransfer.download(`https://api.com/get/audio/${id}`, this.fileLocation).then(entry => {
            console.log(entry);
        }).catch(err => console.log(err));
    }

Posts: 1

Participants: 1

Read full topic

GoogleToolboxForMac issue compilation IOS

$
0
0

@ericcoquelin wrote:

Hello community,

I can’t generate my IPA file in ionicframework pro and in console I get the following error :

:warning: ld: directory not found for option ‘-L/Users/ionic/Library/Developer/Xcode/DerivedData/xxxxxxx-ffjfmwdbcobogrgfjaarpuutzuro/Build/Intermediates.noindex/ArchiveIntermediates/xxxxx/BuildProductsPath/Release-iphoneos/GoogleToolboxForMac’
:warning: ld: directory not found for option ‘-L/Users/ionic/Library/Developer/Xcode/DerivedData/xxxx-ffjfmwdbcobogrgfjaarpuutzuro/Build/Intermediates.noindex/ArchiveIntermediates/xxxxx/BuildProductsPath/Release-iphoneos/Protobuf’
:warning: ld: directory not found for option ‘-L/Users/ionic/Library/Developer/Xcode/DerivedData/xxxxx-ffjfmwdbcobogrgfjaarpuutzuro/Build/Intermediates.noindex/ArchiveIntermediates/xxx/BuildProductsPath/Release-iphoneos/nanopb’

:x: ld: library not found for -lGoogleToolboxForMac

:x: clang: error: linker command failed with exit code 1 (use -v to see invocation)

[13:02:56]: Exit status: 65

Your export_method in gym is defined as development
[13:02:56]: which might cause problems when signing your application
[13:02:56]: Are you sure want to build and export for development?
[13:02:56]: Please make sure to define the correct export methods when calling
[13:02:56]: gym in your Fastfile or from the command line

Any Help Appreciated ?

Posts: 1

Participants: 1

Read full topic

Ionic Android App Bundle

Make single view selectable

$
0
0

@ifeghali wrote:

hello

i need to make a single view’s contents selectable. all solutions i found applies somehow to all app so it doesn’t fit my needs. template as follows:

<ion-view title="Placar" id="page8" style="" cache-view="false">
  <ion-content padding="true" class="has-header">
    <h1 id="placar-heading3" style="color:#000000;">{{ details.mes }}</h1>
      <ion-text>
        <p style="font-family: monospace">Nome.............. TT PT DO FS SP</p>
      </ion-text>
      <ion-text ng-repeat="d in details.ranking">
        <p style="margin-bottom: 2px; font-family: monospace"><span ng-bind-html="d.rank"></span> {{ d.nome }} {{ d.tt }} {{ d.pt }} {{ d.do }} {{ d.fds }} {{ d.sp }}</p>
      </ion-text>
      <ion-text>
        <p style="font-weight: bold">atualizado em {{ details.atualizacao }}</p>
      </ion-text>
  </ion-content>
</ion-view>

any clue on how to make only this view’s content selectable ?

thank you.

Posts: 1

Participants: 1

Read full topic

Firebase Database Queries and Connections to app

$
0
0

@Tshepang01 wrote:

Hi All, I’m working on a application for an accommodation booking that I need to connect to a firestore database. But I’m struggling with connecting the application(web) to the database. Any help would be appreciated

Posts: 1

Participants: 1

Read full topic


[Ionic 4] HTTP requests errors

$
0
0

@leonardofmed wrote:

I’m a couple of days trying to debug some app with HTTP requests in a localhost server. I think this is the one of the most frustrating errors that I stumbled across. The first error was with CORS, followed by some others, something like this:

XMLHttpRequest cannot load http://localhost:8888.
No 'Access-Control-Allow-Origin' header is present on the requested resource.
Origin 'http://localhost:8100' is therefore not allowed access.

I tried to allow all domains in the server configuration and in the app options, nothing changed. Later I did so many things that I don’t even remember what I did to stop that CORS error, but I don’t effectively fixed it, the other errors keeping haunting me:

I also tried to deactive the chrome CORS with an extension and later with the options: "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-web-security --disable-gpu --user-data-dir=~/chromeTemp. Nothing changed.

Ionic v4
Dev Server: PHP built in server
Running with: ionic serve

home.page.ts

...

async Save(data) {
	let myLink = "http://localhost:1337/upload.php"
	let myDataArray = [{"point_id" : this.point_id, "name" : this.name, "obs" : this.obs, "coord" : this.coord}];
	let myData = JSON.stringify(myDataArray);

	const httpOptions = {
		headers: new HttpHeaders({
		  'Content-Type':  'application/json',
		  'Access-Control-Allow-Origin': '*',
		  'Access-Control-Allow-Methods': 'POST, GET, OPTIONS',
		  'Access-Control-Allow-Headers': 'Content-Type',
		  'Accept': 'application/json'
		})
	};

	const loading = await this.loadingController.create({
	    message: 'Uploading data...',
	});
	await loading.present();
	
	this.http.post(myLink, myData, httpOptions)
	.pipe(
	    finalize(() => {
	        loading.dismiss();
	    })
	)
	.subscribe(res => {
	    if (res['success']) {
	        this.presentToast('Data upload complete.')
	    } else {
	        this.presentToast('Data upload failed.')
	    }
	});
}

upload.php (headers only)

<?php
  header('Access-Control-Allow-Origin: *');
  header('Access-Control-Allow-Methods: GET, POST, OPTIONS');
  header('Access-Control-Allow-Headers: Origin, Content-Type, X-Auth-Token');
  header('Content-Type: application/json');

...

If any other information is needed, just ask :smile:

Posts: 1

Participants: 1

Read full topic

Location:"default" ionic and sqlite

$
0
0

@dbarett wrote:

Good morning,

I am working with sqlite in my application which should work online and offline, but I need to know in my device where the database is stored

this.sotrage.create ({name: “data.db”, location: “default”}). then ((db: SQLiteObject) => {

with the default location route

Posts: 1

Participants: 1

Read full topic

Devapp, Ionic CLI and Vue.js

$
0
0

@bbakker wrote:

Will Devapp iand the Ionic CLI n the future also work with vue.js apps?

Thanks in advance!

Posts: 1

Participants: 1

Read full topic

Ionic 4 released January 2019, now we have Ionic 5

$
0
0

@thetazzbot wrote:

How do we go from 4 to 5 in less than 6 months? Going from 4.1.2 to 5.0.0.

Now what’s going to break? Going from 3 to 4 was painful.

Why are version numbers moving so fast? This npm is going to bug me forever now to update to 5.0

Update available 4.12.0 → 5.0.0 │
│ Run npm i -g ionic to update

Posts: 1

Participants: 1

Read full topic

Application to broadcast to a shoutcast / icecast server

$
0
0

@MOUELE wrote:

I am creating a mobile application with Ionic3. The goal is to stream audio from my phone (music or live recording) to my shoutcast or icecast radio server. I don’t know which solution used (websocket, or other). Server side: url, password, username, port, bitrate. Please help me. THANK YOU !!!

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>