Quantcast
Channel: Ionic Forum - Latest posts
Viewing all 228514 articles
Browse latest View live

Modalcontroller resize dynamically

$
0
0

i am trying to modalcontroller resize dynamically as received image size

.custom-modal-css .modal-wrapper {

// height: 50%;

top: 10%;

min-width: 70%;

margin: 0 auto;

position: absolute; 

display: block; 

border-radius: 20px; 

}


Google Analytics - which plugin?

How can i integrate chatbot using https://www.teneo.ai/ in ionic3 apps

$
0
0

I need to integrate the chatbot using https://www.teneo.ai/ for my ionic3 apps, is anyone has tried the solution with it. Thanks in advance.

Anyway to custom the tabbar's icon with my own svg file?

$
0
0

I just realize than at this time, it’s working well.
I found this subject cause I think was not working as expected or not possible.

So I add my solution, this was in a new project,

Don’t forget that you maybe working on a white background. If you do not have a problem on call of assets, then check to change you background color to see your icon appears (svg is not in black if it’s a inserted icon from you)

easily solved this kind of problem with :

ion-icon {
color: red;
}

Capacitor App - Barcode scanner issue

$
0
0

I want to use QRCode Scanner in my Capacitor Ionic 4 App, But non of the plugins are helpful.

Plugins Used -
import { BarcodeScanner } from ‘@ionic-native/barcode-scanner/ngx’;
import { QRScanner } from ‘@ionic-native/qr-scanner/ngx’;

BarcodeScanner throws error after running the app on Android Emulator, that variables are not declared.
QRScanner did not give any error, it installed successfully, and asked for the permission as well, but not able to open the camera to scan the code.

Any suggestions for this issue.

How to close modal/Alert on back button in ionic4 (PWA)

$
0
0

Hey, just in case anybody is looking for a different solution, here is mine.

I use canDeactivate guard to check if parent component can be deactivated. If modal is open, canDeactivate returns false and closes the modal, but does not navigate back from parent component.

parent-component.page.ts

export class ParentComponentPage implements DeactivatableComponent {
...
    canDeactivateVar: boolean;
...
    ngOnInit() {
        this.canDeactivateVar = true;
    }

    canDeactivate(): Observable<boolean> | Promise<boolean> | boolean {
        if(!this.canDeactivateVar){
            this.dismissModal();
            return false;
        }else {
            return this.canDeactivateVar;
        }
    }

    async openModal() {
    	const modal = await this.modalController.create({
      		component: ModalComponent
	    });
        this.canDeactivateVar = false;
    	return await modal.present();
    }

	async dismissModal() {
        this.canDeactivateVar = true;
    	return await this.modalController.dismiss();
  	}

app-routing.module.ts

...
const routes: Routes = [
	{ path: 'parent-component', component:  ParentComponentPage, canDeactivate: [AuthGuard] },
]
...

auth.guard.td

...
export class AuthGuard implements CanDeactivate<DeactivatableComponent> {
...
   canDeactivate(
        component: DeactivatableComponent,
        route: ActivatedRouteSnapshot,
        state: RouterStateSnapshot
    ): Observable<boolean> | Promise<boolean> | boolean {
        return component.canDeactivate ? component.canDeactivate() : true;
    }
..
}
...

deactivatable-component.interface.ts

import { Observable } from 'rxjs';

export interface DeactivatableComponent {
 	canDeactivate: () => Observable<boolean> | Promise<boolean> | boolean;
}

Modalcontroller resize dynamically

$
0
0

Hi @ankit-21 welcome to the community!
Can you give more details about what do you want to do?
Let me see, if I can help you.

Ionic 4 WebAssembly is not defined with OpenCV on an older phone

$
0
0

Hey thanks. Ok, so I see two potential solutions:

  1. find a way to run WebAssembly in WebView on older phones
  2. find a non-WebAssembly version of the used library

As for point 2, I actually found the openCv.js library without embedded wasm code, it was slightly bigger (11,5mb vs 7.5mb in the wasm version). I included it in my ionic project and the project took ages to build (literally around 25 minutes, vs a regular build time of 2 minutes). After it built it did not work either. And it would just freeze completely. Do you have any idea why that is? aybe it’s due to minification of the js code or sth? Can I disable it for just one file? What could be other reasons?

As for point 1, I blame the old WebView for not supporting wasm. Is there any way I can use some plugin for ionic 4 cordova to actually make it work? :slight_smile: For older ionic version I read up about some WKWebView plugins or even the Crosswalk plugin, but I am not sure if it still makes sense in the new Ionic / Cordova

Can you please share some insights with this?
Thanks


Ionic 4 Tab navigation params

$
0
0

Hi, did you figure this out? I am having the same issue.

Thanks

USB serial not showing all the data

Jumio Cordova

Help us test the Ionic 5 Release Candidate!

Jumio Cordova

$
0
0

I believe it would only work for Ionic 1, right?

Would this be possible with Ionic?

Help us test the Ionic 5 Release Candidate!


A Swipable React Tinder Cards

Debugging not working on iOS / Safari

$
0
0

I’m trying to debug my app on iOS, and not seeing any messages appear in Safari’s Web Inspector. I’m probably doing something wrong.

I’m running it on my iphone like this:

ionic cordova run ios --debug -l --address=0.0.0.0

In Safari I think click Develop -> Iphone -> [My App Name]. Which launches the web inspector. But the web inspector shows nothing at all. No messages, no elements, nothing.

On the iPhone, in Settings -> Safari, “web inspector” is enabled.

I’m guessing I’m doing something wrong?

How can a python code be integrated with Ionic 4

$
0
0

My team is working on Ionic 4 to build an offline mobile app. My task is to work on a python OCR code where an image should be taken as input and text in the image should be sent as output on click of a button in the app.

I’ve worked on the python code and would like to know how this code can be integrated with the Ionic framework.

A Swipable React Tinder Cards

Help us test the Ionic 5 Release Candidate!

Viewing all 228514 articles
Browse latest View live


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