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

Ionic 4 emulator

$
0
0

@manelisi wrote:

Hi guys,

I am currently developing an ionic app.
I am at a stage where I want to make HTTP requests using: import { HTTP } from ‘@ionic-native/http/ngx’;
When I am running my app with ‘ionic serve’ and make a HTTP request I get the ‘Cordova not found error’ and people are correctly suggesting that I must use an emulator for this.

Seeing that my application is still in the development phase, which emulator can I use?
I want to be able to put breakpoints and debug the application.

Kind regards,
Mane

Posts: 1

Participants: 1

Read full topic


Gmail login with multiple accounts in device

$
0
0

@Rakka wrote:

Hi All,

I have multiple Gmail accounts on my device.
When I tried to login via Gmail after changing my primary account, it always logs in from the same account.
How could I show the choose Gmail account screen from all available accounts in the device?

Thanks in advance.

Posts: 1

Participants: 1

Read full topic

Native http problem

$
0
0

@abdullahomran9 wrote:

hello ,
after i deployed my app on device " android " it wasn’t working proply because i used httpclient and i had problems with CORS .
now i am stuck for 5 days trying to do post request on native HTTP plugin! , take in mind I am using the same headers and data from the old code , but it keep telling me " You Must enter userID and pass" even though it is in the post request.

this is the post request :

    this.nativeHttp.post(this.url , {'pwd':'*****','userid':'******'},
      {'withCredentials': 'true','accept':'*/*','accept-encoding':'gzip, deflate','content-type':'application/x-www-form-urlencoded; charset=UTF-8','user-agent':'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36'
  } )
    .then(response => {
      // prints 200
      console.log(response),
      this.raw = response;}, err => {
        console.log('JS call err : ',err);
      });

the response status is :200 , but it is “You Must enter userID and pass” .
i tried changeing the user and pass methods but no luck .

first this is the console log of my post :

this is a post from the PC browser and it is OK to compare :

finally i did send post request to https://postman-echo.com/ which will return my payload just to make sure , this is the post :

actually i am starting to get frustrated by this , and i will appreciate the help . thank you in advance .

Posts: 1

Participants: 1

Read full topic

Ionic v4 - Capacitor Plugin "Motion" not working on iOs 13 anymore

$
0
0

@froeschlb wrote:

Hello everyone!

I am using Ionic v4 with Capacitor for a kind of “Tracking App”. So I have implemented a function where the map is rotating with the heading of the users. Therefore I use the Capacitor plugin “Motion”.

Since updating to iOs 13 the Motion plugin couldn’t be found anymore - here the error log from Xcode:
To Native -> Motion requestPermissions 60697268
:zap: Unable to load plugin Motion. No such module found.
:zap: Error loading plugin Motion for call. Check that the pluginId is correct
:zap: [log] - {"__zone_symbol__state":null,"__zone_symbol__value":[]}

And here the code, too:

console.log(Motion.requestPermissions());
this.motionListener = await Motion.addListener(
  'orientation',
   values => {
     ...
  }
);

On Android there is no problem - the plugin and the rotation of the map are working fine.

Thanks for your replies in advance!

Greetings,
froeschlb

Posts: 1

Participants: 1

Read full topic

Ionic 4 showing real ads problem

$
0
0

@kl3jvi wrote:

I installed admob-free cordova plugin and also implemented to my application. It shows pretty fine the test ads , but i have an issue when i ise my admob units for my ads. It doesnt show them at all , even though they count as view pages on adsense website. I tried changing the admobconfig.java changing test ids with my id and it worked fine but ads have a little badge saying test ad om the upper corner. Do you guys know any solution to this?

Posts: 1

Participants: 1

Read full topic

Can't use components

$
0
0

@tux wrote:

Hello! I have created a component, but can’t use it. If i add the component in the AppModule declarations, entryComponents and exports i receive an error: Template parse errors: Can't bind to 'composition' since it isn't a known property of 'app-composition-item'.. Then i tried to import the AppModule in the pages module and receive: Error: RouterModule.forRoot() called twice. Lazy loaded modules should use RouterModule.forChild() instead.. But if i add it to page module declarations it works, but i can declarate component only once, so i can’t use it in another pages.
Here the how i tried to use it.
In the page i want to use component:

<div *ngFor="let favorite of favorites">
    <app-composition-item [composition]="favorite.composition"></app-composition-item>
</div>

Here the component:

@Component({
  selector: 'app-composition-item',
  templateUrl: './composition-item.component.html',
  styleUrls: ['./composition-item.component.scss'],
})
export class CompositionItemComponent {

  @Input() public composition: IComposition;

  constructor() {
  }
}

Posts: 1

Participants: 1

Read full topic

How to use BehaviorSubject in an Ionic app with many variables?

$
0
0

@ioclaudio wrote:

Hi,
my question is about BehaviorSubject:

I’ve defined them in this way:

public mobileLatitude: BehaviorSubject<number> = new BehaviorSubject<number>(null);
public mobileLongitude: BehaviorSubject<number> = new BehaviorSubject<number>(null);
public mobileAltitude: BehaviorSubject<number> = new BehaviorSubject<number>(null);
public mobileHeading: BehaviorSubject<number> = new BehaviorSubject<number>(null);
public mobileSpeed: BehaviorSubject<number> = new BehaviorSubject<number>(0);
public mobileDataTimestamp: BehaviorSubject<number> = new BehaviorSubject<number>(null);

And I change them in this way:

this.mobileSpeed.next(location.speed);
this.mobileLatitude.next(location.latitude);
this.mobileLongitude.next(location.longitude);
this.mobileAltitude.next(location.altitude);
this.mobileDataTimestamp.next(tmstp);

Now, is it sure that they are modified in the order I wrote them?
That is when I manage the last Behaviour (mobileDataTimestamp), are the previous Behaviours already updated?

this.mobileDataTimestamp.subscribe((value) => {
....
});

The alternative is to use an object Location into a BehaviorSubject.
But is it possible to use an object into a BehaviorSubject?

Thank you very much

cld

Posts: 1

Participants: 1

Read full topic

Build/Serve Error

$
0
0

@lucaceck95 wrote:

Hi there,
i just passed from an MacBook with HighSierra and XCode9 to a iMac with Mojave and XCode11
i noticed that after the new installation of ionic and npm, the new version and the old one are different

I cloned a git project in my new mac
I typed ionic repair to get my old resources
When i ionic serve this happen

[ng] ERROR in ./node_modules/@ionic/core/dist/esm-es5/loader.mjs 4:11-19
[ng] Can't import the named export 'a' from non EcmaScript module (only default export is available)
[ng] ERROR in ./node_modules/@ionic/core/dist/esm-es5/loader.mjs 6:8-21
[ng] Can't import the named export 'b' from non EcmaScript module (only default export is available)
[ng] ERROR in ./node_modules/@ionic/core/dist/esm-es5/loader.mjs 5:8-15
[ng] Can't import the named export 'g' from non EcmaScript module (only default export is available)
[ng] ERROR in ./node_modules/@ionic/core/dist/esm-es5/index.mjs 7:0-205
[ng] Can't reexport the named export 'a' from non EcmaScript module (only default export is available)
[ng] ERROR in ./node_modules/@ionic/core/dist/esm-es5/index.mjs 7:0-205
[ng] Can't reexport the named export 'b' from non EcmaScript module (only default export is available)
[ng] ERROR in ./node_modules/@ionic/core/dist/esm-es5/index.mjs 7:0-205
[ng] Can't reexport the named export 'c' from non EcmaScript module (only default export is available)
[ng] ERROR in ./node_modules/@ionic/core/dist/esm-es5/index.mjs 7:0-205
[ng] Can't reexport the named export 'l' from non EcmaScript module (only default export is available)
[ng] ERROR in ./node_modules/@ionic/core/dist/esm-es5/index.mjs 7:0-205
[ng] Can't reexport the named export 'm' from non EcmaScript module (only default export is available)
[ng] ERROR in ./node_modules/@ionic/core/dist/esm-es5/index.mjs 7:0-205
[ng] Can't reexport the named export 'p' from non EcmaScript module (only default export is available)
[ng] ERROR in ./node_modules/@ionic/core/dist/esm-es5/index.mjs 7:0-205
[ng] Can't reexport the named export 't' from non EcmaScript module (only default export is available)
[ng] ERROR in ./node_modules/@ionic/core/loader/index.mjs 21:0-47
[ng] Can't reexport the namespace object from non EcmaScript module (only default export is available)
[ng] ERROR in ./node_modules/@ionic/core/dist/esm-es5/overlays-10640d86.js 177:37
[ng] Module parse failed: Unexpected token (177:37)
[ng] You may need an appropriate loader to handle this file type.
[ng] |             case 1:
[ng] |                 _a.trys.push([1, 4, , 5]);
[ng] >                 return [4 /*yield*/, import('./index-69c37885.js')];
[ng] |             case 2:
[ng] |                 mod = _a.sent();
[ng] ERROR in ./node_modules/@ionic/core/dist/esm-es5/core-57385ee8.js 69:11
[ng] Module parse failed: Unexpected token (69:11)
[ng] You may need an appropriate loader to handle this file type.
[ng] |         return module[exportName];
[ng] |     }
[ng] >     return import(
[ng] |     /* webpackInclude: /\.entry\.js$/ */
[ng] |     /* webpackExclude: /\.system\.entry\.js$/ */
[ng] ERROR in ./node_modules/@ionic/core/dist/esm/polyfills/index.js 7:18
[ng] Module parse failed: Unexpected token (7:18)
[ng] You may need an appropriate loader to handle this file type.
[ng] | 
[ng] |   if (!win.customElements || (win.Element && (!win.Element.prototype.closest || !win.Element.prototype.matches || !win.Element.prototype.remove))) {
[ng] >     promises.push(import('./dom.js'));
[ng] |   }
[ng] | 
[ng] ℹ 「wdm」: Failed to compile.

how can i solve it???
please help :wink:

Posts: 1

Participants: 1

Read full topic


Transition to previous page is delayed in iOS

$
0
0

@cikcoh wrote:


Hi, I have page with maps and ion-slide, I notice that when transitioning to previous page, the ion-slide is delayed.
<ion-header>
  <ion-navbar navbarTheme>
    <ion-title text-center>Neighbourhood Watch</ion-title>
  </ion-navbar>
</ion-header>
<!--Content -->
<ion-content elastic-header>
  <div id="elastic-header" #map id="map"></div>
</ion-content>
<div footerstyle>
  <ion-grid no-padding>
    <ion-row>
      <ion-col col size="12">
        <ion-slides carouselslidesize slidesPerView="auto" *ngIf="emergencyList.length > 0">
          <ion-slide carouselsize *ngFor="let e of emergencyList; index as i">
            <div badgePostyle><i class="icon-map-marker-radius"></i><span>{{directionList[i].distance}} / {{directionList[i].duration}}</span></div>
            <ion-card cardsize>
              <img roundorgimg src="{{e.avatar}}"/>
              <img style="z-index:-1; height:100px;" src=""/>
              <ion-card-content (tap)="detail(i)">
                <ion-card-title twolinesEllipsis style="height: 70px!important;">
                  {{e.who}}
                </ion-card-title>
                <p twolinesEllipsis style="height: 43px;">
                  {{e.adrs}}
                </p>
              </ion-card-content>
              <ion-row>
                <ion-col>
                  <button ion-button icon-start actbutton block clear small (tap)="callVictim(i)">
                    <ion-icon name="call"></ion-icon>
                    <div>Call</div>
                  </button>
                </ion-col>
                <ion-col>
                  <button ion-button icon-start actbutton block clear small (tap)="navigate(i)">
                    <ion-icon name="navigate"></ion-icon>
                    <div>Navigate</div>
                  </button>
                </ion-col>
              </ion-row>
            </ion-card>
          </ion-slide>
        </ion-slides>
      </ion-col>
    </ion-row>
  </ion-grid>
</div>

Posts: 1

Participants: 1

Read full topic

Upgrading a slightly out of date Ionic 3 application

$
0
0

@richardshergold wrote:

My ionic info output for our Ionic 3 application is currently:

Ionic:

   ionic (Ionic CLI)  : 4.1.2 
   Ionic Framework    : ionic-angular 3.9.2
   @ionic/app-scripts : 3.2.3

Cordova:

   cordova (Cordova CLI) : 8.0.0
   Cordova Platforms     : android 7.1.4, ios 5.0.0
   Cordova Plugins       : cordova-plugin-ionic-keyboard 2.1.2, (and 21 other plugins)

System:

   ios-deploy : 2.0.0
   ios-sim    : 7.0.0
   NodeJS     : v8.12.0 
   npm        : 6.4.1
   OS         : macOS
   Xcode      : Xcode 10.2 Build version 10E125

We will eventually be migrating the application to Ionic 4 but in the meantime I’d like to update this project to use the latest packages etc.

It appears the following upgrades are available:

Ionic CLI to 5.4.2
Ionic Framework to 3.9.9
Ionic App Scripts to 3.2.4
Cordova to 9.0.0
Cordova Android to 8.10
Cordova iOS to 5.0.1.

Does anyone have any advice as to whether these upgrades would be reasonably safe or whether I am likely to run into any issues? Thanks.

Posts: 1

Participants: 1

Read full topic

Update an app (not in the playstore)

$
0
0

@jsab wrote:

Hi everyone,
I have a basic and quite generic question.

I am working on my first app, just to learn.

To test it and debug, apart from the usual things while I am coding, I have created and APK and installed it on my phone.

But if I update the app and the apk and reinstall it, it will start everything (database and such) from scratch.

I am wondering, which is the correct way to release an update to an app?
In general, with or without playstore?

I am searching and googling but if anyone has some handy tutorial it would be helpful.

Thanks!

Posts: 1

Participants: 1

Read full topic

Ionic 4: Broken menu and content on ios

$
0
0

@alex-c wrote:

I have a problem which is better described in GIF:

the bug

The parent page is “Challenges” and it contains a link to “Challenge creation”. The bug happens when you go to that link and then open “Challenges” again (see the GIF).

The real app is more complex and after a lot of time of debugging I tried to remove components/services/utils one by one and I ended up with a simplest app of two pages. The bug is still there. It happens only in “ios” mode. I think it’s somehow affected by ionic animations. Maybe the menu is moved too far to the left when it hides and it pulls the content to the left as well.

I tried:

  • different browsers (btw it happens on a real device too)
  • different computers
  • to create a new ionic project with similar functionality of two pages (which works fine) and compare it to my project

Nothing helped. Has anybody faced this bug?

Source code: https://github.com/i-chornyi/ios-menu-bug

Posts: 1

Participants: 1

Read full topic

Digital web academy

$
0
0

@anjali8881 wrote:

image Digital Marketing Training Academy in Bangalore, Best Coaching Institute in Bangalore, Best Reputed Company in Bangalore, Best institute in Hebbal, Best Coaching institute in hebbal, Best IT training institute in hebbal, visit our blog - bit.ly/2mnuNMF

For more information visit - https://digitalwebacademy.in
call 9535253533

Posts: 1

Participants: 1

Read full topic

Is there any way to display in appbowser along with ion-header and ion-navBar

$
0
0

@VidhyaC wrote:

below is the code which is launcing in appbrowser but without ion-header

var url=“www.google.com
launchInAppBrowser(url:any){
const browser = this.iab.create(url, ‘_blank’,
{
location: ‘yes’,
clearcache: ‘yes’,
clearsessioncache: ‘yes’,
target:’_self’,
});
}

Posts: 1

Participants: 1

Read full topic

Prevent / block scrolling of ion-content while drag and drop

$
0
0

@MichBerg wrote:

Is there a way to set the scrollY / scrollX properties of ion-content dynamically so I can block scrolling while dragging elements?

Posts: 2

Participants: 1

Read full topic


Ionic serve with ionic 4 in ubuntu

$
0
0

@Rithesh4i1hu wrote:

i have installled ionic 4 cli and created tabs app. while serving file i was getting this error.

ionic serve
> ng run app:serve --host=localhost --port=8100
[ng] Schema validation failed with the following errors:
[ng]   Data path ".builders['app-shell']" should have required property 'class'.

[ERROR] ng has unexpectedly closed (exit code 1).

Posts: 1

Participants: 1

Read full topic

How to syncing other services to Layer chat via webhooks

$
0
0

@davidalismichael wrote:

How to syncing other services to Layer chat API via webhooks. Especially mobile clients where it takes a while to update. There is 2 webhook

  1. Stream webhook
  2. Serverless webhook

Which is the best?

Posts: 1

Participants: 1

Read full topic

Hide keyboard in the app completely

$
0
0

@salmanullahkhan wrote:

How to hide keyboard in the app completely? I am developing an app where I need only buttons for input which I have created but now I need to hide keyboard from the app.

Posts: 1

Participants: 1

Read full topic

How to reload app.component on event in ionic 4

$
0
0

@Haug wrote:

I’m stuck with the following problem.

app.component.ts is listening to event ‘login’ which works fine. But, when then event is firing I want to reload my app.component-page as I want to show a different side menu when a user is logged in.

I found some examples with Content but Content is not included in @ionic/angular anymore.

Has someone a working example? This would me a lot.

Thank you in advance.

Following my environment infos

Ionic CLI : 5.2.6 (/usr/local/lib/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

Posts: 1

Participants: 1

Read full topic

Pin code lock for ionic app

$
0
0

@vivek-23 wrote:

Does there exist any plugin that does pin code authentication on app launch?

Update: I did find this plugin. Will see if it meets what I need(although it’s fingerprint instead of Pin code, but that’s fine)

Posts: 1

Participants: 1

Read full topic

Viewing all 71205 articles
Browse latest View live