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

BackgroundMode Not Installing Cordova 9

$
0
0

@rindegastos wrote:

Hi there:

I recently updated cordova and Ionic and the BackgroundMode Plugin is not installing and the warning message showed is not complete, it just shows “warn”.

Cristians-MacBook-Pro:test cristian$ ionic cordova plugin add cordova-plugin-background-mode

cordova plugin add cordova-plugin-background-mode --save

Installing “cordova-plugin-background-mode” for ios

warn

Cristians-MacBook-Pro:test cristian$

The folder of the plugin is added to the plugins folder but it is not added to the package.json file and it does not work when I try the app in a device. The files in Xcode for the plugin are not there. The same is happening for android platform. I tried in a completely new project and the same happens.

My dev enviroment info:

Ionic:

ionic (Ionic CLI) : 4.12.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.3
@ionic/app-scripts : 3.2.1

Cordova:

cordova (Cordova CLI) : 9.0.0
Cordova Platforms : ios 5.0.0
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 11 other plugins)

System:

ios-deploy : 2.0.0
ios-sim : 7.0.0
NodeJS : v10.15.3 (/usr/local/bin/node)
npm : 6.4.1
OS : macOS Mojave
Xcode : Xcode 10.2 Build version 10E125

Posts: 1

Participants: 1

Read full topic


Execution failed for task ':app:processDebugManifest'

$
0
0

@alexmpc wrote:

BUILD FAILED in 8s
C:\Users\est-acoelho\Documents\app-movel-master\app-movel-master\platforms\android\gradlew: Command failed with exit code 1 Error output:
Note: C:\Users\est-acoelho\Documents\app-movel-master\app-movel-master\platforms\android\CordovaLib\src\org\apache\cordova\engine\SystemCookieManager.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
C:\Users\est-acoelho\Documents\app-movel-master\app-movel-master\platforms\android\app\src\main\AndroidManifest.xml:15:5-74 Error:
uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:CordovaLib] C:\Users\est-acoelho\Documents\app-movel-master\app-movel-master\platforms\android\CordovaLib\build\intermediates\library_manifest\debug\AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project’s minSdk version to at least 19,
or use tools:overrideLibrary=“org.apache.cordova” to force usage (may lead to runtime failures)

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:app:processDebugManifest’.

Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:CordovaLib] C:\Users\est-acoelho\Documents\app-movel-master\app-movel-master\platforms\android\CordovaLib\build\intermediates\library_manifest\debug\AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project’s minSdk version to at least 19,
or use tools:overrideLibrary=“org.apache.cordova” to force usage (may lead to runtime failures)

Cordova Version : 9.0.0
Android : 8.0.0

Posts: 1

Participants: 1

Read full topic

Ionic 4: workaround to Ionic Lab black screen error

How to make the fields active when i choose the option Manuelle and disabled when i choose Automatique , help me please

$
0
0

@Fares95 wrote:

mypage.html

<ion-header>

  <ion-navbar color="tertiary">
    <ion-title>Effectuer-réclamation</ion-title>
  </ion-navbar>

</ion-header>

<ion-content padding>


  <ion-row justify-content-center align-items-center style="height: 100%">
    <p>
      Commencer La Réclamation
    </p>
  <form #f="ngForm" novalidate [formGroup]="Form"  (ngSubmit)="onSubmit(f)" >

            <ion-item>
            <ion-label  multiple="true" stacked> Localisation </ion-label>
                            <ion-select formControlName="localisation">
                            <ion-option> Automatique </ion-option>
                            <ion-option> Manuelle </ion-option>
                            </ion-select>
            </ion-item>
            <ion-item no-lines *ngIf="( Form.get('localisation').hasError('required') ) && Form.get('localisation').touched">

            <div class="error">
            Champ Obligatoire
            </div>
            </ion-item>

            <ion-item>
            <ion-label  multiple="true" stacked disabled >Gouvernorat : </ion-label>
                      <ion-select formControlName="gouvernorat"  >
                          <ion-option >Ariana </ion-option>
                          <ion-option >Béja</ion-option>
                          <ion-option >Ben Arous</ion-option>
                          <ion-option >Bizerte </ion-option>
                          <ion-option >Gafsa</ion-option>
                          <ion-option >Gabès</ion-option>
                          <ion-option >Jendouba</ion-option>
                          <ion-option >Kairouan</ion-option>
                          <ion-option >Kasserine</ion-option>
                          <ion-option >Kébili</ion-option>
                          <ion-option >Le Kef</ion-option>
                          <ion-option >Mahdia</ion-option>
                          <ion-option >La Manouba</ion-option>
                          <ion-option >Médenine</ion-option>
                          <ion-option >Monastir</ion-option>
                          <ion-option >Nabeul</ion-option>
                          <ion-option >Sfax</ion-option>
                          <ion-option >Sidi Bouzid</ion-option>
                          <ion-option >Siliana</ion-option>
                          <ion-option >Sousse</ion-option>
                          <ion-option >Tataouine</ion-option>
                          <ion-option >Tozeur</ion-option>1
                          <ion-option >Tunis</ion-option>
                          <ion-option >Zaghouan</ion-option>
                      </ion-select>
                      </ion-item>

                    <ion-item no-lines *ngIf="( Form.get('gouvernorat').hasError('required') ) && Form.get('gouvernorat').touched">
                    <div class="error">
                    Champ Obligatoire
                    </div>
                    </ion-item>

                          <ion-item>
                          <ion-label  stacked>code postal</ion-label>
                          <ion-input type="number" formControlName="postal" disabled placeholder="3170"></ion-input>
                          </ion-item>

                          <ion-item class="error" *ngIf="!Form.controls.postal.valid  && (Form.controls.postal.dirty || submitAttempt)">

                          <div class="error">
                          Champ de 4 chiffres !
                          </div>
                          </ion-item>

                          <ion-item no-lines *ngIf="( Form.get('postal').hasError('required') ) && Form.get('postal').touched">
                          <div class="error">
                          Champ Obligatoire
                          </div>
                          </ion-item>

                    <ion-item>
                      <ion-textarea  disabled formControlName="adresse" placeholder="Adresse"></ion-textarea>
                    </ion-item>

                      <ion-item no-lines *ngIf="( Form.get('adresse').hasError('required') ) && Form.get('adresse').touched">
                      <div class="error">
                      Champ Obligatoire
                      </div>
                      </ion-item>

                    <ion-item>
                      <ion-textarea  disabled formControlName="description" placeholder="Description textuelle"></ion-textarea>
                    </ion-item>
                    <ion-item class="error" *ngIf="!Form.controls.description.valid  && (Form.controls.description.dirty || submitAttempt)">

                    <div class="error">
                    Non Valide !
                    </div>
                    </ion-item>
                    <ion-item no-lines *ngIf="( Form.get('description').hasError('required') ) && Form.get('description').touched">
                    <div class="error">
                    Champ Obligatoire
                    </div>
                    </ion-item>

                    <ion-item>
                    <ion-label  stacked>Vos fichiers</ion-label>
                    <ion-input type="file" formControlName="fichiers" accept="file_extension|video/*|image/*|media_type"  disabled></ion-input>
                    </ion-item>

                    <ion-item no-lines *ngIf="( Form.get('fichiers').hasError('required') ) && Form.get('fichiers').touched">
                    <div class="error">
                    Champ Obligatoire
                    </div>
                    </ion-item>

                  <ion-col text-center>
                   <button ion-button block color="success" (click)="onEffectuer()" [disabled]="Form.invalid">
                   Effectuer Réclamation
                   </button>
                  </ion-col>

    </form>
    </ion-row>
</ion-content>



<style type="text/css">
.error
{
color:red;
}
</style>

mypage.ts

import { Component } from '@angular/core';
import { NavController, NavParams, ToastController} from 'ionic-angular';
import { FormBuilder, FormGroup, Validators, NgForm, FormControl,ValidatorFn,AbstractControl } from '@angular/forms';
import { EspaceCitoyenPage } from '../espace-citoyen/espace-citoyen';

@Component({
  selector: 'page-effectuer-reclamation',
  templateUrl: 'effectuer-reclamation.html',
})
export class EffectuerReclamationPage {
  private Form : FormGroup;
  public submitAttempt: boolean = false;


  constructor(public navCtrl: NavController, public navParams: NavParams, public toastCtrl: ToastController, private formBuilder: FormBuilder) {
    this.Form = formBuilder.group({

        localisation: ['', Validators.compose([Validators.required ])],
        gouvernorat: ['', Validators.compose([Validators.required])],
        postal: ['', Validators.compose([Validators.required, Validators.minLength(4), Validators.pattern('[0-9]*'), Validators.maxLength(4)])],
        adresse : ['', Validators.compose([Validators.required , Validators.maxLength(60) ])],
        description : ['', Validators.compose([Validators.required, Validators.pattern('[a-zA-Z _]+[a-zA-Z _]') ])],
        fichiers : ['', Validators.compose([Validators.required ])]
        });
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad EffectuerReclamationPage');
  }


onEffectuer() {
this.navCtrl.push(EspaceCitoyenPage);
}


onSubmit(form: NgForm) {
this.submitAttempt= true;
    console.log(form.value);
    const toast = this.toastCtrl.create({
      message: 'Félicitations ; Votre réclamation a été effectué !',
      duration: 3000
    });
    toast.present();
}

}

help me please , i really do not know how to do this

screen capture

Posts: 1

Participants: 1

Read full topic

Youtube Video Player - Package can't find XCDYouTubeKit library

$
0
0

@kshabunov wrote:

Hi everyone!

I am trying to build iOS version using Ionic Package. My app uses Youtube Video Player native plugin. It gives the following error while building (linking):

library not found for -lXCDYouTubeKit

I had same problem with it when doing local build for the emulator, so I had to get the library using “pod install”.

Please, explain how this could be solved for Ionic Package.

Thanks a lot in advance.

Posts: 1

Participants: 1

Read full topic

Scroll-into-view not working

$
0
0

@max_maeuschen wrote:

Trying to migrate my app to ionic 4 there’s a problem using scroll-into-view again:

There’s a searchbar to find something in content, using mark.js to highlight every hit. It’s working so far and even the wanted hit is highlighted in a special color, but using scroll-into-view to scroll to the wanted hit, it isn’t working.

xy.page.html:

<ion-content padding>
  <div [innerHtml]="content"></div>
</ion-content>

xy.page.ts: (fragments only)

import * $ from 'jquery';
import * as Mark from 'mark.js';
import * as scrollElmIntoView from 'scroll-into-view';

...

scrollToSearched() {
   ...
   scrollElmIntoView(currentMark[0], { time: 250 });
}

Can you help me? Is there any other solution to achieve this? Thanks in advance!

Posts: 1

Participants: 1

Read full topic

My page's css file is not being activated in my modal page Ionic 4

$
0
0

@javiersoto1797 wrote:

In my modal page, the html of course is working but when i want to add my class from the page’s css file, it does not apply. This is how im creating the modal page and sending the basic css file that models the window. Function that creates the modal async openAddPlan() { // Function that opens Add Plan page as a modal

const addplan = await this.modalCtr.create({
  component: AddPlanPage,
  componentProps: {
    user_id: this.userId
  },
  cssClass: 'modal-Plan'
});
await addplan.present();
}

global.scss

.modal-Plan .modal-wrapper{
height: 550px;
max-height: 100%;
width: 900px;
max-width: 100%;
position: fixed;
}

the html extract from modal page

<div class="inlineBlock">
<span>
  <ion-item>
    <ion-select placeholder="Select Plan Type" [(ngModel)]="planObject.planName" interface="popover">
      <ion-select-option *ngFor="let name of planList" [value]="name.planN">
        {{name.planN}}
      </ion-select-option>
    </ion-select>
  </ion-item>
</span>
.
.
.
</div>

and this is the class i want to apply

.inlineblock{
ion-item{
    width: 10vw;
}
}

Posts: 1

Participants: 1

Read full topic

Is there any way to add a timer value (10 seconds), same as the duration of the loader to message of ion-loading

$
0
0

@marytee123 wrote:

I am using ionic 4 with Angular 7, to create a loading icon

Code:

async presentLoadingWithOptions(message) {

    const loading = await this.loadingController.create({
        spinner: 'bubbles',
        duration: 10000,
        message: message,
        translucent: true,
        cssClass: 'custom-class custom-loading'
    });
    await loading.present();

    const { role, data } = await loading.onDidDismiss();

  do something();
}

}

I want to pass 10, 9, 8, 7 6, 5 … 1 as a message, to the loader. Is there any possibility to do that?

Posts: 1

Participants: 1

Read full topic


Ionic 4 ion-item-sliding cannot closed by api

$
0
0

@garyc2232 wrote:

Hi, I am using ion-item-sliding and i want it to be close after i click the button. However i try to use IonItemSliding.close() to close the ion-item-sliding, but it said
ERROR Error: Uncaught (in promise): TypeError: item.close is not a function TypeError: item.close is not a function

Below is my code

//test.html
<ion-item-sliding *ngFor="let item of items">
    <ion-item-options #item side="end">
            <ion-item-option (click)="unread(item.status, item)">click me</ion-item-option>
    </ion-item-options>
</ion-item-sliding>
//test.ts
import { IonItemSliding } from '@ionic/angular';
...
unread(s, item: IonItemSliding){
    console.log(s);
    item.close();

  }

This is my reference from ionic 3

Posts: 1

Participants: 1

Read full topic

Mock ionic/native firebase plugin

$
0
0

@ranjithreddy wrote:

I used firebase plugin for push notifications I want to write the test cases for that I need to mock Firebase: ‘@ionic-native/firebase/ngx’; how to mock this?

Posts: 1

Participants: 1

Read full topic

Navctrl.push not working on oreo and pie android versions #ionic 3

$
0
0

@sreeragsp wrote:

hai i have a list of cards in a page and on clicking the card user is directed to its inner page.
using click event and navctrl.push opertaions .successfully abled to do the same on paltforms upto nougat. but not working on above them.please help.

Posts: 1

Participants: 1

Read full topic

Error: "Uncaught (in promise): [object Object]

$
0
0

@gokulanathan wrote:

Error occurs when i try to post in get method to rest api. but in postman it working perfectly.

 public cartview() {
let localaccesstoken = localStorage.getItem('token');
let apiUrl = this.urlService.apiUrl+'cart?access_token='+localaccesstoken;
console.log(apiUrl);
return new Promise((resolve, reject) => {
  console.log("test : "+apiUrl);
    this.http.get(apiUrl)
      .subscribe(res => {
        console.log("w3cert Url : "+JSON.stringify(res));

         console.log(resolve(res));
      }, (err) => {
        console.log('w3cert : '+reject(err));
    });
});

In console log shows an api. I copied that api and posted in postman it working. but in app it shows error

Error: “Uncaught (in promise): [object Object]”

Posts: 1

Participants: 1

Read full topic

Get multiple variables from 'executeScript' method of Cordova inAppBrowser

$
0
0

@Hamidaraghi wrote:

How can I get multiple values from Cordova InAppBrowser using executescript() method in ionic3? I can get single value from InAppBrowser using:

var browserRef = this.inAppbrowser.create("my_url", "_blank");
browserRef.on('loadstop').subscribe(() => {
  var codePass = "document.getElementById('RefNum').value";
  browserRef.executeScript({ code: codePass }).then((values) => {
   alert(JSON.stringify(values[0]))}) // Array of values!
      })

My HTML document that I want to extract values from is shown below:

<html >
<head id="Head1" >
    <title>Sep CallBack Page</title>
</head>
<body>
<input id="RefNum" value=<?php echo $_POST['RefNum']; ?> />
<input id="State" value=<?php echo $_POST['State']; ?> />
</body>
</html>

How can I retrieve both of RefNum and State values from my HTML document URL using single injection?

Posts: 1

Participants: 1

Read full topic

Ios-sim Does not recognize devices after xCode 10.2 update

$
0
0

@Adza wrote:

Hello there!

After upgrading to xCode 10.2 I am experiencing one really bad issue. It is not possible to emulate/run application with live reload functionalities anymore. To be more precise, after xCode 10.2 installation finished, and xCode command line tools updated, Cordova (ios-sim) does not recognize any virtual device as simulator). Therefore command

ios-sim showdevicetypes

returns empty list.

Steps I have tried to resolve this issue:

  1. I have tried to update ios-sim to latest version *8.0.0. issue persists.
  2. I have tried to roll back to xCode 10.1 while deleting Library/Developer files, issue persists.
  3. Tried to complately remove Ionic and Cordova, reinstalled it, issue persists.
  4. Tried to raise iOS platform from 4.5.4 to 5.0.0, issue persists.

Command xcrun simctl list devices returns all available iOS sim simulator runtimes:

– iOS 12.2 –
iPhone 5s (BE2D764F-72C0-401C-8E12-8E32BA502037) (Shutdown)
iPhone 6 (F07425AE-7712-43B1-B987-8EEEFBE9908F) (Shutdown)
iPhone 6 Plus (59B39758-1EC4-4EF6-9A2E-0DD1F87ADC8E) (Shutdown)
iPhone 6s (18AB9159-BF51-4846-89A5-5D5A88194297) (Shutdown)
iPhone 6s Plus (B557EDB4-15F6-4B7F-AB71-FC5354689954) (Shutdown)
iPhone 7 (2439EBDD-D458-48B4-B524-DA850C311775) (Booted)
iPhone 7 Plus (A3739703-A36A-44D9-B82E-62D3666CA853) (Shutdown)
iPhone 8 (041E4CA5-7C33-4500-9438-119F247173BE) (Shutdown)
iPhone 8 Plus (707D8549-EF3E-454E-BC7A-593B3EC0E6D3) (Shutdown)
iPhone SE (63BF90ED-E85C-4BC7-B441-AA082C43A83D) (Shutdown)
iPhone X (3D7B6980-1783-491A-8F81-09FB3A83519E) (Shutdown)
iPhone Xs (C101781E-C0B0-43E4-95F7-C8775B47364A) (Shutdown)
iPhone Xs Max (24FF049A-41B2-4D50-BB04-049A0B2E8263) (Shutdown)
iPhone Xʀ (F4C441F2-6A0A-4DA4-83E4-59E4ABC9681D) (Shutdown)
iPad Air (3rd generation) (7198A0F4-B6A2-4512-BDAC-EA2041F46988) (Shutdown)
iPad Air (8FBB55F1-BD4E-402C-A62F-0581DC475068) (Shutdown)
iPad Air 2 (618CC9E8-8650-48F7-82CA-CA14116B7F5A) (Shutdown)
iPad (5th generation) (A63454F5-C9A3-4CA0-9815-97D3DC2BE46B) (Shutdown)
iPad Pro (9.7-inch) (0E69CDE8-E3DF-473F-AED1-3A30510D55CD) (Shutdown)
iPad Pro (12.9-inch) (BD88CF91-D337-407F-BD39-38E78023E87B) (Shutdown)
iPad Pro (12.9-inch) (2nd generation) (85C6DB40-30E9-4C97-BF73-13C5879BBBEC) (Shutdown)
iPad Pro (10.5-inch) (33CDC48E-5DA3-4C94-875E-26BAC12B9AF2) (Shutdown)
iPad (6th generation) (31C898B4-32EB-4ECD-99FA-E1451F2B691C) (Shutdown)
iPad Pro (11-inch) (5CD62E06-A349-4DE0-A31E-2AAB6683CD33) (Shutdown)
iPad Pro (12.9-inch) (3rd generation) (70F10A2E-07A5-45A7-A5B8-4B27BB682544) (Shutdown)

I guess this has something to do with ios-sim and cordova not being able to recognize new devices. Therefore, command
ionic cordova run ios -lc --target …

is not going to work. Cordova live connect server will run but when I try to debug application via Safari web inspector code wont show in web inspector.

Does anybody have simmilar issues with ios-sim? I dont think this has anything to do with ionic 3 or ionic4 platform. I have tried to replicate same issue on new ionic3/ionic4 projects, same thing happens.

Posts: 1

Participants: 1

Read full topic

How to call variables from method

$
0
0

@emryldrmr wrote:

import { Component, OnInit } from ‘@angular/core’;
import { HomePage } from ‘./…/home/home.page’;
import { HttpClient } from ‘@angular/common/http’;
import { ToastController, AlertController, MenuController } from ‘@ionic/angular’;
import { Storage } from ‘@ionic/Storage’;
import { Router } from ‘@angular/router’;
import { Push, PushObject, PushOptions } from ‘@ionic-native/push/ngx’;
import { Device } from ‘@ionic-native/device/ngx’;

@Component({
selector: ‘app-giris’,
templateUrl: ‘./giris.page.html’,
styleUrls: [’./giris.page.scss’],
})
export class GirisPage implements OnInit {
userdata: any;
regID: any;
pushregid: any;
dbregID: any;
deviceid: any;
devmodel: any;
devserial: any;
devversion: any;
dplatform: any;

constructor(
private http: HttpClient,
public toastController: ToastController,
private storage: Storage,
public alertCtrl: AlertController,
private router: Router,
private menuCtrl: MenuController,
private push: Push,
private device: Device) {
}

ngOnInit() {
console.log(‘ngOnInit GirisPage’);
this.menuCtrl.swipeEnable(false);
this.menuCtrl.enable(false);
this.logForm();
}

data = {}
apiUrl=‘http://192.168.1.91:8080/mobilbks/’;
logForm() {
let newData = {
funcion: ‘logForm’,
data: this.data
}
//console.log(this.data);
this.http.post(this.apiUrl, JSON.stringify(newData)).subscribe(data => {
if (data[‘success’] === “Login Success”) {
this.storage.set(‘session_storage’, data[‘res’]);
let newDevice = {
funcion: ‘newDevice’,
data: this.data,
deviceID: this.device.uuid,
devmodel: this.device.model,
devserial: this.device.serial,
devversion: this.device.version,
dplatform: this.device.platform,
dbregID: this.pushSetup()
}
console.log(newDevice);
this.http.post(this.apiUrl, JSON.stringify(newDevice)).subscribe(data => {
this.deviceid = data;
console.log(this.deviceid);
});
this.router.navigateByUrl(‘menu’);
} else {
this.girishataAlert();
this.router.navigateByUrl(‘giris’);
}
},
(err) => {
console.log(err);
});
}

async girishataAlert() {
const alert = await this.alertCtrl.create({
header: ‘Hatalı Giriş’,
message: ‘Lütfen Kullanıcı Bilgilerinizi Kontrol Ediniz’,
buttons: [‘Tamam’]
});
await alert.present();
}

pushSetup() {
const options: PushOptions = {
android: {
senderID: ‘11111111111111’
},
ios: {
alert: ‘true’,
badge: true,
sound: ‘false’
}
};

const pushObject: PushObject = this.push.init(options);
pushObject.on('registration').subscribe((data: any) => {
  //alert('Device token/handle is: ' + data.registrationId);
      this.regID = **data.registrationId**;

});
}

}

Hi, I want save the device registrationID (this.regID) to mysql database.
but I can’t call the method

please help me

Posts: 1

Participants: 1

Read full topic


Call variables from method

$
0
0

@emryldrmr wrote:

pushSetup() {
    const options: PushOptions = {
      android: {
        senderID: '111111111111'
      },
      ios: {
        alert: 'true',
        badge: true,
        sound: 'false'
      }
    };

    const pushObject: PushObject = this.push.init(options);
    pushObject.on('registration').subscribe((data: any) => {
      //alert('Device token/handle is: ' + data.registrationId);
          this.regID = data.registrationId;
  });
  }

this registrationId actually any device registrationId.

I want a call the registrationId in

 ngOnInit() {
    console.log('ngOnInit GirisPage');
    this.menuCtrl.swipeEnable(false);
    this.menuCtrl.enable(false);
    this.logForm();
    **this.pushsetup();**
  }

but ı can’t make it. it’s undefined all the time

Posts: 1

Participants: 1

Read full topic

[V4] ionic serve white screen and freezing

Ionic 3: Get formatted address of the Marker After dragged on Map

$
0
0

@harshm90 wrote:

I have made a Google map that shows the current address on the map. I also have draggable marker which is fixed at the center of map. So the user can change the marker by moving map.

I am trying to fetch the formatted address of the marker when loaded & also want to display the formatted address after dragged. How can i achieve that?

I have tried a few methods from google documentation but couldn’t find the proper solution.

Below is my .ts file

this.geocoder = new google.maps.Geocoder();
    this.geolocation.getCurrentPosition().then((position) => {
      let latLng = new google.maps.LatLng(position.coords.latitude, position.coords.longitude);
      var mapOptions = {
        center: latLng,
        zoom: 17,
        streetViewControl: false,
        mapTypeControl: false,
        fullscreenControl: false,
        mapTypeId: google.maps.MapTypeId.ROADMAP
      };

      this.map = new google.maps.Map(this.mapRef.nativeElement, mapOptions);

      google.maps.event.addDomListener(window, 'load', this.map);

    }, (err) => {
      console.log(err);
    });

I also tried this Method but with this instead of map I see only blank page.

Posts: 1

Participants: 1

Read full topic

Source and destination must not be the same

$
0
0

@alexmpc wrote:

When I try to do a Cordova build for android --prod --release. I get this error:

Source and destination must not be the same.

Error: Source and destination must not be the same.

at checkPaths (C:\Users\est-acoelho\Documents\app-movel-master\app-movel-master\node_modules\cordova-common\node_modules\fs-extra\lib\copy-sync\copy-sync.js:185:11)

at Object.copySync (C:\Users\est-acoelho\Documents\app-movel-master\app-movel-master\node_modules\cordova-common\node_modules\fs-extra\lib\copy-sync\copy-sync.js:25:20)

at updatePathWithStats (C:\Users\est-acoelho\Documents\app-movel-master\app-movel-master\node_modules\cordova-common\src\FileUpdater.js:103:24)

at C:\Users\est-acoelho\Documents\app-movel-master\app-movel- master\node_modules\cordova-common\src\FileUpdater.js:298:19

at Array.forEach ()

at Object.mergeAndUpdateDir (C:\Users\est-acoelho\Documents\app-movel-master\app-movel-master\node_modules\cordova-common\src\FileUpdater.js:296:33) at updateWww (C:\Users\est-acoelho\Documents\app-movel-master\app-movel-master\platforms\android\cordova\lib\prepare.js:157:17)

at Api.module.exports.prepare (C:\Users\est-acoelho\Documents\app-movel-master\app-movel-master\platforms\android\cordova\lib\prepare.js:56:19)

at Api.prepare (C:\Users\est-acoelho\Documents\app-movel-master\app-movel-master\platforms\android\cordova\Api.js:177:45)

at C:\Users\est-acoelho\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\prepare.js:105:36

I have already done a Cordova platform remove android and a Cordova platform add android.

I see this issue occurs on Android 8.0.0 but I have to use this one, because Google Play Console only let me upload an app with API +26 (+8)

Posts: 1

Participants: 1

Read full topic

Difficulty navigating to a ionic Tabs page with specific data from Firebase,

Viewing all 71531 articles
Browse latest View live


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