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

Foreground service icon appears randomly

$
0
0

Hi,

I’ve posted the following issue which seems to be getting worse.


It basically talks about the fact that I use the background geo-location service, close the app, and sometime in the future the background service icon appears with no reason.
I was wondering if anyone here experienced the problem, and if so if there’s a know workaround.
Any help would be greatly appreciated. I really want to solve this issue but I don’t know how…

1 post - 1 participant

Read full topic


ActionSheet - Email composer - Ionic 5 - All Available Mails - Ios

Local notifications killing me

$
0
0

hallo guys, i want to use the local notification plugin but i always get an error, that some v4-support-libraries files are missing. It is due to the fact, that android studio doesnt support this libraries anymore. the local and the phonegap plugins working with this libraries.

After this disaster, i tried to use the vanilla js notification api. works in my browser but in Android Studio i get an Error that Notification is undefined.

Is there any possibility to send local notification with carpacitor/react/ionic?

thx for your help bg ferhat

1 post - 1 participant

Read full topic

Google Analytics Not Working

$
0
0

I install google analytics refering this url https://ionicframework.com/docs/native/google-analytics
After building app it didnt trace page in analytics
Refer code below

this.ga.startTrackerWithId(‘MYID’)
.then(() => {
console.log(‘Google analytics is ready now’);
this.ga.trackView(‘test’);
// Tracker is ready
// You can now track pages or set additional information such as AppVersion or UserId
})
.catch(e => console.log(‘Error starting GoogleAnalytics’, e));

1 post - 1 participant

Read full topic

@zxing/ngx-scanner Can't get user media, this is not supported

$
0
0

Hello, I have a problem when using zxing ngx scanner in iOS and Android
On browsers it works but not in iOS and android applications, I have an error:
" @zxing/ngx-scanner Can’t get user media, this is not supported."

I tried to generate a certificate and I added those lines in my config.xml:

<resource-file src="ssl/server.crt" target="app/src/main//assets/server.crt" />

in platform android and:

<resource-file src="ssl/server.crt" />

in platform iOS.

Can you help me?

(sorry for my English, I’m French)

1 post - 1 participant

Read full topic

In Ionic 5 + Capacitor event.preventDefault() doesn't prevent blur on div contenteditable="true" on iOS device

$
0
0

Hey there,

In my Ionic 5 + Capacitor project I need in my app to have an ability to put cursor on div contenteditable=“true” and then tap some tool on the toolbar without losing focus from this div.
For testing purposes I’ve got the following simple code for home page:

html:

<ion-header>
  <ion-toolbar>
    <ion-title>
      Blank
    </ion-title>
  </ion-toolbar>
</ion-header>

<ion-content>

  <input class="inp" value="input text">

  <div
    class="dv"
    contenteditable="true"
    autocomplete="on"
    autocorrect="on"
  >div contenteditable text</div>

</ion-content>

<ion-footer>
  <div id="toolbar" (mousedown)="preventBlur($event)" (touchstart)="preventBlur($event)">
    toolbar
  </div>
</ion-footer>

css:

.inp {
  width: 100%;
  border: 5px solid green;
}

.dv {
  user-select: auto;
  height: 100px;
  border: 5px solid blue;
}

ion-footer {
  div {
    height: 100px;
    border: 5px solid red;
  }
}

js:

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

@Component({
  selector: 'app-home',
  templateUrl: 'home.page.html',
  styleUrls: ['home.page.scss'],
})
export class HomePage {

  constructor() { }

  preventBlur(event) {

    console.log('event: ', event);

    event.preventDefault();

    event.stopPropagation();
  }
}

In desktop browser it works fine. Neither input nor div contenteditable=“true” lose their focuses when clicking toolbar div.
BUT on a real iOS device or emulator putting cursor on input and tapping toolbar still keeps focus as need but div contenteditable=“true” loses its focus.
What’s also interesting is that the same code for Ionic 3 + cordova works the opposite way: input loses focus but div doesn’t!

Does anyone have ideas why it happens?

BTW you can download Ionic 5 / 3 projects to replicate the issue from here:

Thanks,
Andrew.

1 post - 1 participant

Read full topic

IOS issue in ionic

$
0
0

Hi Team,

In forgot password, we are sending the verification code for forgot password in mobile this functionality is not working in IOS. Do we need to add any permission for IOS. In IOS when we click forgot password link the page is not appearing. the same forgot password working fine in Android device.

Thanks in Advance. kindly reply me.

2 posts - 2 participants

Read full topic

On Android, register the plugin in your main activity:

$
0
0

I’m new to android studio and i’m trying to add the capacitor analytics plugin. the docs say

On Android, register the plugin in your main activity:

but there are several manifest files that have the main activity class - which one is the correct one?

1 post - 1 participant

Read full topic


How to check if the device runs Capacitor?

$
0
0

Hi,
I have an app done with Ionic5 and Capacitor, I need to have different code if the app runs on a browser or on a real device.

However, using the Platform the command:

this.plaform.is(‘capacitor’))

always returns false.

How can I understand if I’m on a real device?
Thank you very much

cld

1 post - 1 participant

Read full topic

Align horizontally two elements

$
0
0

Hi
I have a problem aligning 2 elements horizontally w ionic

The select at left have to use just 2 cols, and the input have to use the rest (10 cols)
(I tried using col=“2” and col=“10” respectively, but didn’t work)

They look like this now:

Captura de pantalla 2020-06-30 a la(s) 14.15.42

How can I resolve this?

My code

ID Opt1 Opt2
          <ion-label position="stacked">ID</ion-label>
          <ion-input required type="text" oninput=""></ion-input>
        </ion-row>
        </div>
    </ion-item>

1 post - 1 participant

Read full topic

Ionic React QR scanner

$
0
0

hey,

im trying to use the capacitor QR scanner on ionic 6 react. It works fine on Android, but not on iOs (at least on an iOs emulator it doesn’t work). Anyone managed this?

import { BarcodeScanner } from ‘@ionic-native/barcode-scanner’;

const scanCode = async () => {
const data = await BarcodeScanner.scan();
};

In iOs it just hangs/nothing happens and the console says -
" To Native Cordova -> BarcodeScanner scan BarcodeScanner102680008 [“options”: []]"

Not very useful

1 post - 1 participant

Read full topic

Permanently remove Splash Screen

$
0
0

Hello folks,

I’m struggling with removing splash screen (beacuse I want to have animation on the start). What I did:

1. npm uninstall --save @ionic-native/splash-screen
2. ionic cordova plugin rm cordova-plugin-splashscreen
3. <preference name="SplashMaintainAspectRatio" value="true" />
<preference name="FadeSplashScreenDuration" value="0" />
<preference name="SplashShowOnlyFirstTime" value="false" />
<preference name="SplashScreen" value="none" />
<preference name="SplashScreenDelay" value="0" />
<preference name="AutoHideSplashScreen" value="true" />
4. from app.module.ts I removed what was about splashScreen
5. from app.component.ts I also removed what was about splashScreen

Many times I removed and added ionic cordova platform add ios but it nothing helped

When I put ionic serve everything is ok, but on emulator and my device for the first second appears cordova logo instead of my animation.

A short video of my problem: https://youtu.be/5cbh5B7ddxU

Any ideas what can hep me?

1 post - 1 participant

Read full topic

Change ion grid structure dinamically

$
0
0

Hi im using ion-grid to organize my application content, i need to move elements while application because the i need to show different templates between users.
someone can view a logo in right bottom corner and another one can view this logo in the center of the screen.

is there any way to change grid structure?

i had an idea and tried it, with pure html and css like this


<ion-content>
    <div class="grid-content">
        <ion-item class="item-logo">
            item one
        </ion-item>

        <ion-item class="item-name">
            item two
        </ion-item>

    </div>
</ion-content>
.....

and Css


.grid-content{
  display: grid;
  grid-gap: 10px; 
}
 
.item-name{
  grid-column: var(--col-name) ;
  grid-row: var(--row-name);
}

.item-logo{
  grid-column: var(--col-logo);
  grid-row: var(--row-logo);
}

And later change the variables with elementRef, but application show blank page.

1 post - 1 participant

Read full topic

Tinnitus and hearing Loss

Ionic router push same page

$
0
0

I’m using a ionic stencil starter pwa with ionic router .

I’m in a page and I need to push again that same page but with a different prop, so the page will be loaded from the start with the new prop and re-render.

I’m using

const navCtrl: HTMLIonRouterElement = await(this.nav as any).componentOnReady();
navCtrl.push("/pagename/" + prop + "/", "root"); 

if I’m in a different page, my push works correctly. the problem is when I’m in the same page, nothing happens.

Why this happens? there Is a way to make it works?

2 posts - 2 participants

Read full topic


Ionic 5 - Disable swipe to previous page

$
0
0

I’m unable to disable the swipe to go back in my app.

I have my auth page, and after the user log in with credentials, the user is able to swipe back to the log in page, I don’t want this behavior but I can’t find how to stop this with the new Ionic documentation

I was thinking of cleaning the stack of pages after the user gets logged or disabling the swipe action only in the page after the auth process.

Which one is a better practice? Could anyone provide the code or documentation to achieve any of both process?

Thanks in advance!

1 post - 1 participant

Read full topic

How i can use history or push to new url in while it's placed outside ?

$
0
0
<IonApp>
      <IonReactRouter>
        <MenuSide />
        <IonRouterOutlet>
          <Route
            path="/home"
            render={(props) => {
              return <HomePage {...props} />
            }}
          />
       </IonReactRouter>
</IonApp>

1 post - 1 participant

Read full topic

Google plus login not working after updating to ionic 5

Ionic v3 app deployment not updating

$
0
0

Hello, We have an ionic app for which we were using live updates until yesterday, All of a sudden from yesterday any update we make is not getting downloaded in the app. We reverted to the last working update and then tried to add a console.log to check the point of failure and even that was not getting downloaded in the app.

The app builds successfully and when we deploy the updates also it says that the deployment is successful.I don’t see any errors when the download fails.

Any pointers ?

Regards

1 post - 1 participant

Read full topic

Native API access to login activity?

$
0
0

I’m not sure if this is possible in a purely native implementation, let alone with Ionic…

Is it possible to have an app that monitors login attempts in real time? As opposed to say accessing logs later… if that is even possible? Are apps sandboxed away from login system functionality?

I don’t know where to check permissions for how much access an app can have.

Thanks.

1 post - 1 participant

Read full topic

Viewing all 71072 articles
Browse latest View live


Latest Images

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